@spider-cloud/spider-client 0.0.61 → 0.0.63

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/client.js CHANGED
@@ -220,7 +220,7 @@ class Spider {
220
220
  * @returns {Promise<any>} The current credit balance.
221
221
  */
222
222
  async getCredits() {
223
- return this._apiGet("data/credits");
223
+ return this._apiGet(config_1.APIRoutes.DataCredits);
224
224
  }
225
225
  /**
226
226
  * Send a POST request to insert data into a specified table.
package/dist/config.d.ts CHANGED
@@ -208,9 +208,9 @@ export interface SpiderParams {
208
208
  */
209
209
  respect_robots?: boolean;
210
210
  /**
211
- * CSS selector to be used to filter the content.
211
+ * CSS root selector to be used to filter the content.
212
212
  */
213
- query_selector?: string;
213
+ root_selector?: string;
214
214
  /**
215
215
  * Specifies whether to load all resources of the crawl target.
216
216
  */
@@ -287,7 +287,8 @@ export declare enum APIRoutes {
287
287
  DataCrawlState = "data/crawl_state",
288
288
  DataSignUrl = "data/sign-url",
289
289
  DataDownload = "data/download",
290
- DataQuery = "data/query"
290
+ DataQuery = "data/query",
291
+ DataCredits = "data/credits"
291
292
  }
292
293
  export declare const APISchema: {
293
294
  url: string;
package/dist/config.js CHANGED
@@ -48,6 +48,8 @@ var APIRoutes;
48
48
  APIRoutes["DataDownload"] = "data/download";
49
49
  // Perform a query on the global database to grab content without crawling if available.
50
50
  APIRoutes["DataQuery"] = "data/query";
51
+ // Get the credits remaining for an account.
52
+ APIRoutes["DataCredits"] = "data/credits";
51
53
  })(APIRoutes || (exports.APIRoutes = APIRoutes = {}));
52
54
  // The base API target info for Spider Cloud.
53
55
  exports.APISchema = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spider-cloud/spider-client",
3
- "version": "0.0.61",
3
+ "version": "0.0.63",
4
4
  "description": "Isomorphic Javascript SDK for Spider Cloud services",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test __tests__/*test.ts",