zipscene-api-client
Version:
Zipscene API Client
550 lines • 19.9 kB
JSON
{
"project": {
"name": "zipscene-api-client",
"description": "ZS Library: zipscene-api-client",
"version": "4.0.6"
},
"files": {
"lib/zipscene-data-client.js": {
"name": "lib/zipscene-data-client.js",
"modules": {},
"classes": {
"ZipsceneDataClient": 1
},
"fors": {},
"namespaces": {}
},
"lib/zipscene-rpc-client.js": {
"name": "lib/zipscene-rpc-client.js",
"modules": {},
"classes": {
"ZipsceneRPCClient": 1
},
"fors": {},
"namespaces": {}
}
},
"modules": {},
"classes": {
"ZipsceneDataClient": {
"name": "ZipsceneDataClient",
"shortname": "ZipsceneDataClient",
"classitems": [],
"plugins": [],
"extensions": [],
"plugin_for": [],
"extension_for": [],
"file": "lib/zipscene-data-client.js",
"line": 8,
"description": "Client for accessing Zipscene DMP profile group data.",
"is_constructor": 1,
"params": [
{
"name": "rpcClient",
"description": "- The DMP RPC client to use",
"type": "ZipsceneRPCClient"
},
{
"name": "profileType",
"description": "- Profile type as it appears in method names (ie, \"person\")",
"type": "String"
},
{
"name": "options",
"description": "",
"type": "Object",
"optional": true
},
{
"name": "fileServiceClient",
"description": "- RPC client for the file service",
"type": "ZipsceneRPCClient"
}
]
},
"ZipsceneRPCClient": {
"name": "ZipsceneRPCClient",
"shortname": "ZipsceneRPCClient",
"classitems": [],
"plugins": [],
"extensions": [],
"plugin_for": [],
"extension_for": [],
"file": "lib/zipscene-rpc-client.js",
"line": 24,
"description": "This class passes jsonrpc requests to a server. It will authenticate\nwith a username and password. It will refresh an accessToken\nwhen it expires.",
"is_constructor": 1,
"params": [
{
"name": "settings",
"description": "- settings object for authentication and sever set up",
"type": "Object",
"props": [
{
"name": "server",
"description": "- the server location to make requests",
"type": "String"
},
{
"name": "authServer",
"description": "- the server to authenticate with when different from\n the server to make requests on.",
"type": "String"
},
{
"name": "email",
"description": "- The email address to authenticate with.",
"type": "String"
},
{
"name": "username",
"description": "- Alias for 'email'",
"type": "String"
},
{
"name": "password",
"description": "- the password to authenticate with",
"type": "String"
},
{
"name": "userNamespaceId",
"description": "- The user namespace the authenticated user belongs to.",
"type": "String"
},
{
"name": "accessToken",
"description": "- the accessToken to use to make requests",
"type": "String"
},
{
"name": "routeVersion",
"description": "- Version of RPC endpoint to use",
"type": "Number"
},
{
"name": "logRequests",
"description": "- If true, log requests and responses to stderr",
"type": "Boolean"
}
]
}
],
"since": "v0.0.1"
}
},
"elements": {},
"classitems": [
{
"file": "lib/zipscene-data-client.js",
"line": 26,
"description": "Gets a single object by id.",
"itemtype": "method",
"name": "get",
"params": [
{
"name": "id",
"description": "",
"type": "String"
},
{
"name": "options",
"description": "",
"type": "Object",
"optional": true,
"props": [
{
"name": "fields",
"description": "",
"type": "String[]"
},
{
"name": "timeout",
"description": "",
"type": "Number"
}
]
}
],
"return": {
"description": "- The request object",
"type": "Object"
},
"class": "ZipsceneDataClient"
},
{
"file": "lib/zipscene-data-client.js",
"line": 43,
"description": "Executes a query.",
"itemtype": "method",
"name": "query",
"params": [
{
"name": "query",
"description": "",
"type": "Object"
},
{
"name": "options",
"description": "",
"type": "Object",
"optional": true,
"props": [
{
"name": "fields",
"description": "",
"type": "String[]"
},
{
"name": "sort",
"description": "",
"type": "String[]"
},
{
"name": "skip",
"description": "",
"type": "Number"
},
{
"name": "limit",
"description": "",
"type": "Number"
},
{
"name": "timeout",
"description": "",
"type": "Number"
}
]
}
],
"return": {
"description": "- Array of results",
"type": "Object[]"
},
"class": "ZipsceneDataClient"
},
{
"file": "lib/zipscene-data-client.js",
"line": 64,
"description": "Exports a DMP data stream.",
"itemtype": "method",
"name": "export",
"params": [
{
"name": "query",
"description": "",
"type": "Object"
},
{
"name": "options",
"description": "",
"type": "Object",
"optional": true,
"props": [
{
"name": "fields",
"description": "",
"type": "String[]"
},
{
"name": "sort",
"description": "",
"type": "String[]"
},
{
"name": "limit",
"description": "",
"type": "Number"
},
{
"name": "timeout",
"description": "",
"type": "Number"
},
{
"name": "strategy",
"description": "- Export strategy, either 'file' to download via file service or 'stream' to stream directly from DMP",
"type": "String"
}
]
}
],
"return": {
"description": "- A readable object stream",
"type": "Readable"
},
"class": "ZipsceneDataClient"
},
{
"file": "lib/zipscene-data-client.js",
"line": 176,
"description": "Executes a count.",
"itemtype": "method",
"name": "count",
"params": [
{
"name": "query",
"description": "",
"type": "Object"
},
{
"name": "[options}",
"description": "",
"type": "Object"
},
{
"name": "options.timeout",
"description": "",
"type": "Number"
}
],
"return": {
"description": "",
"type": "Number"
},
"class": "ZipsceneDataClient"
},
{
"file": "lib/zipscene-data-client.js",
"line": 192,
"description": "Executes one or more aggregates.",
"itemtype": "method",
"name": "aggregate",
"params": [
{
"name": "query",
"description": "",
"type": "Object"
},
{
"name": "agg",
"description": "- Aggregate spec, or array of aggregate specs",
"type": "Object|Object[]"
},
{
"name": "options",
"description": "",
"type": "Object",
"optional": true,
"props": [
{
"name": "sort",
"description": "",
"type": "String[]"
},
{
"name": "limit",
"description": "",
"type": "Number"
},
{
"name": "scanLimit",
"description": "",
"type": "Number"
},
{
"name": "timeout",
"description": "",
"type": "Number"
}
]
}
],
"return": {
"description": "- Aggregate results, or array of aggregate results if 'agg' is an array",
"type": "Mixed"
},
"class": "ZipsceneDataClient"
},
{
"file": "lib/zipscene-rpc-client.js",
"line": 90,
"description": "This function tries to set the access token before making requests.",
"itemtype": "method",
"name": "authenticate",
"since": "v0.0.1",
"params": [
{
"name": "expired",
"description": "- If this is called because of an expired access token, set this flag.",
"type": "Boolean"
}
],
"class": "ZipsceneRPCClient"
},
{
"file": "lib/zipscene-rpc-client.js",
"line": 187,
"description": "Construct the URL to which JSONRPC requests will be placed.",
"itemtype": "method",
"name": "getUrl",
"params": [
{
"name": "options",
"description": "",
"type": "Object",
"optional": true,
"optdefault": "{}",
"props": [
{
"name": "auth",
"description": "- Returns the auth server URL instead of the main server.",
"type": "Boolean",
"optional": true,
"optdefault": "false"
}
]
}
],
"since": "v0.0.1",
"class": "ZipsceneRPCClient"
},
{
"file": "lib/zipscene-rpc-client.js",
"line": 207,
"description": "This takes the current accessToken and turns it in to the Bearer Authorization token",
"itemtype": "method",
"name": "createBearerHeader",
"params": [
{
"name": "accessToken",
"description": "- the access token",
"type": "String"
}
],
"since": "v0.0.1",
"class": "ZipsceneRPCClient"
},
{
"file": "lib/zipscene-rpc-client.js",
"line": 219,
"description": "Makes a request to the json-rpc service, handling authentication if necessary",
"itemtype": "method",
"name": "request",
"params": [
{
"name": "method",
"description": "- the api method to call, in dot notation",
"type": "String"
},
{
"name": "params",
"description": "- the params for this api method",
"type": "Object"
},
{
"name": "opts",
"description": "",
"type": "Object",
"optional": true,
"props": [
{
"name": "exHeaders",
"description": "- Object containing additional headers to use for the request.",
"type": "Object",
"optional": true
},
{
"name": "maxRetries",
"description": "- Number of times to retry the req",
"type": "Number",
"optional": true
},
{
"name": "noReauth",
"description": "- Throw token_expired errors instead of reauthenticating.",
"type": "Boolean",
"optional": true
}
]
},
{
"name": "id",
"description": "- the id to use for the request",
"type": "Number",
"optional": true,
"optdefault": "requestCounter++"
}
],
"return": {
"description": "- resolves with the response that contains an object { error, result, id }",
"type": "Promise"
},
"since": "v0.0.1",
"class": "ZipsceneRPCClient"
},
{
"file": "lib/zipscene-rpc-client.js",
"line": 304,
"description": "Make a request to an endpoint that returns streaming data rather than the standard JSONRPC format. Data will\nbe returned as a readable zstream of parsed objects.",
"itemtype": "method",
"name": "requestStream",
"params": [
{
"name": "method",
"description": "- the api method to call",
"type": "String"
},
{
"name": "params",
"description": "- the params for this api method",
"type": "Object"
},
{
"name": "opts",
"description": "",
"type": "Object"
},
{
"name": "id",
"description": "- the id to use for the request",
"type": "Number",
"optional": true,
"optdefault": "requestCounter++"
}
],
"return": {
"description": "- returns a passthrough stream that will recieve data\n when the request comes back.",
"type": "zstreams.PassThrough"
},
"since": "v0.0.1",
"class": "ZipsceneRPCClient"
},
{
"file": "lib/zipscene-rpc-client.js",
"line": 428,
"description": "Make a request to an endpoint that returns streaming data rather than the standard JSONRPC format. Data will\nbe returned as a plain data stream.",
"itemtype": "method",
"name": "requestRaw",
"params": [
{
"name": "method",
"description": "- the api method to call",
"type": "String"
},
{
"name": "params",
"description": "- the params for this api method",
"type": "Object"
},
{
"name": "opts",
"description": "",
"type": "Object"
},
{
"name": "id",
"description": "- the id to use for the request",
"type": "Number",
"optional": true,
"optdefault": "requestCounter++"
}
],
"return": {
"description": "",
"type": "Readable"
},
"class": "ZipsceneRPCClient"
}
],
"warnings": []
}