Skip to content

five-on-it / apps/mcp/src/api / Api

Interface: Api ​

Defined in: apps/mcp/src/api.ts:25

The platform API, as one caller.

Properties ​

url ​

readonly url: string

Defined in: apps/mcp/src/api.ts:27

Its base URL.

Methods ​

call() ​

call<T>(method, path, body?): Promise<Answer<T>>

Defined in: apps/mcp/src/api.ts:29

Sends a request (with a JSON body when there is one); throws when the API cannot be reached.

Type Parameters ​

T ​

T = unknown

Parameters ​

method ​

"POST" | "GET" | "DELETE" | "PUT"

path ​

string

body? ​

unknown

Returns ​

Promise<Answer<T>>