x-twitter-scraper 0.17.0 → 0.19.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 +35 -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 +214 -0
- package/resources/activity.d.mts.map +1 -0
- package/resources/activity.d.ts +214 -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 +24 -0
- package/resources/credits.d.mts.map +1 -1
- package/resources/credits.d.ts +24 -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 +8 -0
- package/resources/extractions.d.mts.map +1 -1
- package/resources/extractions.d.ts +8 -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/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/index.d.mts +1 -1
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +1 -1
- 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 +36 -0
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +36 -0
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/sports.d.mts +474 -4
- package/resources/x/sports.d.mts.map +1 -1
- package/resources/x/sports.d.ts +474 -4
- package/resources/x/sports.d.ts.map +1 -1
- package/resources/x/sports.js +64 -1
- package/resources/x/sports.js.map +1 -1
- package/resources/x/sports.mjs +64 -1
- package/resources/x/sports.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +31 -0
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +31 -0
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/x.d.mts +2 -2
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +2 -2
- 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 +302 -0
- package/src/resources/credits.ts +29 -0
- package/src/resources/events.ts +85 -1
- package/src/resources/extractions.ts +9 -0
- package/src/resources/index.ts +8 -0
- package/src/resources/monitors/posts.ts +58 -1
- package/src/resources/shared.ts +113 -0
- package/src/resources/subscribe.ts +13 -0
- package/src/resources/x/index.ts +18 -0
- package/src/resources/x/media.ts +50 -0
- package/src/resources/x/sports.ts +583 -3
- package/src/resources/x/tweets/tweets.ts +35 -0
- package/src/resources/x/x.ts +36 -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
package/resources/x/media.d.ts
CHANGED
|
@@ -31,10 +31,46 @@ export declare class Media extends APIResource {
|
|
|
31
31
|
export interface MediaDownloadResponse {
|
|
32
32
|
cacheHit?: boolean;
|
|
33
33
|
galleryUrl?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The post's files saved to your gallery. Single downloads only.
|
|
36
|
+
*/
|
|
37
|
+
items?: Array<MediaDownloadResponse.Item>;
|
|
34
38
|
totalMedia?: number;
|
|
35
39
|
totalTweets?: number;
|
|
36
40
|
tweetId?: string;
|
|
37
41
|
}
|
|
42
|
+
export declare namespace MediaDownloadResponse {
|
|
43
|
+
/**
|
|
44
|
+
* 1 file saved to your gallery.
|
|
45
|
+
*/
|
|
46
|
+
interface Item {
|
|
47
|
+
/**
|
|
48
|
+
* Gallery file ID.
|
|
49
|
+
*/
|
|
50
|
+
id: string;
|
|
51
|
+
tweetId: string;
|
|
52
|
+
mediaType: 'photo' | 'video' | 'animated_gif';
|
|
53
|
+
/**
|
|
54
|
+
* Saved copy of the file.
|
|
55
|
+
*/
|
|
56
|
+
mediaUrl: string;
|
|
57
|
+
/**
|
|
58
|
+
* File size in bytes, as a string.
|
|
59
|
+
*/
|
|
60
|
+
fileSize: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* When the file joined your gallery.
|
|
63
|
+
*/
|
|
64
|
+
createdAt: string;
|
|
65
|
+
authorUsername: string;
|
|
66
|
+
authorDisplayName: string;
|
|
67
|
+
authorAvatar: string | null;
|
|
68
|
+
tweetText: string;
|
|
69
|
+
likes: number | null;
|
|
70
|
+
retweets: number | null;
|
|
71
|
+
views: number | null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
38
74
|
/**
|
|
39
75
|
* Durable write record. Poll statusUrl until terminal is true. Reusing its
|
|
40
76
|
* Idempotency-Key returns this record. Create another action only when safeToRetry
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/resources/x/media.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,8BAA2B;AAErD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAE/F;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAa3F;CACF;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,m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CAAC,EAAE,OAAO,GAAG,gBAAgB,GAAG,OAAO,GAAG,WAAW,GAAG,cAAc,CAAC;KAC5E;IAED;;OAEG;IACH,UAAiB,MAAM;QACrB,EAAE,EAAE,MAAM,CAAC;QAEX,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,WAAW,CAAC;KACtC;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/x/sports.d.mts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as Shared from "../shared.mjs";
|
|
2
3
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
4
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
5
|
/**
|
|
5
|
-
* NFL & college football games, scoreboards, box scores
|
|
6
|
+
* NFL & college football games, scoreboards, plays, box scores, audiences,
|
|
7
|
+
* rosters, player props & posts
|
|
6
8
|
*/
|
|
7
9
|
export declare class Sports extends APIResource {
|
|
8
10
|
/**
|
|
@@ -55,6 +57,56 @@ export declare class Sports extends APIResource {
|
|
|
55
57
|
* ```
|
|
56
58
|
*/
|
|
57
59
|
retrievePlays(id: string, params: SportRetrievePlaysParams, options?: RequestOptions): APIPromise<FootballPlays>;
|
|
60
|
+
/**
|
|
61
|
+
* Returns who follows 1 game on X. It has live viewers, fan picks per team &
|
|
62
|
+
* the game chat's state. Each request costs 1 credit.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const sportsGameAudience = await client.x.sports.retrieveAudience('2055084502741811200', {
|
|
67
|
+
* league: 'nfl',
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
retrieveAudience(id: string, params: SportRetrieveAudienceParams, options?: RequestOptions): APIPromise<SportsGameAudience>;
|
|
72
|
+
/**
|
|
73
|
+
* Returns both teams' players for 1 NFL game. Each player has a jersey,
|
|
74
|
+
* position, headshot & X account. Each request costs 1 credit.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const footballRoster = await client.x.sports.retrieveRoster('2055084502741811200', {
|
|
79
|
+
* league: 'nfl',
|
|
80
|
+
* });
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
retrieveRoster(id: string, params: SportRetrieveRosterParams, options?: RequestOptions): APIPromise<FootballRoster>;
|
|
84
|
+
/**
|
|
85
|
+
* Returns the player prop lines & American odds X shows for 1 NFL game. X lists
|
|
86
|
+
* props before & during a game. Other games return no categories. Each request
|
|
87
|
+
* costs 1 credit.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const footballProps = await client.x.sports.retrievePlayerProps('2055084502741811200', {
|
|
92
|
+
* league: 'nfl',
|
|
93
|
+
* });
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
retrievePlayerProps(id: string, params: SportRetrievePlayerPropsParams, options?: RequestOptions): APIPromise<FootballProps>;
|
|
97
|
+
/**
|
|
98
|
+
* Returns the posts X shows on a game's page, with the X search that finds them.
|
|
99
|
+
* Works before, during & after the game. Pages hold up to 20 posts, & each post
|
|
100
|
+
* costs 1 credit.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* const sportsGamePosts = await client.x.sports.listPosts('2055084502741811200', {
|
|
105
|
+
* league: 'nfl',
|
|
106
|
+
* });
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
listPosts(id: string, params: SportListPostsParams, options?: RequestOptions): APIPromise<SportsGamePosts>;
|
|
58
110
|
}
|
|
59
111
|
/**
|
|
60
112
|
* nfl for the NFL or ncaafb for college football.
|
|
@@ -196,6 +248,55 @@ export interface SportsTeamLogos {
|
|
|
196
248
|
*/
|
|
197
249
|
dark: string | null;
|
|
198
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* The team's wins, losses & ties this season. X sends it only in college
|
|
253
|
+
* football games.
|
|
254
|
+
*/
|
|
255
|
+
export interface SportsTeamRecord {
|
|
256
|
+
/**
|
|
257
|
+
* Games the team won this season.
|
|
258
|
+
*/
|
|
259
|
+
wins: number | null;
|
|
260
|
+
/**
|
|
261
|
+
* Games the team lost this season.
|
|
262
|
+
*/
|
|
263
|
+
losses: number | null;
|
|
264
|
+
/**
|
|
265
|
+
* Games the team tied this season.
|
|
266
|
+
*/
|
|
267
|
+
ties: number | null;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* A recent game of a team, as X lists it with the team.
|
|
271
|
+
*/
|
|
272
|
+
export interface SportsTeamGame {
|
|
273
|
+
/**
|
|
274
|
+
* The game ID, which the game routes take.
|
|
275
|
+
*/
|
|
276
|
+
id: string;
|
|
277
|
+
/**
|
|
278
|
+
* When this game kicked off, in UTC. Null when X shows no time.
|
|
279
|
+
*/
|
|
280
|
+
startsAt: string | null;
|
|
281
|
+
/**
|
|
282
|
+
* The stadium. X has sent none in recent games so far.
|
|
283
|
+
*/
|
|
284
|
+
venue: string | null;
|
|
285
|
+
/**
|
|
286
|
+
* This game's status as X names it, such as Closed.
|
|
287
|
+
*/
|
|
288
|
+
status: string | null;
|
|
289
|
+
/**
|
|
290
|
+
* The game clock, as X writes it. X has sent none so far.
|
|
291
|
+
*/
|
|
292
|
+
clock: string | null;
|
|
293
|
+
/**
|
|
294
|
+
* The current or last quarter. X has sent none so far.
|
|
295
|
+
*/
|
|
296
|
+
quarter: number | null;
|
|
297
|
+
home: FootballTeamScore;
|
|
298
|
+
away: FootballTeamScore;
|
|
299
|
+
}
|
|
199
300
|
/**
|
|
200
301
|
* A team, as X's sports pages show it.
|
|
201
302
|
*/
|
|
@@ -221,8 +322,8 @@ export interface SportsTeam {
|
|
|
221
322
|
*/
|
|
222
323
|
alternateId: string | null;
|
|
223
324
|
/**
|
|
224
|
-
* The school or place
|
|
225
|
-
*
|
|
325
|
+
* The school or place the team plays for. X sends it in college football
|
|
326
|
+
* schedules & in a game's audience.
|
|
226
327
|
*/
|
|
227
328
|
location: string | null;
|
|
228
329
|
/**
|
|
@@ -237,6 +338,17 @@ export interface SportsTeam {
|
|
|
237
338
|
* The user ID of the team's X account.
|
|
238
339
|
*/
|
|
239
340
|
xUserId: string | null;
|
|
341
|
+
/**
|
|
342
|
+
* The team's wins, losses & ties this season. X sends it only in college
|
|
343
|
+
* football games.
|
|
344
|
+
*/
|
|
345
|
+
record: SportsTeamRecord | null;
|
|
346
|
+
/**
|
|
347
|
+
* The team's recent games, newest first. Games without a kickoff time come
|
|
348
|
+
* last. X sends them only with the teams of a college football game. The list
|
|
349
|
+
* is empty elsewhere.
|
|
350
|
+
*/
|
|
351
|
+
recentGames: Array<SportsTeamGame>;
|
|
240
352
|
}
|
|
241
353
|
/**
|
|
242
354
|
* A league's games in a time window.
|
|
@@ -576,6 +688,19 @@ export interface FootballPlayerXUser {
|
|
|
576
688
|
* Whether the account has a blue check.
|
|
577
689
|
*/
|
|
578
690
|
blueVerified: boolean | null;
|
|
691
|
+
/**
|
|
692
|
+
* Whether the account protects its posts. Only rosters carry it.
|
|
693
|
+
*/
|
|
694
|
+
protected: boolean | null;
|
|
695
|
+
/**
|
|
696
|
+
* Whether the account can offer subscriptions. Only rosters carry it.
|
|
697
|
+
*/
|
|
698
|
+
superFollowEligible: boolean | null;
|
|
699
|
+
/**
|
|
700
|
+
* The label X highlights on the account, such as BusinessLabel. Only rosters
|
|
701
|
+
* carry it.
|
|
702
|
+
*/
|
|
703
|
+
labelType: string | null;
|
|
579
704
|
}
|
|
580
705
|
/**
|
|
581
706
|
* A football player, as X's sports pages show them.
|
|
@@ -1248,6 +1373,248 @@ export interface FootballPlays {
|
|
|
1248
1373
|
[key: string]: FootballPlayer;
|
|
1249
1374
|
};
|
|
1250
1375
|
}
|
|
1376
|
+
/**
|
|
1377
|
+
* People watching the game on X at X's last count. Null before X counts any, as
|
|
1378
|
+
* before kickoff.
|
|
1379
|
+
*/
|
|
1380
|
+
export interface SportsGameAudienceViewers {
|
|
1381
|
+
/**
|
|
1382
|
+
* How many people watched the game on X.
|
|
1383
|
+
*/
|
|
1384
|
+
count: number;
|
|
1385
|
+
/**
|
|
1386
|
+
* When X counted them.
|
|
1387
|
+
*/
|
|
1388
|
+
asOf: string;
|
|
1389
|
+
}
|
|
1390
|
+
/**
|
|
1391
|
+
* 1 team's picks.
|
|
1392
|
+
*/
|
|
1393
|
+
export interface SportsGameAudienceTeamPick {
|
|
1394
|
+
/**
|
|
1395
|
+
* The team ID, a key in teams.
|
|
1396
|
+
*/
|
|
1397
|
+
teamId: string;
|
|
1398
|
+
/**
|
|
1399
|
+
* How many people picked this team.
|
|
1400
|
+
*/
|
|
1401
|
+
count: number | null;
|
|
1402
|
+
}
|
|
1403
|
+
/**
|
|
1404
|
+
* How many people on X picked a team to root for.
|
|
1405
|
+
*/
|
|
1406
|
+
export interface SportsGameAudienceTeamPicks {
|
|
1407
|
+
/**
|
|
1408
|
+
* Picks for every team in the game.
|
|
1409
|
+
*/
|
|
1410
|
+
total: number | null;
|
|
1411
|
+
/**
|
|
1412
|
+
* Picks per team.
|
|
1413
|
+
*/
|
|
1414
|
+
teams: Array<SportsGameAudienceTeamPick>;
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Time left until the chat opens. Null while it is open & after the game.
|
|
1418
|
+
*/
|
|
1419
|
+
export interface SportsGameAudienceChatOpensIn {
|
|
1420
|
+
/**
|
|
1421
|
+
* Whole days left.
|
|
1422
|
+
*/
|
|
1423
|
+
days: number | null;
|
|
1424
|
+
/**
|
|
1425
|
+
* Hours left after the days.
|
|
1426
|
+
*/
|
|
1427
|
+
hours: number | null;
|
|
1428
|
+
/**
|
|
1429
|
+
* Minutes left after the hours.
|
|
1430
|
+
*/
|
|
1431
|
+
minutes: number | null;
|
|
1432
|
+
}
|
|
1433
|
+
/**
|
|
1434
|
+
* The game's live chat on X.
|
|
1435
|
+
*/
|
|
1436
|
+
export interface SportsGameAudienceChat {
|
|
1437
|
+
/**
|
|
1438
|
+
* Whether the chat is open now.
|
|
1439
|
+
*/
|
|
1440
|
+
available: boolean | null;
|
|
1441
|
+
/**
|
|
1442
|
+
* X's ID for the game's chat room.
|
|
1443
|
+
*/
|
|
1444
|
+
broadcastId: string | null;
|
|
1445
|
+
/**
|
|
1446
|
+
* Time left until the chat opens. Null while it is open & after the game.
|
|
1447
|
+
*/
|
|
1448
|
+
opensIn: SportsGameAudienceChatOpensIn | null;
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Who watches & roots for 1 game on X.
|
|
1452
|
+
*/
|
|
1453
|
+
export interface SportsGameAudience {
|
|
1454
|
+
/**
|
|
1455
|
+
* The ID of the game, from your request.
|
|
1456
|
+
*/
|
|
1457
|
+
id: string;
|
|
1458
|
+
/**
|
|
1459
|
+
* The game's league, from your request.
|
|
1460
|
+
*/
|
|
1461
|
+
league: FootballLeague;
|
|
1462
|
+
/**
|
|
1463
|
+
* People watching the game on X at X's last count. Null before X counts any,
|
|
1464
|
+
* as before kickoff.
|
|
1465
|
+
*/
|
|
1466
|
+
viewers: SportsGameAudienceViewers | null;
|
|
1467
|
+
/**
|
|
1468
|
+
* How many people on X picked a team to root for.
|
|
1469
|
+
*/
|
|
1470
|
+
teamPicks: SportsGameAudienceTeamPicks;
|
|
1471
|
+
/**
|
|
1472
|
+
* The game's live chat on X.
|
|
1473
|
+
*/
|
|
1474
|
+
chat: SportsGameAudienceChat;
|
|
1475
|
+
/**
|
|
1476
|
+
* The game's teams, by team ID. X's team picker sends no short name,
|
|
1477
|
+
* alternate ID, X account or record, so those are null.
|
|
1478
|
+
*/
|
|
1479
|
+
teams: {
|
|
1480
|
+
[key: string]: SportsTeam;
|
|
1481
|
+
};
|
|
1482
|
+
}
|
|
1483
|
+
/**
|
|
1484
|
+
* 1 team's roster.
|
|
1485
|
+
*/
|
|
1486
|
+
export interface FootballRosterTeam {
|
|
1487
|
+
/**
|
|
1488
|
+
* The team this roster belongs to, a key of teams.
|
|
1489
|
+
*/
|
|
1490
|
+
teamId: string;
|
|
1491
|
+
/**
|
|
1492
|
+
* The team's players in X's order, keys of players.
|
|
1493
|
+
*/
|
|
1494
|
+
playerIds: Array<string>;
|
|
1495
|
+
}
|
|
1496
|
+
/**
|
|
1497
|
+
* Both teams' rosters for 1 NFL game.
|
|
1498
|
+
*/
|
|
1499
|
+
export interface FootballRoster {
|
|
1500
|
+
/**
|
|
1501
|
+
* The ID of the game these rosters cover.
|
|
1502
|
+
*/
|
|
1503
|
+
id: string;
|
|
1504
|
+
/**
|
|
1505
|
+
* The league of the game these rosters cover.
|
|
1506
|
+
*/
|
|
1507
|
+
league: 'nfl';
|
|
1508
|
+
/**
|
|
1509
|
+
* Each team's roster, in X's order.
|
|
1510
|
+
*/
|
|
1511
|
+
rosters: Array<FootballRosterTeam>;
|
|
1512
|
+
/**
|
|
1513
|
+
* The 2 teams, by team ID.
|
|
1514
|
+
*/
|
|
1515
|
+
teams: {
|
|
1516
|
+
[key: string]: SportsTeam;
|
|
1517
|
+
};
|
|
1518
|
+
/**
|
|
1519
|
+
* Every rostered player, by player ID. Rosters carry no college or birth
|
|
1520
|
+
* details & only a medium headshot, so the rest are null.
|
|
1521
|
+
*/
|
|
1522
|
+
players: {
|
|
1523
|
+
[key: string]: FootballPlayer;
|
|
1524
|
+
};
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* 1 player's line & odds in a prop category.
|
|
1528
|
+
*/
|
|
1529
|
+
export interface FootballPlayerProp {
|
|
1530
|
+
/**
|
|
1531
|
+
* The player the line is for, a key of players.
|
|
1532
|
+
*/
|
|
1533
|
+
playerId: string | null;
|
|
1534
|
+
/**
|
|
1535
|
+
* The line's place in its category, from 1.
|
|
1536
|
+
*/
|
|
1537
|
+
rank: number | null;
|
|
1538
|
+
/**
|
|
1539
|
+
* The line the odds price, such as 248.5 yards. Null when the prop has no
|
|
1540
|
+
* line, such as the first touchdown scorer.
|
|
1541
|
+
*/
|
|
1542
|
+
line: number | null;
|
|
1543
|
+
/**
|
|
1544
|
+
* The American odds X shows first, such as -115 or 240.
|
|
1545
|
+
*/
|
|
1546
|
+
odds: number | null;
|
|
1547
|
+
/**
|
|
1548
|
+
* The American odds X shows second. Null for a prop with 1 price.
|
|
1549
|
+
*/
|
|
1550
|
+
alternateOdds: number | null;
|
|
1551
|
+
/**
|
|
1552
|
+
* Whether the sportsbook takes bets on the line.
|
|
1553
|
+
*/
|
|
1554
|
+
openForBetting: boolean | null;
|
|
1555
|
+
}
|
|
1556
|
+
/**
|
|
1557
|
+
* 1 kind of player prop & its lines.
|
|
1558
|
+
*/
|
|
1559
|
+
export interface FootballPropCategory {
|
|
1560
|
+
/**
|
|
1561
|
+
* X's key for the prop, such as passing_yards.
|
|
1562
|
+
*/
|
|
1563
|
+
key: string | null;
|
|
1564
|
+
/**
|
|
1565
|
+
* The name X shows for the prop.
|
|
1566
|
+
*/
|
|
1567
|
+
name: string | null;
|
|
1568
|
+
/**
|
|
1569
|
+
* The category's place in X's order, from 1.
|
|
1570
|
+
*/
|
|
1571
|
+
rank: number | null;
|
|
1572
|
+
/**
|
|
1573
|
+
* Each player's line, in X's order.
|
|
1574
|
+
*/
|
|
1575
|
+
props: Array<FootballPlayerProp>;
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* The player props X shows for 1 NFL game.
|
|
1579
|
+
*/
|
|
1580
|
+
export interface FootballProps {
|
|
1581
|
+
/**
|
|
1582
|
+
* The ID of the game these props cover.
|
|
1583
|
+
*/
|
|
1584
|
+
id: string;
|
|
1585
|
+
/**
|
|
1586
|
+
* The league of the game these props cover.
|
|
1587
|
+
*/
|
|
1588
|
+
league: 'nfl';
|
|
1589
|
+
/**
|
|
1590
|
+
* The sportsbook page X links for these props.
|
|
1591
|
+
*/
|
|
1592
|
+
sportsbookUrl: string | null;
|
|
1593
|
+
/**
|
|
1594
|
+
* Each kind of prop, such as passing yards, in X's order. A game without props
|
|
1595
|
+
* has none.
|
|
1596
|
+
*/
|
|
1597
|
+
categories: Array<FootballPropCategory>;
|
|
1598
|
+
/**
|
|
1599
|
+
* The players these props name, by player ID. X sends only each player's
|
|
1600
|
+
* name, jersey & team, so other fields are null.
|
|
1601
|
+
*/
|
|
1602
|
+
players: {
|
|
1603
|
+
[key: string]: FootballPlayer;
|
|
1604
|
+
};
|
|
1605
|
+
}
|
|
1606
|
+
/**
|
|
1607
|
+
* A page of 1 game's posts. Pass next_cursor as cursor for the next page.
|
|
1608
|
+
*/
|
|
1609
|
+
export interface SportsGamePosts extends Shared.PaginatedTweets {
|
|
1610
|
+
/**
|
|
1611
|
+
* The X search that finds this game's posts for the order asked. It names the
|
|
1612
|
+
* teams, hashtags, accounts & star players, with the game's time window. Send
|
|
1613
|
+
* it to client.x.tweets.search for more filters. Null when the game has no
|
|
1614
|
+
* such search.
|
|
1615
|
+
*/
|
|
1616
|
+
query: string | null;
|
|
1617
|
+
}
|
|
1251
1618
|
export interface SportListGamesParams {
|
|
1252
1619
|
/**
|
|
1253
1620
|
* Fields to keep in each row, comma-separated. Use dots for nested fields,
|
|
@@ -1343,7 +1710,110 @@ export interface SportRetrievePlaysParams {
|
|
|
1343
1710
|
*/
|
|
1344
1711
|
omit?: string;
|
|
1345
1712
|
}
|
|
1713
|
+
export interface SportRetrieveAudienceParams {
|
|
1714
|
+
/**
|
|
1715
|
+
* Path param: nfl for the NFL or ncaafb for college football, in any case.
|
|
1716
|
+
* Another value gets a free 400 `invalid_league` before X is read.
|
|
1717
|
+
*/
|
|
1718
|
+
league: FootballLeague;
|
|
1719
|
+
/**
|
|
1720
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields,
|
|
1721
|
+
* such as author.username. A list keeps the field in each item. Case &
|
|
1722
|
+
* underscores do not matter. A row that lacks a field leaves it out. Cursors,
|
|
1723
|
+
* counts & diagnostics always stay. An unknown name answers 400 unknown_field
|
|
1724
|
+
* with the valid names, before any read. The price stays the same. SDK row
|
|
1725
|
+
* types then hold only the named fields.
|
|
1726
|
+
*/
|
|
1727
|
+
fields?: string;
|
|
1728
|
+
/**
|
|
1729
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
1730
|
+
* fields. With fields, it drops from the kept fields.
|
|
1731
|
+
*/
|
|
1732
|
+
omit?: string;
|
|
1733
|
+
}
|
|
1734
|
+
export interface SportRetrieveRosterParams {
|
|
1735
|
+
/**
|
|
1736
|
+
* Path param: nfl, in any case. X has no college rosters or props, so ncaafb
|
|
1737
|
+
* gets a free 400 `unsupported_league`. Another value gets a free 400
|
|
1738
|
+
* `invalid_league`.
|
|
1739
|
+
*/
|
|
1740
|
+
league: 'nfl';
|
|
1741
|
+
/**
|
|
1742
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields,
|
|
1743
|
+
* such as author.username. A list keeps the field in each item. Case &
|
|
1744
|
+
* underscores do not matter. A row that lacks a field leaves it out. Cursors,
|
|
1745
|
+
* counts & diagnostics always stay. An unknown name answers 400 unknown_field
|
|
1746
|
+
* with the valid names, before any read. The price stays the same. SDK row
|
|
1747
|
+
* types then hold only the named fields.
|
|
1748
|
+
*/
|
|
1749
|
+
fields?: string;
|
|
1750
|
+
/**
|
|
1751
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
1752
|
+
* fields. With fields, it drops from the kept fields.
|
|
1753
|
+
*/
|
|
1754
|
+
omit?: string;
|
|
1755
|
+
}
|
|
1756
|
+
export interface SportRetrievePlayerPropsParams {
|
|
1757
|
+
/**
|
|
1758
|
+
* Path param: nfl, in any case. X has no college rosters or props, so ncaafb
|
|
1759
|
+
* gets a free 400 `unsupported_league`. Another value gets a free 400
|
|
1760
|
+
* `invalid_league`.
|
|
1761
|
+
*/
|
|
1762
|
+
league: 'nfl';
|
|
1763
|
+
/**
|
|
1764
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields,
|
|
1765
|
+
* such as author.username. A list keeps the field in each item. Case &
|
|
1766
|
+
* underscores do not matter. A row that lacks a field leaves it out. Cursors,
|
|
1767
|
+
* counts & diagnostics always stay. An unknown name answers 400 unknown_field
|
|
1768
|
+
* with the valid names, before any read. The price stays the same. SDK row
|
|
1769
|
+
* types then hold only the named fields.
|
|
1770
|
+
*/
|
|
1771
|
+
fields?: string;
|
|
1772
|
+
/**
|
|
1773
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
1774
|
+
* fields. With fields, it drops from the kept fields.
|
|
1775
|
+
*/
|
|
1776
|
+
omit?: string;
|
|
1777
|
+
}
|
|
1778
|
+
export interface SportListPostsParams {
|
|
1779
|
+
/**
|
|
1780
|
+
* Path param: nfl for the NFL or ncaafb for college football, in any case.
|
|
1781
|
+
* Another value gets a free 400 `invalid_league` before X is read.
|
|
1782
|
+
*/
|
|
1783
|
+
league: FootballLeague;
|
|
1784
|
+
/**
|
|
1785
|
+
* Pagination cursor for collection results. Also read as next_cursor,
|
|
1786
|
+
* next_token, pagination_token or continuation_token.
|
|
1787
|
+
*/
|
|
1788
|
+
cursor?: string;
|
|
1789
|
+
/**
|
|
1790
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields,
|
|
1791
|
+
* such as author.username. A list keeps the field in each item. Case &
|
|
1792
|
+
* underscores do not matter. A row that lacks a field leaves it out. Cursors,
|
|
1793
|
+
* counts & diagnostics always stay. An unknown name answers 400 unknown_field
|
|
1794
|
+
* with the valid names, before any read. The price stays the same. SDK row
|
|
1795
|
+
* types then hold only the named fields.
|
|
1796
|
+
*/
|
|
1797
|
+
fields?: string;
|
|
1798
|
+
/**
|
|
1799
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
1800
|
+
* fields. With fields, it drops from the kept fields.
|
|
1801
|
+
*/
|
|
1802
|
+
omit?: string;
|
|
1803
|
+
/**
|
|
1804
|
+
* Items per page (1-100, default 20). Filters or credits can return fewer.
|
|
1805
|
+
* Follow next_cursor for more pages. Its aliases are limit, count, max_results,
|
|
1806
|
+
* maxItems, max_items & per_page.
|
|
1807
|
+
*/
|
|
1808
|
+
pageSize?: number;
|
|
1809
|
+
/**
|
|
1810
|
+
* Top for the posts X ranks highest, or Latest for the newest. Any case works,
|
|
1811
|
+
* & so do Relevance & Recency. Alias order or sort. Send the same value with
|
|
1812
|
+
* each cursor.
|
|
1813
|
+
*/
|
|
1814
|
+
queryType?: 'Top' | 'Latest';
|
|
1815
|
+
}
|
|
1346
1816
|
export declare namespace Sports {
|
|
1347
|
-
export { type FootballLeague as FootballLeague, type FootballTeamScore as FootballTeamScore, type FootballSchedulePeriod as FootballSchedulePeriod, type FootballOdds as FootballOdds, type FootballScheduleGameOdds as FootballScheduleGameOdds, type FootballScheduleGame as FootballScheduleGame, type SportsTeamColor as SportsTeamColor, type SportsTeamLogos as SportsTeamLogos, type SportsTeam as SportsTeam, type FootballSchedule as FootballSchedule, type FootballScoreboardSituation as FootballScoreboardSituation, type FootballSide as FootballSide, type FootballPeriod as FootballPeriod, type FootballPlayScore as FootballPlayScore, type FootballPlayStart as FootballPlayStart, type FootballPlayOnField as FootballPlayOnField, type FootballPlayDetailPlayer as FootballPlayDetailPlayer, type FootballPlayDetailPenalty as FootballPlayDetailPenalty, type FootballPlayDetail as FootballPlayDetail, type FootballPlayPost as FootballPlayPost, type FootballPlay as FootballPlay, type FootballPlayerHeadshots as FootballPlayerHeadshots, type FootballPlayerXUser as FootballPlayerXUser, type FootballPlayer as FootballPlayer, type FootballScoreboard as FootballScoreboard, type FootballTeamTotalsThirdDowns as FootballTeamTotalsThirdDowns, type FootballFumbleStats as FootballFumbleStats, type FootballPassingStats as FootballPassingStats, type FootballTeamTotalsPenalties as FootballTeamTotalsPenalties, type FootballRushingStats as FootballRushingStats, type FootballTeamTotals as FootballTeamTotals, type FootballPlayerStatsReceiving as FootballPlayerStatsReceiving, type FootballPlayerStatsDefense as FootballPlayerStatsDefense, type FootballReturnStats as FootballReturnStats, type FootballPlayerStatsPunts as FootballPlayerStatsPunts, type FootballPlayerStatsFieldGoals as FootballPlayerStatsFieldGoals, type FootballPlayerStatsExtraPoints as FootballPlayerStatsExtraPoints, type FootballPlayerStatsConversions as FootballPlayerStatsConversions, type FootballPlayerStats as FootballPlayerStats, type FootballTeamBox as FootballTeamBox, type FootballBoxScore as FootballBoxScore, type FootballDrive as FootballDrive, type FootballQuarter as FootballQuarter, type FootballPlays as FootballPlays, type SportListGamesParams as SportListGamesParams, type SportRetrieveScoreboardParams as SportRetrieveScoreboardParams, type SportRetrieveBoxScoreParams as SportRetrieveBoxScoreParams, type SportRetrievePlaysParams as SportRetrievePlaysParams, };
|
|
1817
|
+
export { type FootballLeague as FootballLeague, type FootballTeamScore as FootballTeamScore, type FootballSchedulePeriod as FootballSchedulePeriod, type FootballOdds as FootballOdds, type FootballScheduleGameOdds as FootballScheduleGameOdds, type FootballScheduleGame as FootballScheduleGame, type SportsTeamColor as SportsTeamColor, type SportsTeamLogos as SportsTeamLogos, type SportsTeam as SportsTeam, type FootballSchedule as FootballSchedule, type FootballScoreboardSituation as FootballScoreboardSituation, type FootballSide as FootballSide, type FootballPeriod as FootballPeriod, type FootballPlayScore as FootballPlayScore, type FootballPlayStart as FootballPlayStart, type FootballPlayOnField as FootballPlayOnField, type FootballPlayDetailPlayer as FootballPlayDetailPlayer, type FootballPlayDetailPenalty as FootballPlayDetailPenalty, type FootballPlayDetail as FootballPlayDetail, type FootballPlayPost as FootballPlayPost, type FootballPlay as FootballPlay, type FootballPlayerHeadshots as FootballPlayerHeadshots, type FootballPlayerXUser as FootballPlayerXUser, type FootballPlayer as FootballPlayer, type FootballScoreboard as FootballScoreboard, type FootballTeamTotalsThirdDowns as FootballTeamTotalsThirdDowns, type FootballFumbleStats as FootballFumbleStats, type FootballPassingStats as FootballPassingStats, type FootballTeamTotalsPenalties as FootballTeamTotalsPenalties, type FootballRushingStats as FootballRushingStats, type FootballTeamTotals as FootballTeamTotals, type FootballPlayerStatsReceiving as FootballPlayerStatsReceiving, type FootballPlayerStatsDefense as FootballPlayerStatsDefense, type FootballReturnStats as FootballReturnStats, type FootballPlayerStatsPunts as FootballPlayerStatsPunts, type FootballPlayerStatsFieldGoals as FootballPlayerStatsFieldGoals, type FootballPlayerStatsExtraPoints as FootballPlayerStatsExtraPoints, type FootballPlayerStatsConversions as FootballPlayerStatsConversions, type FootballPlayerStats as FootballPlayerStats, type FootballTeamBox as FootballTeamBox, type FootballBoxScore as FootballBoxScore, type FootballDrive as FootballDrive, type FootballQuarter as FootballQuarter, type FootballPlays as FootballPlays, type SportListGamesParams as SportListGamesParams, type SportRetrieveScoreboardParams as SportRetrieveScoreboardParams, type SportRetrieveBoxScoreParams as SportRetrieveBoxScoreParams, type SportRetrievePlaysParams as SportRetrievePlaysParams, type SportsTeamRecord as SportsTeamRecord, type SportsTeamGame as SportsTeamGame, type SportsGameAudienceViewers as SportsGameAudienceViewers, type SportsGameAudienceTeamPick as SportsGameAudienceTeamPick, type SportsGameAudienceTeamPicks as SportsGameAudienceTeamPicks, type SportsGameAudienceChatOpensIn as SportsGameAudienceChatOpensIn, type SportsGameAudienceChat as SportsGameAudienceChat, type SportsGameAudience as SportsGameAudience, type SportRetrieveAudienceParams as SportRetrieveAudienceParams, type FootballRosterTeam as FootballRosterTeam, type FootballRoster as FootballRoster, type FootballPlayerProp as FootballPlayerProp, type FootballPropCategory as FootballPropCategory, type FootballProps as FootballProps, type SportsGamePosts as SportsGamePosts, type SportRetrieveRosterParams as SportRetrieveRosterParams, type SportRetrievePlayerPropsParams as SportRetrievePlayerPropsParams, type SportListPostsParams as SportListPostsParams, };
|
|
1348
1818
|
}
|
|
1349
1819
|
//# sourceMappingURL=sports.d.mts.map
|