Global

Type Definitions

collectionCallback(error, items, meta, response)

A callback passed a collection of items, such as traffic updates.
Parameters:
Name Type Description
error Error error object
items Array array of items
meta Object meta-data concerning the items
response Object actual response object
Source:

Endpoint

String representing an endpoint. This is solely used internally by the SDK.
Type:
  • String
Source:

itemCallback(error, item, meta, response)

A callack passed a single item, such as a single traffic update.
Parameters:
Name Type Description
error Error error object
item Object the single item
meta Object meta-data concerning the item
response Object actual response object
Source:

itemsGetOneRequest(identifier, paramsopt, callback)

Sends a GET request, to fetch a single item.
Parameters:
Name Type Attributes Description
identifier Number | Object ID of the item
params Object <optional>
parameters
callback itemCallback
Source:

itemsGetRequest(paramsopt, callback)

Sends a GET request to fetch an array of items.
Parameters:
Name Type Attributes Description
params Object <optional>
parameters
callback collectionCallback
Source:

itemsPostOneRequest(body, callback)

Sends a POST request, usually for creating and updating entities.
Parameters:
Name Type Description
body Object parameters
callback successCallback
Source:

SETTINGS

Settings for the SDK. Defaults can be found in the config.json file in root of repo. This is to be passed to utils.setup().
Type:
  • Object
Properties:
Name Type Description
baseurl String API base url
enforce_params_filter Boolean whether to pick parameters before sending requests
request Object configures requests fired by SDK
Properties
Name Type Description
strictSSL Boolean whether to enable strict ssl
json Boolean whether to return responses in JSON format
Source:
See:

SSEClientFactory(initDict) → {EventSource}

Creates and returns a SSE Client.
Parameters:
Name Type Description
initDict Object initialization options
Source:
Returns:
Type
EventSource

successCallback(error, indicator, response)

A callack passed a success indicator
Parameters:
Name Type Description
error Error error object
indicator Object status of the operation
Properties
Name Type Attributes Description
success Boolean whether the operation succeeded
message Boolean message from the API
object Object <optional>
affected object
response Object actual response object
Source: