socialtap 1.572.31 → 1.573.31
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 +2 -1
- package/dist/constants.d.ts +6 -1
- package/dist/constants.js +2 -1
- package/dist/errors.d.ts +11 -0
- package/dist/errors.js +11 -0
- package/dist/resources.d.ts +2 -1
- package/dist/resources.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
SocialTap is the social media scraper API for developers and AI agents. Send a public link, a handle or a search and get live data back in one schema. Failed requests are free.
|
|
6
6
|
|
|
7
7
|
The TypeScript SDK for the SocialTap API: a method for every endpoint, typed models and errors, retries and pagination.
|
|
8
|
-
Generated from the SocialTap catalog (version 1.
|
|
8
|
+
Generated from the SocialTap catalog (version 1.573.31). Docs: https://socialtap.dev/docs.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
@@ -426,6 +426,7 @@ try {
|
|
|
426
426
|
| `no_live` | `NoLiveError` | 404 | no |
|
|
427
427
|
| `no_media` | `NoMediaError` | 404 | no |
|
|
428
428
|
| `no_readme` | `NoReadmeError` | 404 | no |
|
|
429
|
+
| `unavailable_for_legal_reasons` | `UnavailableForLegalReasonsError` | 451 | no |
|
|
429
430
|
| `upstream_blocked` | `UpstreamBlockedError` | 503 | yes |
|
|
430
431
|
| `upstream_error` | `UpstreamError` | 502 | yes |
|
|
431
432
|
| `overloaded` | `OverloadedError` | 503 | yes |
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** SDK version: 1.<contract facts>.<generator revision> (sdk/README.md). */
|
|
2
|
-
export declare const VERSION = "1.
|
|
2
|
+
export declare const VERSION = "1.573.31";
|
|
3
3
|
/** The production API origin. */
|
|
4
4
|
export declare const DEFAULT_BASE_URL = "https://socialtap.dev";
|
|
5
5
|
/** Environment variable the API key is read from. */
|
|
@@ -124,6 +124,11 @@ export declare const ERROR_CODES: {
|
|
|
124
124
|
readonly retryable: false;
|
|
125
125
|
readonly remediation: "Do not retry. Fetch the repository itself for its description.";
|
|
126
126
|
};
|
|
127
|
+
readonly unavailable_for_legal_reasons: {
|
|
128
|
+
readonly status: 451;
|
|
129
|
+
readonly retryable: false;
|
|
130
|
+
readonly remediation: "Do not retry. The item stays unavailable unless the notice is withdrawn.";
|
|
131
|
+
};
|
|
127
132
|
readonly upstream_blocked: {
|
|
128
133
|
readonly status: 503;
|
|
129
134
|
readonly retryable: true;
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by engine/cmd/gensdk (make gen) from catalog/catalog.gen.json; DO NOT EDIT.
|
|
2
2
|
/** SDK version: 1.<contract facts>.<generator revision> (sdk/README.md). */
|
|
3
|
-
export const VERSION = "1.
|
|
3
|
+
export const VERSION = "1.573.31";
|
|
4
4
|
/** The production API origin. */
|
|
5
5
|
export const DEFAULT_BASE_URL = "https://socialtap.dev";
|
|
6
6
|
/** Environment variable the API key is read from. */
|
|
@@ -45,6 +45,7 @@ export const ERROR_CODES = {
|
|
|
45
45
|
no_live: { status: 404, retryable: false, remediation: "Do not retry now. Ask again later, when the account may be live." },
|
|
46
46
|
no_media: { status: 404, retryable: false, remediation: "Do not retry. Fetch the post itself for its text and links." },
|
|
47
47
|
no_readme: { status: 404, retryable: false, remediation: "Do not retry. Fetch the repository itself for its description." },
|
|
48
|
+
unavailable_for_legal_reasons: { status: 451, retryable: false, remediation: "Do not retry. The item stays unavailable unless the notice is withdrawn." },
|
|
48
49
|
upstream_blocked: { status: 503, retryable: true, remediation: "Retry later with backoff. Failed requests are free." },
|
|
49
50
|
upstream_error: { status: 502, retryable: true, remediation: "Retry with backoff. Failed requests are free." },
|
|
50
51
|
overloaded: { status: 503, retryable: true, remediation: "Retry after the seconds in the retry-after header. Failed requests are free." },
|
package/dist/errors.d.ts
CHANGED
|
@@ -190,6 +190,16 @@ export declare class NoMediaError extends APIError {
|
|
|
190
190
|
export declare class NoReadmeError extends APIError {
|
|
191
191
|
name: string;
|
|
192
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* `unavailable_for_legal_reasons` (HTTP 451): We removed this item after a copyright notice or another legal
|
|
195
|
+
* request, so we don't return it. The request was free. A list leaves such items out instead, with an
|
|
196
|
+
* items_omitted warning.
|
|
197
|
+
*
|
|
198
|
+
* Remediation: Do not retry. The item stays unavailable unless the notice is withdrawn.
|
|
199
|
+
*/
|
|
200
|
+
export declare class UnavailableForLegalReasonsError extends APIError {
|
|
201
|
+
name: string;
|
|
202
|
+
}
|
|
193
203
|
/**
|
|
194
204
|
* `upstream_blocked` (HTTP 503): The platform refused every attempt, our own retries included.
|
|
195
205
|
*
|
|
@@ -245,6 +255,7 @@ export declare const ERROR_CLASSES: {
|
|
|
245
255
|
readonly no_live: typeof NoLiveError;
|
|
246
256
|
readonly no_media: typeof NoMediaError;
|
|
247
257
|
readonly no_readme: typeof NoReadmeError;
|
|
258
|
+
readonly unavailable_for_legal_reasons: typeof UnavailableForLegalReasonsError;
|
|
248
259
|
readonly upstream_blocked: typeof UpstreamBlockedError;
|
|
249
260
|
readonly upstream_error: typeof UpstreamError;
|
|
250
261
|
readonly overloaded: typeof OverloadedError;
|
package/dist/errors.js
CHANGED
|
@@ -192,6 +192,16 @@ export class NoMediaError extends APIError {
|
|
|
192
192
|
export class NoReadmeError extends APIError {
|
|
193
193
|
name = "NoReadmeError";
|
|
194
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* `unavailable_for_legal_reasons` (HTTP 451): We removed this item after a copyright notice or another legal
|
|
197
|
+
* request, so we don't return it. The request was free. A list leaves such items out instead, with an
|
|
198
|
+
* items_omitted warning.
|
|
199
|
+
*
|
|
200
|
+
* Remediation: Do not retry. The item stays unavailable unless the notice is withdrawn.
|
|
201
|
+
*/
|
|
202
|
+
export class UnavailableForLegalReasonsError extends APIError {
|
|
203
|
+
name = "UnavailableForLegalReasonsError";
|
|
204
|
+
}
|
|
195
205
|
/**
|
|
196
206
|
* `upstream_blocked` (HTTP 503): The platform refused every attempt, our own retries included.
|
|
197
207
|
*
|
|
@@ -247,6 +257,7 @@ export const ERROR_CLASSES = {
|
|
|
247
257
|
no_live: NoLiveError,
|
|
248
258
|
no_media: NoMediaError,
|
|
249
259
|
no_readme: NoReadmeError,
|
|
260
|
+
unavailable_for_legal_reasons: UnavailableForLegalReasonsError,
|
|
250
261
|
upstream_blocked: UpstreamBlockedError,
|
|
251
262
|
upstream_error: UpstreamError,
|
|
252
263
|
overloaded: OverloadedError,
|
package/dist/resources.d.ts
CHANGED
|
@@ -19618,7 +19618,8 @@ export declare class RequestsResource {
|
|
|
19618
19618
|
*
|
|
19619
19619
|
* The body and status a request returned, without running it again: kept only while keep_response_bodies is on,
|
|
19620
19620
|
* for `response_body_retention_s`, at most `response_body_max_bytes` each; otherwise not_found (details.reason).
|
|
19621
|
-
*
|
|
19621
|
+
* A body about an item since removed after a legal request answers unavailable_for_legal_reasons, and a list's
|
|
19622
|
+
* removed items are left out. Free.
|
|
19622
19623
|
*
|
|
19623
19624
|
* Free; needs an API key with the `account:read` scope (GET /v1/requests/{id}/response).
|
|
19624
19625
|
*/
|
package/dist/resources.js
CHANGED
|
@@ -4720,7 +4720,8 @@ export class RequestsResource {
|
|
|
4720
4720
|
*
|
|
4721
4721
|
* The body and status a request returned, without running it again: kept only while keep_response_bodies is on,
|
|
4722
4722
|
* for `response_body_retention_s`, at most `response_body_max_bytes` each; otherwise not_found (details.reason).
|
|
4723
|
-
*
|
|
4723
|
+
* A body about an item since removed after a legal request answers unavailable_for_legal_reasons, and a list's
|
|
4724
|
+
* removed items are left out. Free.
|
|
4724
4725
|
*
|
|
4725
4726
|
* Free; needs an API key with the `account:read` scope (GET /v1/requests/{id}/response).
|
|
4726
4727
|
*/
|