API
ODP Node SDK / ODP / ApiV3 / API
API
Index
Constructors
Methods
Constructors
constructor()
Signature
new API(config: null | Config | InternalConfig): API;
Parameters
Name | Type |
---|---|
config | null | Config | InternalConfig |
Returns
Defined in: src/Api/lib/ApiV3.ts:105
Methods
errorForCode()
Signature
errorForCode(code: ErrorCode): HttpError;
Parameters
Name | Type |
---|---|
code | ErrorCode |
Returns
Defined in: src/Api/lib/ApiV3.ts:121
get()
Signature
get<T>(path: string): Promise<HttpResponse<T>>;
Type parameters
T
extendsV3Response
Parameters
Name | Type |
---|---|
path | string |
Returns
Promise
<HttpResponse
<T
>>
Defined in: src/Api/lib/ApiV3.ts:123
getContext()
Signature
getContext(): undefined | AppContext;
Returns
undefined
| AppContext
Defined in: src/Api/lib/ApiV3.ts:219
post()
Signature
post<T>(path: string, payload: Payload): Promise<HttpResponse<T>>;
Type parameters
T
extendsV3Response
Parameters
Name | Type |
---|---|
path | string |
payload | Payload |
Returns
Promise
<HttpResponse
<T
>>
Defined in: src/Api/lib/ApiV3.ts:125
request()
Signature
request<T>(
method: HttpMethod,
path: string,
payload: undefined | Payload,
options: RequestOptions = ...): Promise<HttpResponse<T>>;
Type parameters
T
extendsV3Response
Parameters
Name | Type |
---|---|
method | HttpMethod |
path | string |
payload | undefined | Payload |
options | RequestOptions |
Returns
Promise
<HttpResponse
<T
>>
Defined in: src/Api/lib/ApiV3.ts:127
Updated 2 months ago