@spider-cloud/spider-client 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/spiderwebai.d.ts +2 -2
- package/dist/spiderwebai.js +3 -3
- package/package.json +1 -1
package/dist/spiderwebai.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/**
|
|
3
|
-
* A class to interact with the
|
|
3
|
+
* A class to interact with the Spider API.
|
|
4
4
|
*/
|
|
5
5
|
export default class Spider {
|
|
6
6
|
private apiKey?;
|
|
7
7
|
/**
|
|
8
8
|
* Create an instance of Spider.
|
|
9
|
-
* @param {string | null} apiKey - The API key used to authenticate to the
|
|
9
|
+
* @param {string | null} apiKey - The API key used to authenticate to the Spider API. If null, attempts to source from environment variables.
|
|
10
10
|
* @throws Will throw an error if the API key is not provided.
|
|
11
11
|
*/
|
|
12
12
|
constructor(apiKey?: string);
|
package/dist/spiderwebai.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
/**
|
|
4
|
-
* A class to interact with the
|
|
4
|
+
* A class to interact with the Spider API.
|
|
5
5
|
*/
|
|
6
6
|
class Spider {
|
|
7
7
|
/**
|
|
8
8
|
* Create an instance of Spider.
|
|
9
|
-
* @param {string | null} apiKey - The API key used to authenticate to the
|
|
9
|
+
* @param {string | null} apiKey - The API key used to authenticate to the Spider API. If null, attempts to source from environment variables.
|
|
10
10
|
* @throws Will throw an error if the API key is not provided.
|
|
11
11
|
*/
|
|
12
12
|
constructor(apiKey) {
|
|
@@ -119,7 +119,7 @@ class Spider {
|
|
|
119
119
|
* @returns {Promise<any>} The crawl state data.
|
|
120
120
|
*/
|
|
121
121
|
async getCrawlState(url, params = {}) {
|
|
122
|
-
return this._apiPost("crawl
|
|
122
|
+
return this._apiPost("crawl/status", { url: url, ...params });
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Retrieves the number of credits available on the account.
|