Kind: global class
string
BaseAPIClient~logFn
BaseAPIClient~transportFn
Object
Base client for both the RTM and web APIs.
Param | Type | Default | Description |
---|---|---|---|
token | string |
The Slack API token to use with this client. | |
[opts] | Object |
||
[opts.slackAPIUrl] | string |
"https://slack.com/api/" |
The Slack API URL. |
[opts.transport] | BaseAPIClient~transportFn |
Function to call to make an HTTP call to the Slack API. | |
[opts.logLevel] | string |
"info" |
The log level for the logger. |
[opts.logger] | BaseAPIClient~logFn |
Function to use for log calls, takes (logLevel, logString) params. | |
[opts.maxRequestConcurrency] | number |
3 |
The max # of concurrent requests to make to Slack’s API |
[opts.retryConfig] | Object |
The configuration to use for the retry operation, see node-retry for more details. |
string
Kind: instance property of [BaseAPIClient](#BaseAPIClient)
BaseAPIClient~logFn
The logger function attached to this client.
Kind: instance property of [BaseAPIClient](#BaseAPIClient)
BaseAPIClient~transportFn
Kind: instance property of [BaseAPIClient](#BaseAPIClient)
Object
Default to retrying forever with an exponential backoff, capped at thirty minutes but with some randomization.
Kind: instance property of [BaseAPIClient](#BaseAPIClient)
Initializes each of the API facets.
Kind: instance method of [BaseAPIClient](#BaseAPIClient)
Access: protected
Deprecated
Attaches a data-store to the client instance.
Kind: instance method of [BaseAPIClient](#BaseAPIClient)
Param | Type |
---|---|
dataStore | [SlackDataStore](#SlackDataStore) |
Calls the supplied transport function and processes the results.
This will also manage 429 responses and retry failed operations.
Kind: instance method of [BaseAPIClient](#BaseAPIClient)
Access: protected
Param | Type | Description |
---|---|---|
task | Object |
The arguments to pass to the transport. |
queueCb | function |
Callback to signal to the request queue that the request has completed. |