Module: lib/platform

Members

(inner, constant) API_BASE_URI :string

The default base URI for the JSON API server.

Type:
  • string
Default Value:
  • https://www.mytaglist.com
Source:

(inner, constant) WAIT_BEFORE_RETRY :number

The time in milliseconds to wait before retrying an operation that failed because the tag did not respond.

Type:
  • number
Default Value:
  • 8000
Source:

Methods

(inner) makeAPICall(uri, reqBody, optionsopt) → {Promise}

Invokes an endpoint of the Wireless Tag JSON API, and returns a promise that resolves to the result (see below).

Parameters:
Name Type Attributes Description
uri string

The URI of the endpoint to invoke. If defined and non-null, overrides the uri property possibly given in the options parameter.

reqBody object

The body for the request, as a JSON object. If defined and non-null, overrides the body property possibly given in the options parameter.

options object <optional>

options to be passed through to request(), such as custom headers.

Source:
Returns:

Resolves to the value of the d property of the response body from the API endpoint (or the body itself if there is no d property). Rejects in case of error.

Type
Promise