@spider-cloud/spider-client 0.0.35 → 0.0.36

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/README.md CHANGED
@@ -93,13 +93,13 @@ spider
93
93
 
94
94
  #### Download storage data
95
95
 
96
- To download stored data like raw HTML or markdown use the `downloadFiles` method. Provide the website name and an object containing query parameters:
96
+ To download stored data like raw HTML or markdown use the `createSignedUrl` method. Provide the website name and an object containing query parameters:
97
97
 
98
98
  ```javascript
99
99
  const websiteName = "spider.cloud";
100
100
  const queryParams = { limit: 20, page: 0 };
101
101
  spider
102
- .downloadFiles(websiteName, queryParams)
102
+ .createSignedUrl(websiteName, queryParams)
103
103
  .then((response) => console.log(response))
104
104
  .catch((error) => console.error(error));
105
105
  ```
@@ -118,7 +118,7 @@ spider
118
118
  - **`getCredits()`**: Retrieve account's remaining credits.
119
119
  - **`getData(table, params)`**: Retrieve data records from the DB.
120
120
  - **`deleteData(table, params)`**: Delete records from the DB.
121
- - **`downloadFiles(domain, params)`**: Download the records from the DB.
121
+ - **`createSignedUrl(domain, params)`**: Download the records from the DB.
122
122
 
123
123
  ## Error Handling
124
124
 
package/dist/client.d.ts CHANGED
@@ -108,14 +108,14 @@ export declare class Spider {
108
108
  */
109
109
  getCrawlState(url: string, params?: GenericParams): Promise<any>;
110
110
  /**
111
- * Downloads files from the specified user's storage. This will create signed URLS to use.
111
+ * Create a signed url to download files from the storage.
112
112
  * @param {string} [domain] - The domain for the user's storage. If not provided, downloads all files.
113
113
  * @param {Object} [options] - The download options.
114
114
  * @param {boolean} [raw] - Return the raw response.
115
115
 
116
116
  * @returns {Promise<Response>} The response containing the file stream.
117
117
  */
118
- downloadFiles(domain?: string, options?: {
118
+ createSignedUrl(domain?: string, options?: {
119
119
  page?: number;
120
120
  limit?: number;
121
121
  expiresIn?: number;
package/dist/client.js CHANGED
@@ -161,14 +161,14 @@ class Spider {
161
161
  return this._apiPost("data/crawl_state", { url: url, ...params });
162
162
  }
163
163
  /**
164
- * Downloads files from the specified user's storage. This will create signed URLS to use.
164
+ * Create a signed url to download files from the storage.
165
165
  * @param {string} [domain] - The domain for the user's storage. If not provided, downloads all files.
166
166
  * @param {Object} [options] - The download options.
167
167
  * @param {boolean} [raw] - Return the raw response.
168
168
 
169
169
  * @returns {Promise<Response>} The response containing the file stream.
170
170
  */
171
- async downloadFiles(domain, options, raw) {
171
+ async createSignedUrl(domain, options, raw) {
172
172
  const { page, limit, expiresIn } = options !== null && options !== void 0 ? options : {};
173
173
  const params = new URLSearchParams({
174
174
  ...(domain && { domain }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spider-cloud/spider-client",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "description": "A Javascript SDK for Spider Cloud services",
5
5
  "scripts": {
6
6
  "test": "jest",