ensembledata 0.1.0 → 0.1.4
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 +4 -4
- package/package.json +3 -2
- package/src/client.js +287 -105
- package/src/requester.js +7 -8
- package/src/version.js +1 -1
- package/types/client.d.ts +103 -100
- package/types/client.d.ts.map +1 -1
- package/types/requester.d.ts +5 -5
- package/types/requester.d.ts.map +1 -1
- package/types/version.d.ts +1 -1
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ try {
|
|
|
95
95
|
username: "daviddobrik",
|
|
96
96
|
});
|
|
97
97
|
} catch (error) {
|
|
98
|
-
switch (error.
|
|
98
|
+
switch (error.statusCode) {
|
|
99
99
|
// Rate limit exceeded...
|
|
100
100
|
case errors.STATUS_429_RATE_LIMIT_EXCEEDED:
|
|
101
101
|
console.log(error.detail);
|
|
@@ -149,15 +149,15 @@ const client = EDClient({ token: "API-TOKEN", maxNetworkRetries: 5 });
|
|
|
149
149
|
|
|
150
150
|
### Configure Timeout
|
|
151
151
|
|
|
152
|
-
If you would like control over the
|
|
152
|
+
If you would like control over the timeout, you can configure this either for all request by setting `timeout` (in seconds) when creating the `EDClient`, or you can specify the `timeout` per request, on any of the individual methods as shown below:
|
|
153
153
|
|
|
154
154
|
```javascript
|
|
155
155
|
import { EDClient } from "ensembledata";
|
|
156
156
|
|
|
157
|
-
const client = EDClient({ token: "API-TOKEN",
|
|
157
|
+
const client = EDClient({ token: "API-TOKEN", timeout: 120 });
|
|
158
158
|
const result = await client.instagram.userInfo(
|
|
159
159
|
{ username: "..." },
|
|
160
|
-
{
|
|
160
|
+
{ timeout: 10 },
|
|
161
161
|
);
|
|
162
162
|
```
|
|
163
163
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ensembledata",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Node.js bindings for the EnsembleData API",
|
|
5
5
|
"author": "EnsembleData <hello@ensembledata.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@eslint/js": "^9.8.0",
|
|
21
21
|
"eslint-config-prettier": "^9.1.0",
|
|
22
|
+
"globals": "^15.9.0",
|
|
22
23
|
"nunjucks": "^3.2.4",
|
|
23
24
|
"prettier": "3.3.3",
|
|
24
25
|
"prettier-plugin-jsdoc": "^1.3.0",
|
|
25
26
|
"typescript": "^5.5.4"
|
|
26
27
|
},
|
|
27
28
|
"scripts": {
|
|
28
|
-
"
|
|
29
|
+
"version": "./scripts/sync_version.sh $npm_package_version"
|
|
29
30
|
}
|
|
30
31
|
}
|