x-twitter-scraper 0.18.0 → 0.20.0
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/CHANGELOG.md +48 -0
- package/README.md +1 -0
- package/client.d.mts +7 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/account.d.mts +1 -1
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +1 -1
- package/resources/account.d.ts.map +1 -1
- package/resources/activity.d.mts +230 -0
- package/resources/activity.d.mts.map +1 -0
- package/resources/activity.d.ts +230 -0
- package/resources/activity.d.ts.map +1 -0
- package/resources/activity.js +67 -0
- package/resources/activity.js.map +1 -0
- package/resources/activity.mjs +63 -0
- package/resources/activity.mjs.map +1 -0
- package/resources/credits.d.mts +29 -0
- package/resources/credits.d.mts.map +1 -1
- package/resources/credits.d.ts +29 -0
- package/resources/credits.d.ts.map +1 -1
- package/resources/credits.js.map +1 -1
- package/resources/credits.mjs.map +1 -1
- package/resources/events.d.mts +69 -0
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +69 -0
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js +2 -1
- package/resources/events.js.map +1 -1
- package/resources/events.mjs +2 -1
- package/resources/events.mjs.map +1 -1
- package/resources/extractions.d.mts +56 -0
- package/resources/extractions.d.mts.map +1 -1
- package/resources/extractions.d.ts +56 -0
- package/resources/extractions.d.ts.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/monitors/posts.d.mts +45 -1
- package/resources/monitors/posts.d.mts.map +1 -1
- package/resources/monitors/posts.d.ts +45 -1
- package/resources/monitors/posts.d.ts.map +1 -1
- package/resources/monitors/posts.js +1 -1
- package/resources/monitors/posts.mjs +1 -1
- package/resources/radar.d.mts +9 -0
- package/resources/radar.d.mts.map +1 -1
- package/resources/radar.d.ts +9 -0
- package/resources/radar.d.ts.map +1 -1
- package/resources/shared.d.mts +67 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +67 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscribe.d.mts +11 -0
- package/resources/subscribe.d.mts.map +1 -1
- package/resources/subscribe.d.ts +11 -0
- package/resources/subscribe.d.ts.map +1 -1
- package/resources/subscribe.js.map +1 -1
- package/resources/subscribe.mjs.map +1 -1
- package/resources/x/communities/communities.d.mts +17 -0
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +17 -0
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +7 -4
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +7 -4
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/join.d.mts +14 -0
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +14 -0
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +4 -4
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +4 -4
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/dm.d.mts +14 -0
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +14 -0
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +4 -4
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +4 -4
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/index.d.mts +2 -2
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +2 -2
- package/resources/x/index.d.ts.map +1 -1
- package/resources/x/index.js.map +1 -1
- package/resources/x/index.mjs.map +1 -1
- package/resources/x/media.d.mts +43 -0
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +43 -0
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +2 -2
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs +2 -2
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +21 -0
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +21 -0
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +6 -6
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs +6 -6
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/sports.d.mts +309 -2
- package/resources/x/sports.d.mts.map +1 -1
- package/resources/x/sports.d.ts +309 -2
- package/resources/x/sports.d.ts.map +1 -1
- package/resources/x/sports.js +49 -1
- package/resources/x/sports.js.map +1 -1
- package/resources/x/sports.mjs +49 -1
- package/resources/x/sports.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts +14 -0
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts +14 -0
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.js +4 -4
- package/resources/x/tweets/like.js.map +1 -1
- package/resources/x/tweets/like.mjs +4 -4
- package/resources/x/tweets/like.mjs.map +1 -1
- package/resources/x/tweets/retweet.d.mts +14 -0
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts +14 -0
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.js +4 -4
- package/resources/x/tweets/retweet.js.map +1 -1
- package/resources/x/tweets/retweet.mjs +4 -4
- package/resources/x/tweets/retweet.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +58 -0
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +58 -0
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +4 -4
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +4 -4
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/users/follow.d.mts +14 -0
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts +14 -0
- package/resources/x/users/follow.d.ts.map +1 -1
- package/resources/x/users/follow.js +4 -4
- package/resources/x/users/follow.js.map +1 -1
- package/resources/x/users/follow.mjs +4 -4
- package/resources/x/users/follow.mjs.map +1 -1
- package/resources/x/users/index.d.mts +1 -1
- package/resources/x/users/index.d.mts.map +1 -1
- package/resources/x/users/index.d.ts +1 -1
- package/resources/x/users/index.d.ts.map +1 -1
- package/resources/x/users/index.js.map +1 -1
- package/resources/x/users/index.mjs.map +1 -1
- package/resources/x/users/users.d.mts +425 -1
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +425 -1
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +17 -2
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +17 -2
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/x.d.mts +4 -4
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +4 -4
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs.map +1 -1
- package/skills/x-twitter-scraper/references/api-endpoints-draws.md +13 -13
- package/skills/x-twitter-scraper/references/draws.md +3 -3
- package/skills/x-twitter-scraper/references/python-examples.md +2 -2
- package/src/client.ts +23 -0
- package/src/resources/account.ts +1 -1
- package/src/resources/activity.ts +341 -0
- package/src/resources/credits.ts +35 -0
- package/src/resources/events.ts +85 -1
- package/src/resources/extractions.ts +67 -0
- package/src/resources/index.ts +8 -0
- package/src/resources/monitors/posts.ts +58 -1
- package/src/resources/radar.ts +10 -0
- package/src/resources/shared.ts +123 -0
- package/src/resources/subscribe.ts +13 -0
- package/src/resources/x/communities/communities.ts +23 -4
- package/src/resources/x/communities/join.ts +20 -4
- package/src/resources/x/dm.ts +20 -4
- package/src/resources/x/index.ts +13 -0
- package/src/resources/x/media.ts +60 -2
- package/src/resources/x/profile.ts +30 -6
- package/src/resources/x/sports.ts +379 -1
- package/src/resources/x/tweets/like.ts +20 -4
- package/src/resources/x/tweets/retweet.ts +20 -4
- package/src/resources/x/tweets/tweets.ts +70 -4
- package/src/resources/x/users/follow.ts +20 -4
- package/src/resources/x/users/index.ts +3 -0
- package/src/resources/x/users/users.ts +513 -2
- package/src/resources/x/x.ts +26 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -37,11 +37,11 @@ export class Tweets extends APIResource {
|
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
39
39
|
create(params: TweetCreateParams, options?: RequestOptions): APIPromise<TweetCreateResponse> {
|
|
40
|
-
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
40
|
+
const { 'Idempotency-Key': idempotencyKey, Prefer: prefer, ...body } = params;
|
|
41
41
|
return this._client.post('/x/tweets', {
|
|
42
42
|
body,
|
|
43
43
|
...options,
|
|
44
|
-
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
44
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey, Prefer: prefer }, options?.headers]),
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -85,11 +85,11 @@ export class Tweets extends APIResource {
|
|
|
85
85
|
* ```
|
|
86
86
|
*/
|
|
87
87
|
delete(id: string, params: TweetDeleteParams, options?: RequestOptions): APIPromise<TweetDeleteResponse> {
|
|
88
|
-
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
88
|
+
const { 'Idempotency-Key': idempotencyKey, Prefer: prefer, ...body } = params;
|
|
89
89
|
return this._client.delete(path`/x/tweets/${id}`, {
|
|
90
90
|
body,
|
|
91
91
|
...options,
|
|
92
|
-
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
92
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey, Prefer: prefer }, options?.headers]),
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -542,6 +542,11 @@ export interface TweetDetail {
|
|
|
542
542
|
*/
|
|
543
543
|
limitedActions?: Array<TweetDetail.LimitedAction>;
|
|
544
544
|
|
|
545
|
+
/**
|
|
546
|
+
* The live event the post belongs to, such as an election.
|
|
547
|
+
*/
|
|
548
|
+
liveEventContext?: TweetDetail.LiveEventContext;
|
|
549
|
+
|
|
545
550
|
/**
|
|
546
551
|
* Media, omitted when unavailable.
|
|
547
552
|
*/
|
|
@@ -663,6 +668,12 @@ export interface TweetDetail {
|
|
|
663
668
|
'retweetCount' | 'replyCount' | 'likeCount' | 'quoteCount' | 'viewCount' | 'bookmarkCount'
|
|
664
669
|
>;
|
|
665
670
|
|
|
671
|
+
/**
|
|
672
|
+
* The fields X did not send for this post. text reads empty, so treat it as
|
|
673
|
+
* unknown rather than empty. Left out when X sent the text.
|
|
674
|
+
*/
|
|
675
|
+
unknownFields?: Array<'text'>;
|
|
676
|
+
|
|
666
677
|
/**
|
|
667
678
|
* User IDs that left this conversation.
|
|
668
679
|
*/
|
|
@@ -1219,6 +1230,23 @@ export namespace TweetDetail {
|
|
|
1219
1230
|
}
|
|
1220
1231
|
}
|
|
1221
1232
|
|
|
1233
|
+
export interface LiveEventContext {
|
|
1234
|
+
/**
|
|
1235
|
+
* The event's image.
|
|
1236
|
+
*/
|
|
1237
|
+
imageUrl?: string;
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Event name.
|
|
1241
|
+
*/
|
|
1242
|
+
title?: string;
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* The event's page on X.
|
|
1246
|
+
*/
|
|
1247
|
+
url?: string;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1222
1250
|
/**
|
|
1223
1251
|
* Complete Note Tweet content and rich-text metadata.
|
|
1224
1252
|
*/
|
|
@@ -1603,6 +1631,13 @@ export namespace TweetDetail {
|
|
|
1603
1631
|
* Public post & user this reaction references.
|
|
1604
1632
|
*/
|
|
1605
1633
|
export interface ReactionContext {
|
|
1634
|
+
/**
|
|
1635
|
+
* The post this one reacts to, with the same fields. X often sends only its
|
|
1636
|
+
* ID, author & edit history. Then unknownFields lists text, and the flags X
|
|
1637
|
+
* did not send are left out.
|
|
1638
|
+
*/
|
|
1639
|
+
reactedToPost?: { [key: string]: unknown };
|
|
1640
|
+
|
|
1606
1641
|
/**
|
|
1607
1642
|
* Referenced post ID.
|
|
1608
1643
|
*/
|
|
@@ -2571,6 +2606,14 @@ export interface TweetGetRepliesResponse extends Omit<Shared.PaginatedTweets, 't
|
|
|
2571
2606
|
* the same replies.
|
|
2572
2607
|
*/
|
|
2573
2608
|
partialBefore?: string;
|
|
2609
|
+
|
|
2610
|
+
/**
|
|
2611
|
+
* Present on automatic pages without filters while X counts replies the read
|
|
2612
|
+
* hasn't reached. If a reply that belongs in your rows is missing, it's among
|
|
2613
|
+
* them. The count drops as you read more pages. On the last page, it counts the
|
|
2614
|
+
* replies the read can't reach.
|
|
2615
|
+
*/
|
|
2616
|
+
unreachedReplies?: number;
|
|
2574
2617
|
}
|
|
2575
2618
|
|
|
2576
2619
|
export namespace TweetGetRepliesResponse {
|
|
@@ -3391,6 +3434,14 @@ export interface TweetCreateParams {
|
|
|
3391
3434
|
*/
|
|
3392
3435
|
'Idempotency-Key': string;
|
|
3393
3436
|
|
|
3437
|
+
/**
|
|
3438
|
+
* Header param: A long write answers 202 with a status link, then lands on X.
|
|
3439
|
+
* `wait=<seconds>` asks for the answer within that many seconds, up to 85. If
|
|
3440
|
+
* the write is still running then, the API answers 202 with Location. Poll
|
|
3441
|
+
* Location until `terminal` is true, and don't send the write again.
|
|
3442
|
+
*/
|
|
3443
|
+
Prefer?: string;
|
|
3444
|
+
|
|
3394
3445
|
/**
|
|
3395
3446
|
* Body param: The Community to post into, from 1 to 19 digits. The account must be
|
|
3396
3447
|
* a member. Xquik picks the Community in X's composer, checks the post request
|
|
@@ -3480,6 +3531,14 @@ export interface TweetDeleteParams {
|
|
|
3480
3531
|
* days.
|
|
3481
3532
|
*/
|
|
3482
3533
|
'Idempotency-Key': string;
|
|
3534
|
+
|
|
3535
|
+
/**
|
|
3536
|
+
* Header param: A long write answers 202 with a status link, then lands on X.
|
|
3537
|
+
* `wait=<seconds>` asks for the answer within that many seconds, up to 85. If
|
|
3538
|
+
* the write is still running then, the API answers 202 with Location. Poll
|
|
3539
|
+
* Location until `terminal` is true, and don't send the write again.
|
|
3540
|
+
*/
|
|
3541
|
+
Prefer?: string;
|
|
3483
3542
|
}
|
|
3484
3543
|
|
|
3485
3544
|
export interface TweetCheckRepostParams {
|
|
@@ -5328,6 +5387,13 @@ export interface TweetSearchParams {
|
|
|
5328
5387
|
*/
|
|
5329
5388
|
source?: string;
|
|
5330
5389
|
|
|
5390
|
+
/**
|
|
5391
|
+
* Keeps a post only when at least 1 of these words or quoted phrases appears
|
|
5392
|
+
* outside the author's name and username, such as in its text, a link, its card
|
|
5393
|
+
* or a quoted post.
|
|
5394
|
+
*/
|
|
5395
|
+
textOnlyTerms?: string;
|
|
5396
|
+
|
|
5331
5397
|
/**
|
|
5332
5398
|
* Filter replies sent to a username.
|
|
5333
5399
|
*/
|
|
@@ -24,11 +24,11 @@ export class Follow extends APIResource {
|
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
create(id: string, params: FollowCreateParams, options?: RequestOptions): APIPromise<FollowCreateResponse> {
|
|
27
|
-
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
27
|
+
const { 'Idempotency-Key': idempotencyKey, Prefer: prefer, ...body } = params;
|
|
28
28
|
return this._client.post(path`/x/users/${id}/follow`, {
|
|
29
29
|
body,
|
|
30
30
|
...options,
|
|
31
|
-
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
31
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey, Prefer: prefer }, options?.headers]),
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -51,11 +51,11 @@ export class Follow extends APIResource {
|
|
|
51
51
|
params: FollowDeleteAllParams,
|
|
52
52
|
options?: RequestOptions,
|
|
53
53
|
): APIPromise<FollowDeleteAllResponse> {
|
|
54
|
-
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
54
|
+
const { 'Idempotency-Key': idempotencyKey, Prefer: prefer, ...body } = params;
|
|
55
55
|
return this._client.delete(path`/x/users/${id}/follow`, {
|
|
56
56
|
body,
|
|
57
57
|
...options,
|
|
58
|
-
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
58
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey, Prefer: prefer }, options?.headers]),
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -577,6 +577,14 @@ export interface FollowCreateParams {
|
|
|
577
577
|
* days.
|
|
578
578
|
*/
|
|
579
579
|
'Idempotency-Key': string;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Header param: A long write answers 202 with a status link, then lands on X.
|
|
583
|
+
* `wait=<seconds>` asks for the answer within that many seconds, up to 85. If
|
|
584
|
+
* the write is still running then, the API answers 202 with Location. Poll
|
|
585
|
+
* Location until `terminal` is true, and don't send the write again.
|
|
586
|
+
*/
|
|
587
|
+
Prefer?: string;
|
|
580
588
|
}
|
|
581
589
|
|
|
582
590
|
export interface FollowDeleteAllParams {
|
|
@@ -594,6 +602,14 @@ export interface FollowDeleteAllParams {
|
|
|
594
602
|
* days.
|
|
595
603
|
*/
|
|
596
604
|
'Idempotency-Key': string;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Header param: A long write answers 202 with a status link, then lands on X.
|
|
608
|
+
* `wait=<seconds>` asks for the answer within that many seconds, up to 85. If
|
|
609
|
+
* the write is still running then, the API answers 202 with Location. Poll
|
|
610
|
+
* Location until `terminal` is true, and don't send the write again.
|
|
611
|
+
*/
|
|
612
|
+
Prefer?: string;
|
|
597
613
|
}
|
|
598
614
|
|
|
599
615
|
export declare namespace Follow {
|
|
@@ -22,6 +22,8 @@ export {
|
|
|
22
22
|
type UserRetrieveListMembershipsResponse,
|
|
23
23
|
type UserRetrieveListsResponse,
|
|
24
24
|
type UserRetrieveLiveResponse,
|
|
25
|
+
type ShadowbanReport,
|
|
26
|
+
type ShadowbanVerdict,
|
|
25
27
|
type UserRetrieveVerifiedFollowersResponse,
|
|
26
28
|
type UserTranslateBioResponse,
|
|
27
29
|
type UserRetrieveParams,
|
|
@@ -45,6 +47,7 @@ export {
|
|
|
45
47
|
type UserRetrieveMentionsParams,
|
|
46
48
|
type UserRetrieveRepliesParams,
|
|
47
49
|
type UserRetrieveSearchParams,
|
|
50
|
+
type UserRetrieveShadowbanParams,
|
|
48
51
|
type UserRetrieveSimilarParams,
|
|
49
52
|
type UserRetrieveSubscriptionsParams,
|
|
50
53
|
type UserRetrieveTweetsParams,
|