MCPcopy Index your code
hub / github.com/anomalyco/opencode / api

Function api

packages/opencode/src/share/share-next.ts:85–92  ·  view source on GitHub ↗
(resource: string)

Source from the content-addressed store, hash-verified

83export const use = serviceUse(Service)
84
85function api(resource: string): Api {
86 return {
87 create: `/api/${resource}`,
88 sync: (shareID) => `/api/${resource}/${shareID}/sync`,
89 remove: (shareID) => `/api/${resource}/${shareID}`,
90 data: (shareID) => `/api/${resource}/${shareID}/data`,
91 }
92}
93
94const legacyApi = api("share")
95const consoleApi = api("shares")

Callers 1

share-next.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected