Reference
AnalyticsClient
The entry point. 8 methods.
var analyticsClient = require('./AnalyticsClient');
var clientId = '1000.xxxxxxx';
var clientSecret = 'xxxxxxx';
var refreshToken = '1000.xxxxxxx.xxxxxxx';
var ac = new analyticsClient(clientId, clientSecret, refreshToken);AnalyticsClient exposes 8 methods. Method names are camelCase and identifiers are string.
Methods#
getBulkInstance, getOrgInstance, getViewInstance, getWorkspaceInstance, parseCSV, sendBatchImportRequest, sleep, stringifyCSV
getBulkInstance#
getBulkInstance(orgId, workspaceId)Returns a new BulkAPI instance.
| Parameter | Type | Description |
|---|---|---|
orgId | String | The ID of the organization. |
workspaceId | String | The ID of the workspace. |
getOrgInstance#
getOrgInstance(orgId)Returns a new OrgAPI instance.
| Parameter | Type | Description |
|---|---|---|
orgId | String | The ID of the organization. |
getViewInstance#
getViewInstance(orgId, workspaceId, viewId)Returns a new ViewAPI instance.
| Parameter | Type | Description |
|---|---|---|
orgId | String | The ID of the organization. |
workspaceId | String | The ID of the workspace. |
viewId | String | The ID of the view. |
getWorkspaceInstance#
getWorkspaceInstance(orgId, workspaceId)Returns a new WorkspaceAPI instance.
| Parameter | Type | Description |
|---|---|---|
orgId | String | The ID of the organization. |
workspaceId | String | The ID of the workspace. |
parseCSV#
parseCSV(content, delimiter = ',', quotechar = '"')sendBatchImportRequest#
sendBatchImportRequest(url, header, batch)sleep#
sleep(ms)stringifyCSV#
stringifyCSV(rows, delimiter = ',', quotechar = '"')