Client

Initialization

objectia(options)

Creates a new API client.

Arguments

The options object take one or more attributes:

Attribute Type Description Required
apiKey string You API key Yes
timeout number Connection timeout in seconds (default is 30 seconds)
logger object The client provides a logger facility, so you can attach your own logger. You can use the Console logger, or you can write your own custom logger (you must follow the same interface as the Console logger).

Returns

This call returns the API client object.

Example

const client = new objectia({
	apiKey: "your-api-key",
	logger: console  
})

Get version

client.getVersion()

Gets the API client version.

Arguments

None

Returns

This call returns the version number as a string.

Example

v = client.GetVersion()
console.log("Client version: " + v)   // prints "1.0.0"