Class: BCModAPI

CritterSDK~ BCModAPI

Box Critters Mod API wrapper.


new BCModAPI( [domain] [, token])

Creates a SDK instance.

Parameters:
Name Type Argument Default Description
domain string <optional>
"api.boxcrittersmods.ga"

The Box Critters API domain.

token string <optional>

The hypothetical Box Critters API authentication token.

Methods


get(path)

Performs a GET request with this.token as the BoxCritters-Auth header.

Parameters:
Name Type Description
path string

The path of the request.

Returns:

The parsed JSON response.

Type
Promise.<Object>

post(path, data)

Performs a POST request with this.token as the BoxCritters-Auth header and data as request data.

Parameters:
Name Type Description
path string

The path of the request.

data string

The data of the request.

Returns:

The parsed JSON response.

Type
Promise.<Object>