Class: Api

Api()

api class is used to make apiCore requests to the main app server. Re-Authentication is handled exclusively by api class.

Constructor

new Api()

Source:

Methods

(static) delete(url, params) → {object}

Performs a delete request on the specified Url with optional parameters

Parameters:
Name Type Description
url string

The url to make a delete request to

params object

The params to add to the url

Source:
Returns:
Type
object

(static) deleteAuthenticated(url, params) → {object}

Performs an authenticated delete request on the specified Url with optional parameters

Parameters:
Name Type Description
url string

The url to make a delete request to

params object

The params to add to the url

Source:
Returns:
Type
object

(static) get(url, params) → {object}

Performs a get request on the specified Url with optional parameters

Parameters:
Name Type Description
url string

The url to make a request to

params object

The params to add to the url

Source:
Returns:
Type
object

(static) getAuthCookie() → {string|boolean}

Get the Authenication JWT. Returns false if the cookie is not available.

Source:
Returns:
Type
string | boolean

(static) getAuthenticated(url, params) → {object}

Performs an authenticated get request on the specified Url with optional parameters

Parameters:
Name Type Description
url string

The url to make a request to

params object

The params to add to the url

Source:
Returns:
Type
object

(static) post(url, data) → {object}

Performs a post request on the specified Url with optional parameters

Parameters:
Name Type Description
url string

The url to make a request to

data object

The data to post

Source:
Returns:
Type
object

(static) postAuthenticated(url, data) → {object}

Performs an authenticated post request on the specified Url with optional parameters

Parameters:
Name Type Description
url string

The url to make a request to

data object

The data to post

Source:
Returns:
Type
object

(static) put(url, data) → {object}

Performs a put request on the specified Url with optional parameters

Parameters:
Name Type Description
url string

The url to make a request to

data object

The data to post

Source:
Returns:
Type
object

(static) putAuthenticated(url, data) → {object}

Performs an authenticated put request on the specified Url with optional parameters

Parameters:
Name Type Description
url string

The url to make a request to

data object

The data to post

Source:
Returns:
Type
object

(static) setAuthCookie(value)

Set the Authenication JWT as a Cookie

Parameters:
Name Type Description
value string

The value to be set

Source: