socialtap 1.571.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 +17 -1
- package/dist/client.d.ts +19 -16
- package/dist/client.js +20 -16
- package/dist/commands.js +205 -0
- 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/models.d.ts +106 -2
- package/dist/resources.d.ts +858 -4
- package/dist/resources.js +181 -1
- package/dist/tooldefs.d.ts +1 -1
- package/dist/tooldefs.js +319 -10
- 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
|
|
|
@@ -174,6 +174,17 @@ Every result also carries the envelope `meta` (request ID, source, cache status,
|
|
|
174
174
|
| `google.search_ads` | `client.google.searchAds.list()` | 1 credit |
|
|
175
175
|
| `google.search_advertisers` | `client.google.searchAdvertisers.list()` | 1 credit |
|
|
176
176
|
| `google.search_suggestions` | `client.google.searchSuggestions.list()` | 1 credit |
|
|
177
|
+
| `hackernews.comment` | `client.hackernews.comment.get()` | 1 credit |
|
|
178
|
+
| `hackernews.comments` | `client.hackernews.comments.list()` | 1 credit |
|
|
179
|
+
| `hackernews.feed_stories` | `client.hackernews.feedStories.list()` | 1 credit |
|
|
180
|
+
| `hackernews.search_comments` | `client.hackernews.searchComments.list()` | 1 credit |
|
|
181
|
+
| `hackernews.search_stories` | `client.hackernews.searchStories.list()` | 1 credit |
|
|
182
|
+
| `hackernews.story` | `client.hackernews.story.get()` | 1 credit |
|
|
183
|
+
| `hackernews.user` | `client.hackernews.user.get()` | 1 credit |
|
|
184
|
+
| `hackernews.user_comments` | `client.hackernews.userComments.list()` | 1 credit |
|
|
185
|
+
| `hackernews.user_favorites` | `client.hackernews.userFavorites.list()` | 1 credit |
|
|
186
|
+
| `hackernews.user_stories` | `client.hackernews.userStories.list()` | 1 credit |
|
|
187
|
+
| `hackernews.whoishiring_jobs` | `client.hackernews.whoishiringJobs.list()` | 1 credit |
|
|
177
188
|
| `instagram.comment` | `client.instagram.comment.get()` | 1 credit |
|
|
178
189
|
| `instagram.comments` | `client.instagram.comments.list()` | 1 credit |
|
|
179
190
|
| `instagram.embed` | `client.instagram.embed.get()` | 1 credit |
|
|
@@ -415,6 +426,7 @@ try {
|
|
|
415
426
|
| `no_live` | `NoLiveError` | 404 | no |
|
|
416
427
|
| `no_media` | `NoMediaError` | 404 | no |
|
|
417
428
|
| `no_readme` | `NoReadmeError` | 404 | no |
|
|
429
|
+
| `unavailable_for_legal_reasons` | `UnavailableForLegalReasonsError` | 451 | no |
|
|
418
430
|
| `upstream_blocked` | `UpstreamBlockedError` | 503 | yes |
|
|
419
431
|
| `upstream_error` | `UpstreamError` | 502 | yes |
|
|
420
432
|
| `overloaded` | `OverloadedError` | 503 | yes |
|
|
@@ -564,6 +576,7 @@ console.log(r.isError, r.output);
|
|
|
564
576
|
| `list_trending_posts` | Trending posts |
|
|
565
577
|
| `list_channel_posts` | Channel posts of a profile |
|
|
566
578
|
| `list_effect_posts` | Effect posts |
|
|
579
|
+
| `list_feed_posts` | Feed posts |
|
|
567
580
|
| `list_photos` | Photos of a profile |
|
|
568
581
|
| `list_pins` | Pins of a profile |
|
|
569
582
|
| `list_playlist_stories` | Playlist stories |
|
|
@@ -573,6 +586,8 @@ console.log(r.isError, r.output);
|
|
|
573
586
|
| `list_profile_mentions` | Profile mentions |
|
|
574
587
|
| `list_shop_posts` | Shop posts of a profile |
|
|
575
588
|
| `list_tracks` | Tracks of a profile |
|
|
589
|
+
| `list_user_favorites` | User favorites of a profile |
|
|
590
|
+
| `list_user_stories` | User stories of a profile |
|
|
576
591
|
| `list_videos` | Videos of a profile |
|
|
577
592
|
| `get_seller` | Seller by handle |
|
|
578
593
|
| `get_shop` | Shop by handle |
|
|
@@ -641,6 +656,7 @@ console.log(r.isError, r.output);
|
|
|
641
656
|
| `list_top_products` | Top products |
|
|
642
657
|
| `list_top_trends` | Top trends |
|
|
643
658
|
| `list_trending_repositories` | Trending repositories |
|
|
659
|
+
| `list_whoishiring_jobs` | Whoishiring jobs |
|
|
644
660
|
| `create_job` | Create a background job |
|
|
645
661
|
| `get_job` | Get a background job |
|
|
646
662
|
| `list_job_results` | List a job's results |
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ClientOptions, Core } from "./core.ts";
|
|
2
|
-
import { Amazon, AppleMusic, Bluesky, Facebook, GitHub, Google, Instagram, Kick, Komi, Kwai, LnkBio, LinkedIn, Linkme, Linktree, Pillar, Pinterest, Reddit, Rumble, Snapchat, SoundCloud, Spotify, Telegram, Threads, TikTok, TikTokShop, TruthSocial, Twitch, X, YouTube, AccountResource, UsageResource, CreditTransactionsResource, BillingResource, RequestsResource, ApiKeysResource, JobsResource, WebhookEndpointsResource, EventsResource, NotificationPreferencesResource } from "./resources.ts";
|
|
2
|
+
import { Amazon, AppleMusic, Bluesky, Facebook, GitHub, Google, HackerNews, Instagram, Kick, Komi, Kwai, LnkBio, LinkedIn, Linkme, Linktree, Pillar, Pinterest, Reddit, Rumble, Snapchat, SoundCloud, Spotify, Telegram, Threads, TikTok, TikTokShop, TruthSocial, Twitch, X, YouTube, AccountResource, UsageResource, CreditTransactionsResource, BillingResource, RequestsResource, ApiKeysResource, JobsResource, WebhookEndpointsResource, EventsResource, NotificationPreferencesResource } from "./resources.ts";
|
|
3
3
|
import { Webhooks } from "./webhooks.ts";
|
|
4
4
|
/**
|
|
5
5
|
* The SocialTap API client: `new SocialTap({ apiKey })` (default: the SOCIALTAP_API_KEY environment variable).
|
|
@@ -7,21 +7,22 @@ import { Webhooks } from "./webhooks.ts";
|
|
|
7
7
|
* SocialTap is the social media scraper API for developers and AI agents. Send a public link, a handle or a
|
|
8
8
|
* search and get live data back in one schema. Failed requests are free. Available now: activity on GitHub; ads
|
|
9
9
|
* on Facebook, Google, LinkedIn and TikTok; albums on Apple Music and Spotify; comments on Bluesky, Facebook,
|
|
10
|
-
* GitHub, Instagram, LinkedIn, Reddit, Rumble, Snapchat, Threads, TikTok, X and YouTube;
|
|
11
|
-
* Facebook, LinkedIn, Reddit and X; contribution calendars on GitHub; downloads on TikTok;
|
|
12
|
-
* embeds on Instagram; engagement stats on Facebook, Instagram, LinkedIn, Reddit, Rumble,
|
|
13
|
-
* events on Facebook; hashtags on Instagram and TikTok; issues on GitHub; jobs on
|
|
14
|
-
* TikTok, Twitch and X; offers on Amazon; places on Facebook and Instagram;
|
|
15
|
-
* Instagram, Pinterest, Spotify, TikTok and X; podcasts on Spotify; posts on
|
|
16
|
-
*
|
|
17
|
-
* Threads, TikTok, Truth Social, Twitch, X and YouTube;
|
|
18
|
-
* on Amazon,
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* GitHub;
|
|
22
|
-
* and TikTok;
|
|
23
|
-
* Rumble, TikTok, Twitch, X and YouTube;
|
|
24
|
-
* web results on Facebook, Instagram,
|
|
10
|
+
* GitHub, Hacker News, Instagram, LinkedIn, Reddit, Rumble, Snapchat, Threads, TikTok, X and YouTube;
|
|
11
|
+
* communities on Facebook, LinkedIn, Reddit and X; contribution calendars on GitHub; downloads on TikTok;
|
|
12
|
+
* effects on TikTok; embeds on Instagram; engagement stats on Facebook, Instagram, LinkedIn, Reddit, Rumble,
|
|
13
|
+
* TikTok, X and YouTube; events on Facebook; hashtags on Instagram and TikTok; issues on GitHub; jobs on Hacker
|
|
14
|
+
* News and LinkedIn; livestreams on TikTok, Twitch and X; offers on Amazon; places on Facebook and Instagram;
|
|
15
|
+
* playlists on Amazon, Apple Music, Instagram, Pinterest, Spotify, TikTok and X; podcasts on Spotify; posts on
|
|
16
|
+
* Amazon, Apple Music, Bluesky, Facebook, Hacker News, Instagram, Kick, Kwai, LinkedIn, Pinterest, Reddit,
|
|
17
|
+
* Rumble, Snapchat, SoundCloud, Spotify, Telegram, Threads, TikTok, Truth Social, Twitch, X and YouTube;
|
|
18
|
+
* products on Amazon, Facebook and TikTok Shop; profiles on Amazon, Apple Music, Bluesky, Facebook, GitHub,
|
|
19
|
+
* Google, Hacker News, Instagram, Komi, Kwai, LinkedIn, Linkme, Linktree, Lnk.Bio, Pillar, Pinterest, Reddit,
|
|
20
|
+
* Rumble, Snapchat, SoundCloud, Spotify, Telegram, Threads, TikTok, Truth Social, Twitch, X and YouTube; readmes
|
|
21
|
+
* on GitHub; relationships on X; releases on GitHub; repositories on GitHub; reviews on Amazon and TikTok Shop;
|
|
22
|
+
* sounds on Instagram and TikTok; suggestions on Google, Instagram and TikTok; topics on Instagram and
|
|
23
|
+
* Pinterest; transcripts on Facebook, Instagram, Kick, LinkedIn, Reddit, Rumble, TikTok, Twitch, X and YouTube;
|
|
24
|
+
* trends on Pinterest; usernames on Instagram; web pages on Pinterest; web results on Facebook, Instagram,
|
|
25
|
+
* LinkedIn, Telegram, TikTok and X.
|
|
25
26
|
*/
|
|
26
27
|
export declare class SocialTap extends Core {
|
|
27
28
|
/** Amazon endpoints. */
|
|
@@ -36,6 +37,8 @@ export declare class SocialTap extends Core {
|
|
|
36
37
|
readonly github: GitHub;
|
|
37
38
|
/** Google endpoints. */
|
|
38
39
|
readonly google: Google;
|
|
40
|
+
/** Hacker News endpoints. */
|
|
41
|
+
readonly hackernews: HackerNews;
|
|
39
42
|
/** Instagram endpoints. */
|
|
40
43
|
readonly instagram: Instagram;
|
|
41
44
|
/** Kick endpoints. */
|
package/dist/client.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
|
import { Core } from "./core.js";
|
|
3
|
-
import { Amazon, AppleMusic, Bluesky, Facebook, GitHub, Google, Instagram, Kick, Komi, Kwai, LnkBio, LinkedIn, Linkme, Linktree, Pillar, Pinterest, Reddit, Rumble, Snapchat, SoundCloud, Spotify, Telegram, Threads, TikTok, TikTokShop, TruthSocial, Twitch, X, YouTube, AccountResource, UsageResource, CreditTransactionsResource, BillingResource, RequestsResource, ApiKeysResource, JobsResource, WebhookEndpointsResource, EventsResource, NotificationPreferencesResource } from "./resources.js";
|
|
3
|
+
import { Amazon, AppleMusic, Bluesky, Facebook, GitHub, Google, HackerNews, Instagram, Kick, Komi, Kwai, LnkBio, LinkedIn, Linkme, Linktree, Pillar, Pinterest, Reddit, Rumble, Snapchat, SoundCloud, Spotify, Telegram, Threads, TikTok, TikTokShop, TruthSocial, Twitch, X, YouTube, AccountResource, UsageResource, CreditTransactionsResource, BillingResource, RequestsResource, ApiKeysResource, JobsResource, WebhookEndpointsResource, EventsResource, NotificationPreferencesResource } from "./resources.js";
|
|
4
4
|
import { Webhooks } from "./webhooks.js";
|
|
5
5
|
/**
|
|
6
6
|
* The SocialTap API client: `new SocialTap({ apiKey })` (default: the SOCIALTAP_API_KEY environment variable).
|
|
@@ -8,21 +8,22 @@ import { Webhooks } from "./webhooks.js";
|
|
|
8
8
|
* SocialTap is the social media scraper API for developers and AI agents. Send a public link, a handle or a
|
|
9
9
|
* search and get live data back in one schema. Failed requests are free. Available now: activity on GitHub; ads
|
|
10
10
|
* on Facebook, Google, LinkedIn and TikTok; albums on Apple Music and Spotify; comments on Bluesky, Facebook,
|
|
11
|
-
* GitHub, Instagram, LinkedIn, Reddit, Rumble, Snapchat, Threads, TikTok, X and YouTube;
|
|
12
|
-
* Facebook, LinkedIn, Reddit and X; contribution calendars on GitHub; downloads on TikTok;
|
|
13
|
-
* embeds on Instagram; engagement stats on Facebook, Instagram, LinkedIn, Reddit, Rumble,
|
|
14
|
-
* events on Facebook; hashtags on Instagram and TikTok; issues on GitHub; jobs on
|
|
15
|
-
* TikTok, Twitch and X; offers on Amazon; places on Facebook and Instagram;
|
|
16
|
-
* Instagram, Pinterest, Spotify, TikTok and X; podcasts on Spotify; posts on
|
|
17
|
-
*
|
|
18
|
-
* Threads, TikTok, Truth Social, Twitch, X and YouTube;
|
|
19
|
-
* on Amazon,
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* GitHub;
|
|
23
|
-
* and TikTok;
|
|
24
|
-
* Rumble, TikTok, Twitch, X and YouTube;
|
|
25
|
-
* web results on Facebook, Instagram,
|
|
11
|
+
* GitHub, Hacker News, Instagram, LinkedIn, Reddit, Rumble, Snapchat, Threads, TikTok, X and YouTube;
|
|
12
|
+
* communities on Facebook, LinkedIn, Reddit and X; contribution calendars on GitHub; downloads on TikTok;
|
|
13
|
+
* effects on TikTok; embeds on Instagram; engagement stats on Facebook, Instagram, LinkedIn, Reddit, Rumble,
|
|
14
|
+
* TikTok, X and YouTube; events on Facebook; hashtags on Instagram and TikTok; issues on GitHub; jobs on Hacker
|
|
15
|
+
* News and LinkedIn; livestreams on TikTok, Twitch and X; offers on Amazon; places on Facebook and Instagram;
|
|
16
|
+
* playlists on Amazon, Apple Music, Instagram, Pinterest, Spotify, TikTok and X; podcasts on Spotify; posts on
|
|
17
|
+
* Amazon, Apple Music, Bluesky, Facebook, Hacker News, Instagram, Kick, Kwai, LinkedIn, Pinterest, Reddit,
|
|
18
|
+
* Rumble, Snapchat, SoundCloud, Spotify, Telegram, Threads, TikTok, Truth Social, Twitch, X and YouTube;
|
|
19
|
+
* products on Amazon, Facebook and TikTok Shop; profiles on Amazon, Apple Music, Bluesky, Facebook, GitHub,
|
|
20
|
+
* Google, Hacker News, Instagram, Komi, Kwai, LinkedIn, Linkme, Linktree, Lnk.Bio, Pillar, Pinterest, Reddit,
|
|
21
|
+
* Rumble, Snapchat, SoundCloud, Spotify, Telegram, Threads, TikTok, Truth Social, Twitch, X and YouTube; readmes
|
|
22
|
+
* on GitHub; relationships on X; releases on GitHub; repositories on GitHub; reviews on Amazon and TikTok Shop;
|
|
23
|
+
* sounds on Instagram and TikTok; suggestions on Google, Instagram and TikTok; topics on Instagram and
|
|
24
|
+
* Pinterest; transcripts on Facebook, Instagram, Kick, LinkedIn, Reddit, Rumble, TikTok, Twitch, X and YouTube;
|
|
25
|
+
* trends on Pinterest; usernames on Instagram; web pages on Pinterest; web results on Facebook, Instagram,
|
|
26
|
+
* LinkedIn, Telegram, TikTok and X.
|
|
26
27
|
*/
|
|
27
28
|
export class SocialTap extends Core {
|
|
28
29
|
/** Amazon endpoints. */
|
|
@@ -37,6 +38,8 @@ export class SocialTap extends Core {
|
|
|
37
38
|
github;
|
|
38
39
|
/** Google endpoints. */
|
|
39
40
|
google;
|
|
41
|
+
/** Hacker News endpoints. */
|
|
42
|
+
hackernews;
|
|
40
43
|
/** Instagram endpoints. */
|
|
41
44
|
instagram;
|
|
42
45
|
/** Kick endpoints. */
|
|
@@ -119,6 +122,7 @@ export class SocialTap extends Core {
|
|
|
119
122
|
this.facebook = new Facebook(this);
|
|
120
123
|
this.github = new GitHub(this);
|
|
121
124
|
this.google = new Google(this);
|
|
125
|
+
this.hackernews = new HackerNews(this);
|
|
122
126
|
this.instagram = new Instagram(this);
|
|
123
127
|
this.kick = new Kick(this);
|
|
124
128
|
this.komi = new Komi(this);
|
package/dist/commands.js
CHANGED
|
@@ -1414,6 +1414,211 @@ export const COMMANDS = [
|
|
|
1414
1414
|
list: (c, p, o) => c.google.searchSuggestions.list(p, o),
|
|
1415
1415
|
iterate: (c, p, o) => c.google.searchSuggestions.iterate(p, o),
|
|
1416
1416
|
},
|
|
1417
|
+
{
|
|
1418
|
+
kind: "get",
|
|
1419
|
+
platform: "hackernews",
|
|
1420
|
+
name: "comment",
|
|
1421
|
+
endpoint: "hackernews.comment",
|
|
1422
|
+
summary: "One comment with its story, parent and thread depth",
|
|
1423
|
+
price: "1 credit",
|
|
1424
|
+
params: [
|
|
1425
|
+
{ name: "url", type: "string", required: true, description: "The comment: its link on Hacker News (news.ycombinator.com/item?id=9224), its context link (item?id=8863#9224, the comment after the #), or its item ID alone (9224). A story's ID is answered with the endpoint that returns stories. At most 2048 characters. Example: https://news.ycombinator.com/item?id=9224" },
|
|
1426
|
+
{ name: "max_age", type: "integer", required: false, description: "Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. Minimum: 0." },
|
|
1427
|
+
{ name: "fields", type: "string", required: false, description: "Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole." },
|
|
1428
|
+
],
|
|
1429
|
+
get: (c, p, o) => c.hackernews.comment.get(p, o),
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
kind: "list",
|
|
1433
|
+
platform: "hackernews",
|
|
1434
|
+
name: "comments",
|
|
1435
|
+
endpoint: "hackernews.comments",
|
|
1436
|
+
summary: "Comments and replies on a story, in thread order",
|
|
1437
|
+
price: "1 credit",
|
|
1438
|
+
params: [
|
|
1439
|
+
{ name: "url", type: "string", required: true, description: "The story: its link on Hacker News (news.ycombinator.com/item?id=8863, any other query parameters or #fragment kept out) or its item ID alone (8863). A story, an Ask HN or Show HN post or a poll; a comment's link or ID lists the replies under that comment. At most 2048 characters. Example: https://news.ycombinator.com/item?id=8863" },
|
|
1440
|
+
{ name: "sort", type: "string", required: false, description: "Order of the results. relevance (default): the thread as Hacker News orders it, its top comments in HN's own ranking, each followed by its replies, oldest first. newest: newest first. oldest: oldest first. newest and oldest order the whole list, replies among the rest; parent_id says what each answers. One of: relevance, newest, oldest. Default: relevance.", enum: ["relevance", "newest", "oldest"] },
|
|
1441
|
+
{ name: "since", type: "string", required: false, description: "Only items at or after this time: RFC 3339 (2026-10-01T12:00:00Z) or a date (2026-10-01, midnight UTC). On newest-first lists, paging stops when it is reached, so later pages are not fetched or charged. Example: 2026-10-01" },
|
|
1442
|
+
{ name: "until", type: "string", required: false, description: "Only items before this time (exclusive): RFC 3339 or a date (midnight UTC). Example: 2026-10-08" },
|
|
1443
|
+
{ name: "max_age", type: "integer", required: false, description: "Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. Minimum: 0." },
|
|
1444
|
+
{ name: "fields", type: "string", required: false, description: "Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole." },
|
|
1445
|
+
{ name: "limit", type: "integer", required: false, description: "Items per page, 1 to the endpoint's page size (its default and maximum; larger values are reduced to it). Omit it: every page costs the same, so a smaller limit means more pages to pay for. Range: 1 to 1000. Default: 1000." },
|
|
1446
|
+
{ name: "cursor", type: "string", required: false, description: "page.next_cursor from the previous response. Send the same other parameters; omit to start from the first page." },
|
|
1447
|
+
],
|
|
1448
|
+
list: (c, p, o) => c.hackernews.comments.list(p, o),
|
|
1449
|
+
iterate: (c, p, o) => c.hackernews.comments.iterate(p, o),
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
kind: "list",
|
|
1453
|
+
platform: "hackernews",
|
|
1454
|
+
name: "feed_stories",
|
|
1455
|
+
endpoint: "hackernews.feed_stories",
|
|
1456
|
+
summary: "Front page, new, best, Ask HN, Show HN and jobs",
|
|
1457
|
+
price: "1 credit",
|
|
1458
|
+
params: [
|
|
1459
|
+
{ name: "feed", type: "string", required: false, description: "Which feed: top is the front page (the default), new the newest stories, best the highest voted of recent days, ask Ask HN, show Show HN, jobs the job posts of YC companies. One of: top, new, best, ask, show, jobs. Default: top. Example: new", enum: ["top", "new", "best", "ask", "show", "jobs"] },
|
|
1460
|
+
{ name: "since", type: "string", required: false, description: "Only items at or after this time: RFC 3339 (2026-10-01T12:00:00Z) or a date (2026-10-01, midnight UTC). On newest-first lists, paging stops when it is reached, so later pages are not fetched or charged. Example: 2026-10-01" },
|
|
1461
|
+
{ name: "until", type: "string", required: false, description: "Only items before this time (exclusive): RFC 3339 or a date (midnight UTC). Example: 2026-10-08" },
|
|
1462
|
+
{ name: "max_age", type: "integer", required: false, description: "Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. Minimum: 0." },
|
|
1463
|
+
{ name: "fields", type: "string", required: false, description: "Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole." },
|
|
1464
|
+
{ name: "limit", type: "integer", required: false, description: "Items per page, 1 to the endpoint's page size (its default and maximum; larger values are reduced to it). Omit it: every page costs the same, so a smaller limit means more pages to pay for. Range: 1 to 30. Default: 30." },
|
|
1465
|
+
{ name: "cursor", type: "string", required: false, description: "page.next_cursor from the previous response. Send the same other parameters; omit to start from the first page." },
|
|
1466
|
+
],
|
|
1467
|
+
list: (c, p, o) => c.hackernews.feedStories.list(p, o),
|
|
1468
|
+
iterate: (c, p, o) => c.hackernews.feedStories.iterate(p, o),
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
kind: "list",
|
|
1472
|
+
platform: "hackernews",
|
|
1473
|
+
name: "search_comments",
|
|
1474
|
+
endpoint: "hackernews.search_comments",
|
|
1475
|
+
summary: "Comments by keyword, ranked or newest first",
|
|
1476
|
+
price: "1 credit",
|
|
1477
|
+
params: [
|
|
1478
|
+
{ name: "query", type: "string", required: true, description: "Words to find comments by, as HN Search reads them: any word can match with a small typo, a phrase in quotes matches exactly, and a leading - leaves a word out (rust borrow checker, \"memory safety\" -c++). Case does not matter. A link to a comment search on HN Search (https://hn.algolia.com/?q=rust&type=comment&sort=byDate) runs that search: its words, sort, dates, author:name and story:id fill the params you leave out. At most 500 characters. Example: rust borrow checker" },
|
|
1479
|
+
{ name: "sort", type: "string", required: false, description: "Order of the results. relevance (default): HN Search's ranking, the best match of the words first. newest: newest first, back through every matching comment. One of: relevance, newest. Default: relevance.", enum: ["relevance", "newest"] },
|
|
1480
|
+
{ name: "author", type: "string", required: false, description: "Only comments written by this user: a username (case-sensitive, as on Hacker News) or a profile link. At most 300 characters. Example: pg" },
|
|
1481
|
+
{ name: "story", type: "string", required: false, description: "Only comments on this story, replies included: a story's link (news.ycombinator.com/item?id=8863) or its item ID. A comment's ID matches nothing: Hacker News files every comment under its story. At most 300 characters. Example: 8863" },
|
|
1482
|
+
{ name: "search_in", type: "string", required: false, description: "Where the words must appear: all (default: the comment's text and its author's username) or text (the text alone). One of: all, text. Default: all. Example: text", enum: ["all", "text"] },
|
|
1483
|
+
{ name: "since", type: "string", required: false, description: "Only items at or after this time: RFC 3339 (2026-10-01T12:00:00Z) or a date (2026-10-01, midnight UTC). On newest-first lists, paging stops when it is reached, so later pages are not fetched or charged. By the comment's posting time, to the second. Example: 2026-10-01" },
|
|
1484
|
+
{ name: "until", type: "string", required: false, description: "Only items before this time (exclusive): RFC 3339 or a date (midnight UTC). By the comment's posting time, to the second. Example: 2026-10-08" },
|
|
1485
|
+
{ name: "max_age", type: "integer", required: false, description: "Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. Minimum: 0." },
|
|
1486
|
+
{ name: "fields", type: "string", required: false, description: "Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole." },
|
|
1487
|
+
{ name: "limit", type: "integer", required: false, description: "Items per page, 1 to the endpoint's page size (its default and maximum; larger values are reduced to it). Omit it: every page costs the same, so a smaller limit means more pages to pay for. Range: 1 to 100. Default: 100." },
|
|
1488
|
+
{ name: "cursor", type: "string", required: false, description: "page.next_cursor from the previous response. Send the same other parameters; omit to start from the first page." },
|
|
1489
|
+
],
|
|
1490
|
+
list: (c, p, o) => c.hackernews.searchComments.list(p, o),
|
|
1491
|
+
iterate: (c, p, o) => c.hackernews.searchComments.iterate(p, o),
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
kind: "list",
|
|
1495
|
+
platform: "hackernews",
|
|
1496
|
+
name: "search_stories",
|
|
1497
|
+
endpoint: "hackernews.search_stories",
|
|
1498
|
+
summary: "Stories by keyword, ranked or newest first",
|
|
1499
|
+
price: "1 credit",
|
|
1500
|
+
params: [
|
|
1501
|
+
{ name: "query", type: "string", required: true, description: "Words to find stories by, as HN Search reads them: any word can match with a small typo, a phrase in quotes matches exactly, and a leading - leaves a word out (rust async, \"memory safety\" -rust). Case does not matter. A link to a search on HN Search (https://hn.algolia.com/?q=rust&sort=byDate) runs that search: its words, type, sort and dates fill the params you leave out. At most 500 characters. Example: rust async" },
|
|
1502
|
+
{ name: "sort", type: "string", required: false, description: "Order of the results. relevance (default): HN Search's ranking, the best match of the words first, then the most points. newest: newest first, back through every matching story. One of: relevance, newest. Default: relevance.", enum: ["relevance", "newest"] },
|
|
1503
|
+
{ name: "kind", type: "string", required: false, description: "Which stories: all (default: stories, jobs and polls), story (every story but jobs and polls: links, Ask HN, Show HN and Launch HN), ask_hn (Ask HN and Tell HN posts, as HN Search tags them), show_hn, launch_hn, job or poll. One of: all, story, ask_hn, show_hn, launch_hn, job, poll. Default: all. Example: show_hn", enum: ["all", "story", "ask_hn", "show_hn", "launch_hn", "job", "poll"] },
|
|
1504
|
+
{ name: "author", type: "string", required: false, description: "Only stories posted by this user: a username (case-sensitive, as on Hacker News) or a profile link. At most 300 characters. Example: pg" },
|
|
1505
|
+
{ name: "min_points", type: "integer", required: false, description: "Only stories with at least this many points. Range: 0 to 1000000. Example: 100" },
|
|
1506
|
+
{ name: "min_comments", type: "integer", required: false, description: "Only stories with at least this many comments. Range: 0 to 1000000. Example: 50" },
|
|
1507
|
+
{ name: "front_page", type: "boolean", required: false, description: "Only the stories on Hacker News' front page now." },
|
|
1508
|
+
{ name: "search_in", type: "string", required: false, description: "Where the words must appear: all (default: the title, the link's address, the text and the poster's username), title, url (the link's address: a domain such as nytimes.com, or any page's address such as a YouTube video's, finds the stories that link to it) or text (a text story's own text, such as an Ask HN post's; HN Search doesn't search a job's text). One of: all, title, url, text. Default: all. Example: url", enum: ["all", "title", "url", "text"] },
|
|
1509
|
+
{ name: "since", type: "string", required: false, description: "Only items at or after this time: RFC 3339 (2026-10-01T12:00:00Z) or a date (2026-10-01, midnight UTC). On newest-first lists, paging stops when it is reached, so later pages are not fetched or charged. By the story's posting time, to the second. Example: 2026-10-01" },
|
|
1510
|
+
{ name: "until", type: "string", required: false, description: "Only items before this time (exclusive): RFC 3339 or a date (midnight UTC). By the story's posting time, to the second. Example: 2026-10-08" },
|
|
1511
|
+
{ name: "max_age", type: "integer", required: false, description: "Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. Minimum: 0." },
|
|
1512
|
+
{ name: "fields", type: "string", required: false, description: "Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole." },
|
|
1513
|
+
{ name: "limit", type: "integer", required: false, description: "Items per page, 1 to the endpoint's page size (its default and maximum; larger values are reduced to it). Omit it: every page costs the same, so a smaller limit means more pages to pay for. Range: 1 to 100. Default: 100." },
|
|
1514
|
+
{ name: "cursor", type: "string", required: false, description: "page.next_cursor from the previous response. Send the same other parameters; omit to start from the first page." },
|
|
1515
|
+
],
|
|
1516
|
+
list: (c, p, o) => c.hackernews.searchStories.list(p, o),
|
|
1517
|
+
iterate: (c, p, o) => c.hackernews.searchStories.iterate(p, o),
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
kind: "get",
|
|
1521
|
+
platform: "hackernews",
|
|
1522
|
+
name: "story",
|
|
1523
|
+
endpoint: "hackernews.story",
|
|
1524
|
+
summary: "Story, job or poll with exact points and comment count",
|
|
1525
|
+
price: "1 credit",
|
|
1526
|
+
params: [
|
|
1527
|
+
{ name: "url", type: "string", required: true, description: "The story: its link on Hacker News (news.ycombinator.com/item?id=8863, any other query parameters or #fragment kept out) or its item ID alone (8863). A story, an Ask HN or Show HN post, a job or a poll; a comment's ID is answered with the endpoint that returns comments. At most 2048 characters. Example: https://news.ycombinator.com/item?id=8863" },
|
|
1528
|
+
{ name: "max_age", type: "integer", required: false, description: "Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. Minimum: 0." },
|
|
1529
|
+
{ name: "fields", type: "string", required: false, description: "Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole." },
|
|
1530
|
+
],
|
|
1531
|
+
get: (c, p, o) => c.hackernews.story.get(p, o),
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
kind: "get",
|
|
1535
|
+
platform: "hackernews",
|
|
1536
|
+
name: "user",
|
|
1537
|
+
endpoint: "hackernews.user",
|
|
1538
|
+
summary: "Exact karma, about text and submission count",
|
|
1539
|
+
price: "1 credit",
|
|
1540
|
+
params: [
|
|
1541
|
+
{ name: "handle", type: "string", required: true, description: "The Hacker News user: a username (pg, case-sensitive) or a link to the user's page or lists (news.ycombinator.com/user?id=pg, also submitted?id=, threads?id= and favorites?id=). At most 2048 characters. Example: pg" },
|
|
1542
|
+
{ name: "max_age", type: "integer", required: false, description: "Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. Minimum: 0." },
|
|
1543
|
+
{ name: "fields", type: "string", required: false, description: "Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole." },
|
|
1544
|
+
],
|
|
1545
|
+
get: (c, p, o) => c.hackernews.user.get(p, o),
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
kind: "list",
|
|
1549
|
+
platform: "hackernews",
|
|
1550
|
+
name: "user_comments",
|
|
1551
|
+
endpoint: "hackernews.user_comments",
|
|
1552
|
+
summary: "Every comment a user wrote, newest first",
|
|
1553
|
+
price: "1 credit",
|
|
1554
|
+
params: [
|
|
1555
|
+
{ name: "handle", type: "string", required: true, description: "The Hacker News user: a username (case-sensitive: pg, not PG) or a link to the user's page or one of its lists (news.ycombinator.com/user?id=pg, threads?id=pg). At most 2048 characters. Example: pg" },
|
|
1556
|
+
{ name: "since", type: "string", required: false, description: "Only items at or after this time: RFC 3339 (2026-10-01T12:00:00Z) or a date (2026-10-01, midnight UTC). On newest-first lists, paging stops when it is reached, so later pages are not fetched or charged. By the comment's posting time, to the second. Example: 2026-10-01" },
|
|
1557
|
+
{ name: "until", type: "string", required: false, description: "Only items before this time (exclusive): RFC 3339 or a date (midnight UTC). By the comment's posting time, to the second. Example: 2026-10-08" },
|
|
1558
|
+
{ name: "max_age", type: "integer", required: false, description: "Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. Minimum: 0." },
|
|
1559
|
+
{ name: "fields", type: "string", required: false, description: "Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole." },
|
|
1560
|
+
{ name: "limit", type: "integer", required: false, description: "Items per page, 1 to the endpoint's page size (its default and maximum; larger values are reduced to it). Omit it: every page costs the same, so a smaller limit means more pages to pay for. Range: 1 to 100. Default: 100." },
|
|
1561
|
+
{ name: "cursor", type: "string", required: false, description: "page.next_cursor from the previous response. Send the same other parameters; omit to start from the first page." },
|
|
1562
|
+
],
|
|
1563
|
+
list: (c, p, o) => c.hackernews.userComments.list(p, o),
|
|
1564
|
+
iterate: (c, p, o) => c.hackernews.userComments.iterate(p, o),
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
kind: "list",
|
|
1568
|
+
platform: "hackernews",
|
|
1569
|
+
name: "user_favorites",
|
|
1570
|
+
endpoint: "hackernews.user_favorites",
|
|
1571
|
+
summary: "Stories a user saved, with exact points and comments",
|
|
1572
|
+
price: "1 credit",
|
|
1573
|
+
params: [
|
|
1574
|
+
{ name: "handle", type: "string", required: true, description: "The Hacker News user: a username (case-sensitive: pg, not PG) or a link to the user's page or one of its lists (news.ycombinator.com/user?id=pg, favorites?id=pg). At most 2048 characters. Example: simonw" },
|
|
1575
|
+
{ name: "max_age", type: "integer", required: false, description: "Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. Minimum: 0." },
|
|
1576
|
+
{ name: "fields", type: "string", required: false, description: "Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole." },
|
|
1577
|
+
{ name: "limit", type: "integer", required: false, description: "Items per page, 1 to the endpoint's page size (its default and maximum; larger values are reduced to it). Omit it: every page costs the same, so a smaller limit means more pages to pay for. Range: 1 to 30. Default: 30." },
|
|
1578
|
+
{ name: "cursor", type: "string", required: false, description: "page.next_cursor from the previous response. Send the same other parameters; omit to start from the first page." },
|
|
1579
|
+
],
|
|
1580
|
+
list: (c, p, o) => c.hackernews.userFavorites.list(p, o),
|
|
1581
|
+
iterate: (c, p, o) => c.hackernews.userFavorites.iterate(p, o),
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
kind: "list",
|
|
1585
|
+
platform: "hackernews",
|
|
1586
|
+
name: "user_stories",
|
|
1587
|
+
endpoint: "hackernews.user_stories",
|
|
1588
|
+
summary: "Every story a user posted, newest first",
|
|
1589
|
+
price: "1 credit",
|
|
1590
|
+
params: [
|
|
1591
|
+
{ name: "handle", type: "string", required: true, description: "The Hacker News user: a username (case-sensitive: pg, not PG) or a link to the user's page or one of its lists (news.ycombinator.com/user?id=pg, submitted?id=pg). At most 2048 characters. Example: pg" },
|
|
1592
|
+
{ name: "kind", type: "string", required: false, description: "Which stories: all (default: stories, jobs and polls), story (every story but jobs and polls: links, Ask HN, Show HN and Launch HN), ask_hn (Ask HN and Tell HN posts, as HN Search tags them), show_hn, launch_hn, job or poll. One of: all, story, ask_hn, show_hn, launch_hn, job, poll. Default: all. Example: show_hn", enum: ["all", "story", "ask_hn", "show_hn", "launch_hn", "job", "poll"] },
|
|
1593
|
+
{ name: "since", type: "string", required: false, description: "Only items at or after this time: RFC 3339 (2026-10-01T12:00:00Z) or a date (2026-10-01, midnight UTC). On newest-first lists, paging stops when it is reached, so later pages are not fetched or charged. By the story's posting time, to the second. Example: 2026-10-01" },
|
|
1594
|
+
{ name: "until", type: "string", required: false, description: "Only items before this time (exclusive): RFC 3339 or a date (midnight UTC). By the story's posting time, to the second. Example: 2026-10-08" },
|
|
1595
|
+
{ name: "max_age", type: "integer", required: false, description: "Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. Minimum: 0." },
|
|
1596
|
+
{ name: "fields", type: "string", required: false, description: "Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole." },
|
|
1597
|
+
{ name: "limit", type: "integer", required: false, description: "Items per page, 1 to the endpoint's page size (its default and maximum; larger values are reduced to it). Omit it: every page costs the same, so a smaller limit means more pages to pay for. Range: 1 to 100. Default: 100." },
|
|
1598
|
+
{ name: "cursor", type: "string", required: false, description: "page.next_cursor from the previous response. Send the same other parameters; omit to start from the first page." },
|
|
1599
|
+
],
|
|
1600
|
+
list: (c, p, o) => c.hackernews.userStories.list(p, o),
|
|
1601
|
+
iterate: (c, p, o) => c.hackernews.userStories.iterate(p, o),
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
kind: "list",
|
|
1605
|
+
platform: "hackernews",
|
|
1606
|
+
name: "whoishiring_jobs",
|
|
1607
|
+
endpoint: "hackernews.whoishiring_jobs",
|
|
1608
|
+
summary: "Jobs from a month's Who is hiring thread",
|
|
1609
|
+
price: "1 credit",
|
|
1610
|
+
params: [
|
|
1611
|
+
{ name: "month", type: "string", required: false, description: "The month's thread, as YYYY-MM (2026-10), from April 2011 on. Omit it for the latest thread, posted on the first weekday of each month. At most 20 characters. Example: 2026-10" },
|
|
1612
|
+
{ name: "since", type: "string", required: false, description: "Only items at or after this time: RFC 3339 (2026-10-01T12:00:00Z) or a date (2026-10-01, midnight UTC). On newest-first lists, paging stops when it is reached, so later pages are not fetched or charged. By the job's posting time, to the second. Example: 2026-10-01" },
|
|
1613
|
+
{ name: "until", type: "string", required: false, description: "Only items before this time (exclusive): RFC 3339 or a date (midnight UTC). By the job's posting time, to the second. Example: 2026-10-08" },
|
|
1614
|
+
{ name: "max_age", type: "integer", required: false, description: "Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. Minimum: 0." },
|
|
1615
|
+
{ name: "fields", type: "string", required: false, description: "Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole." },
|
|
1616
|
+
{ name: "limit", type: "integer", required: false, description: "Items per page, 1 to the endpoint's page size (its default and maximum; larger values are reduced to it). Omit it: every page costs the same, so a smaller limit means more pages to pay for. Range: 1 to 100. Default: 100." },
|
|
1617
|
+
{ name: "cursor", type: "string", required: false, description: "page.next_cursor from the previous response. Send the same other parameters; omit to start from the first page." },
|
|
1618
|
+
],
|
|
1619
|
+
list: (c, p, o) => c.hackernews.whoishiringJobs.list(p, o),
|
|
1620
|
+
iterate: (c, p, o) => c.hackernews.whoishiringJobs.iterate(p, o),
|
|
1621
|
+
},
|
|
1417
1622
|
{
|
|
1418
1623
|
kind: "get",
|
|
1419
1624
|
platform: "instagram",
|
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,
|