Global

Methods

createUrl(endpoint, params) → {string}

Create URI including query parameters.

Parameters:
Name Type Description
endpoint string

The endpoint of API.

params object | null

The query parameters.

Source:
Returns:

The URI.

Type
string

getAccessToken() → {string}

Get access-token on current session.

Source:
Returns:

The access token.

Type
string

requestWithAuth(method, endpoint, queryParams, headers, body) → {Promise.<object>}

Parameters:
Name Type Description
method string

The request method.

endpoint string

The endpoint of API.

queryParams object

The query parameters.

headers object

The request headers.

body any

The request body.

Source:
Returns:

The response of the request.

Type
Promise.<object>