x-twitter-scraper 0.18.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 +24 -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 +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/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 +10 -0
- package/src/resources/x/media.ts +50 -0
- package/src/resources/x/sports.ts +379 -1
- package/src/resources/x/tweets/tweets.ts +35 -0
- package/src/resources/x/x.ts +20 -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
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
5
|
import { APIResource } from '../../core/resource';
|
|
6
|
+
import * as Shared from '../shared';
|
|
6
7
|
import { APIPromise } from '../../core/api-promise';
|
|
7
8
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
9
|
import { path } from '../../internal/utils/path';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
|
-
* NFL & college football games, scoreboards, plays, box scores
|
|
12
|
+
* NFL & college football games, scoreboards, plays, box scores, audiences,
|
|
13
|
+
* rosters, player props & posts
|
|
12
14
|
*/
|
|
13
15
|
export class Sports extends APIResource {
|
|
14
16
|
/**
|
|
@@ -111,6 +113,64 @@ export class Sports extends APIResource {
|
|
|
111
113
|
const { league, ...query } = params;
|
|
112
114
|
return this._client.get(path`/x/sports/${league}/games/${id}/audience`, { query, ...options });
|
|
113
115
|
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Returns both teams' players for 1 NFL game. Each player has a jersey,
|
|
119
|
+
* position, headshot & X account. Each request costs 1 credit.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* const footballRoster = await client.x.sports.retrieveRoster('2055084502741811200', {
|
|
124
|
+
* league: 'nfl',
|
|
125
|
+
* });
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
retrieveRoster(
|
|
129
|
+
id: string,
|
|
130
|
+
params: SportRetrieveRosterParams,
|
|
131
|
+
options?: RequestOptions,
|
|
132
|
+
): APIPromise<FootballRoster> {
|
|
133
|
+
const { league, ...query } = params;
|
|
134
|
+
return this._client.get(path`/x/sports/${league}/games/${id}/roster`, { query, ...options });
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Returns the player prop lines & American odds X shows for 1 NFL game. X lists
|
|
139
|
+
* props before & during a game. Other games return no categories. Each request
|
|
140
|
+
* costs 1 credit.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```ts
|
|
144
|
+
* const footballProps = await client.x.sports.retrievePlayerProps('2055084502741811200', {
|
|
145
|
+
* league: 'nfl',
|
|
146
|
+
* });
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
retrievePlayerProps(
|
|
150
|
+
id: string,
|
|
151
|
+
params: SportRetrievePlayerPropsParams,
|
|
152
|
+
options?: RequestOptions,
|
|
153
|
+
): APIPromise<FootballProps> {
|
|
154
|
+
const { league, ...query } = params;
|
|
155
|
+
return this._client.get(path`/x/sports/${league}/games/${id}/player-props`, { query, ...options });
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Returns the posts X shows on a game's page, with the X search that finds them.
|
|
160
|
+
* Works before, during & after the game. Pages hold up to 20 posts, & each post
|
|
161
|
+
* costs 1 credit.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```ts
|
|
165
|
+
* const sportsGamePosts = await client.x.sports.listPosts('2055084502741811200', {
|
|
166
|
+
* league: 'nfl',
|
|
167
|
+
* });
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
listPosts(id: string, params: SportListPostsParams, options?: RequestOptions): APIPromise<SportsGamePosts> {
|
|
171
|
+
const { league, ...query } = params;
|
|
172
|
+
return this._client.get(path`/x/sports/${league}/games/${id}/posts`, { query, ...options });
|
|
173
|
+
}
|
|
114
174
|
}
|
|
115
175
|
|
|
116
176
|
/**
|
|
@@ -301,6 +361,45 @@ export interface SportsTeamRecord {
|
|
|
301
361
|
ties: number | null;
|
|
302
362
|
}
|
|
303
363
|
|
|
364
|
+
/**
|
|
365
|
+
* A recent game of a team, as X lists it with the team.
|
|
366
|
+
*/
|
|
367
|
+
export interface SportsTeamGame {
|
|
368
|
+
/**
|
|
369
|
+
* The game ID, which the game routes take.
|
|
370
|
+
*/
|
|
371
|
+
id: string;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* When this game kicked off, in UTC. Null when X shows no time.
|
|
375
|
+
*/
|
|
376
|
+
startsAt: string | null;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* The stadium. X has sent none in recent games so far.
|
|
380
|
+
*/
|
|
381
|
+
venue: string | null;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* This game's status as X names it, such as Closed.
|
|
385
|
+
*/
|
|
386
|
+
status: string | null;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* The game clock, as X writes it. X has sent none so far.
|
|
390
|
+
*/
|
|
391
|
+
clock: string | null;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* The current or last quarter. X has sent none so far.
|
|
395
|
+
*/
|
|
396
|
+
quarter: number | null;
|
|
397
|
+
|
|
398
|
+
home: FootballTeamScore;
|
|
399
|
+
|
|
400
|
+
away: FootballTeamScore;
|
|
401
|
+
}
|
|
402
|
+
|
|
304
403
|
/**
|
|
305
404
|
* A team, as X's sports pages show it.
|
|
306
405
|
*/
|
|
@@ -356,6 +455,13 @@ export interface SportsTeam {
|
|
|
356
455
|
* football games.
|
|
357
456
|
*/
|
|
358
457
|
record: SportsTeamRecord | null;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* The team's recent games, newest first. Games without a kickoff time come
|
|
461
|
+
* last. X sends them only with the teams of a college football game. The list
|
|
462
|
+
* is empty elsewhere.
|
|
463
|
+
*/
|
|
464
|
+
recentGames: Array<SportsTeamGame>;
|
|
359
465
|
}
|
|
360
466
|
|
|
361
467
|
/**
|
|
@@ -760,6 +866,22 @@ export interface FootballPlayerXUser {
|
|
|
760
866
|
* Whether the account has a blue check.
|
|
761
867
|
*/
|
|
762
868
|
blueVerified: boolean | null;
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Whether the account protects its posts. Only rosters carry it.
|
|
872
|
+
*/
|
|
873
|
+
protected: boolean | null;
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Whether the account can offer subscriptions. Only rosters carry it.
|
|
877
|
+
*/
|
|
878
|
+
superFollowEligible: boolean | null;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* The label X highlights on the account, such as BusinessLabel. Only rosters
|
|
882
|
+
* carry it.
|
|
883
|
+
*/
|
|
884
|
+
labelType: string | null;
|
|
763
885
|
}
|
|
764
886
|
|
|
765
887
|
/**
|
|
@@ -1682,6 +1804,158 @@ export interface SportsGameAudience {
|
|
|
1682
1804
|
teams: { [key: string]: SportsTeam };
|
|
1683
1805
|
}
|
|
1684
1806
|
|
|
1807
|
+
/**
|
|
1808
|
+
* 1 team's roster.
|
|
1809
|
+
*/
|
|
1810
|
+
export interface FootballRosterTeam {
|
|
1811
|
+
/**
|
|
1812
|
+
* The team this roster belongs to, a key of teams.
|
|
1813
|
+
*/
|
|
1814
|
+
teamId: string;
|
|
1815
|
+
|
|
1816
|
+
/**
|
|
1817
|
+
* The team's players in X's order, keys of players.
|
|
1818
|
+
*/
|
|
1819
|
+
playerIds: Array<string>;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* Both teams' rosters for 1 NFL game.
|
|
1824
|
+
*/
|
|
1825
|
+
export interface FootballRoster {
|
|
1826
|
+
/**
|
|
1827
|
+
* The ID of the game these rosters cover.
|
|
1828
|
+
*/
|
|
1829
|
+
id: string;
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* The league of the game these rosters cover.
|
|
1833
|
+
*/
|
|
1834
|
+
league: 'nfl';
|
|
1835
|
+
|
|
1836
|
+
/**
|
|
1837
|
+
* Each team's roster, in X's order.
|
|
1838
|
+
*/
|
|
1839
|
+
rosters: Array<FootballRosterTeam>;
|
|
1840
|
+
|
|
1841
|
+
/**
|
|
1842
|
+
* The 2 teams, by team ID.
|
|
1843
|
+
*/
|
|
1844
|
+
teams: { [key: string]: SportsTeam };
|
|
1845
|
+
|
|
1846
|
+
/**
|
|
1847
|
+
* Every rostered player, by player ID. Rosters carry no college or birth
|
|
1848
|
+
* details & only a medium headshot, so the rest are null.
|
|
1849
|
+
*/
|
|
1850
|
+
players: { [key: string]: FootballPlayer };
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
/**
|
|
1854
|
+
* 1 player's line & odds in a prop category.
|
|
1855
|
+
*/
|
|
1856
|
+
export interface FootballPlayerProp {
|
|
1857
|
+
/**
|
|
1858
|
+
* The player the line is for, a key of players.
|
|
1859
|
+
*/
|
|
1860
|
+
playerId: string | null;
|
|
1861
|
+
|
|
1862
|
+
/**
|
|
1863
|
+
* The line's place in its category, from 1.
|
|
1864
|
+
*/
|
|
1865
|
+
rank: number | null;
|
|
1866
|
+
|
|
1867
|
+
/**
|
|
1868
|
+
* The line the odds price, such as 248.5 yards. Null when the prop has no
|
|
1869
|
+
* line, such as the first touchdown scorer.
|
|
1870
|
+
*/
|
|
1871
|
+
line: number | null;
|
|
1872
|
+
|
|
1873
|
+
/**
|
|
1874
|
+
* The American odds X shows first, such as -115 or 240.
|
|
1875
|
+
*/
|
|
1876
|
+
odds: number | null;
|
|
1877
|
+
|
|
1878
|
+
/**
|
|
1879
|
+
* The American odds X shows second. Null for a prop with 1 price.
|
|
1880
|
+
*/
|
|
1881
|
+
alternateOdds: number | null;
|
|
1882
|
+
|
|
1883
|
+
/**
|
|
1884
|
+
* Whether the sportsbook takes bets on the line.
|
|
1885
|
+
*/
|
|
1886
|
+
openForBetting: boolean | null;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
/**
|
|
1890
|
+
* 1 kind of player prop & its lines.
|
|
1891
|
+
*/
|
|
1892
|
+
export interface FootballPropCategory {
|
|
1893
|
+
/**
|
|
1894
|
+
* X's key for the prop, such as passing_yards.
|
|
1895
|
+
*/
|
|
1896
|
+
key: string | null;
|
|
1897
|
+
|
|
1898
|
+
/**
|
|
1899
|
+
* The name X shows for the prop.
|
|
1900
|
+
*/
|
|
1901
|
+
name: string | null;
|
|
1902
|
+
|
|
1903
|
+
/**
|
|
1904
|
+
* The category's place in X's order, from 1.
|
|
1905
|
+
*/
|
|
1906
|
+
rank: number | null;
|
|
1907
|
+
|
|
1908
|
+
/**
|
|
1909
|
+
* Each player's line, in X's order.
|
|
1910
|
+
*/
|
|
1911
|
+
props: Array<FootballPlayerProp>;
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
/**
|
|
1915
|
+
* The player props X shows for 1 NFL game.
|
|
1916
|
+
*/
|
|
1917
|
+
export interface FootballProps {
|
|
1918
|
+
/**
|
|
1919
|
+
* The ID of the game these props cover.
|
|
1920
|
+
*/
|
|
1921
|
+
id: string;
|
|
1922
|
+
|
|
1923
|
+
/**
|
|
1924
|
+
* The league of the game these props cover.
|
|
1925
|
+
*/
|
|
1926
|
+
league: 'nfl';
|
|
1927
|
+
|
|
1928
|
+
/**
|
|
1929
|
+
* The sportsbook page X links for these props.
|
|
1930
|
+
*/
|
|
1931
|
+
sportsbookUrl: string | null;
|
|
1932
|
+
|
|
1933
|
+
/**
|
|
1934
|
+
* Each kind of prop, such as passing yards, in X's order. A game without props
|
|
1935
|
+
* has none.
|
|
1936
|
+
*/
|
|
1937
|
+
categories: Array<FootballPropCategory>;
|
|
1938
|
+
|
|
1939
|
+
/**
|
|
1940
|
+
* The players these props name, by player ID. X sends only each player's
|
|
1941
|
+
* name, jersey & team, so other fields are null.
|
|
1942
|
+
*/
|
|
1943
|
+
players: { [key: string]: FootballPlayer };
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
/**
|
|
1947
|
+
* A page of 1 game's posts. Pass next_cursor as cursor for the next page.
|
|
1948
|
+
*/
|
|
1949
|
+
export interface SportsGamePosts extends Shared.PaginatedTweets {
|
|
1950
|
+
/**
|
|
1951
|
+
* The X search that finds this game's posts for the order asked. It names the
|
|
1952
|
+
* teams, hashtags, accounts & star players, with the game's time window. Send
|
|
1953
|
+
* it to client.x.tweets.search for more filters. Null when the game has no
|
|
1954
|
+
* such search.
|
|
1955
|
+
*/
|
|
1956
|
+
query: string | null;
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1685
1959
|
export interface SportListGamesParams {
|
|
1686
1960
|
/**
|
|
1687
1961
|
* Fields to keep in each row, comma-separated. Use dots for nested fields,
|
|
@@ -1815,6 +2089,100 @@ export interface SportRetrieveAudienceParams {
|
|
|
1815
2089
|
omit?: string;
|
|
1816
2090
|
}
|
|
1817
2091
|
|
|
2092
|
+
export interface SportRetrieveRosterParams {
|
|
2093
|
+
/**
|
|
2094
|
+
* Path param: nfl, in any case. X has no college rosters or props, so ncaafb
|
|
2095
|
+
* gets a free 400 `unsupported_league`. Another value gets a free 400
|
|
2096
|
+
* `invalid_league`.
|
|
2097
|
+
*/
|
|
2098
|
+
league: 'nfl';
|
|
2099
|
+
|
|
2100
|
+
/**
|
|
2101
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields,
|
|
2102
|
+
* such as author.username. A list keeps the field in each item. Case &
|
|
2103
|
+
* underscores do not matter. A row that lacks a field leaves it out. Cursors,
|
|
2104
|
+
* counts & diagnostics always stay. An unknown name answers 400 unknown_field
|
|
2105
|
+
* with the valid names, before any read. The price stays the same. SDK row
|
|
2106
|
+
* types then hold only the named fields.
|
|
2107
|
+
*/
|
|
2108
|
+
fields?: string;
|
|
2109
|
+
|
|
2110
|
+
/**
|
|
2111
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
2112
|
+
* fields. With fields, it drops from the kept fields.
|
|
2113
|
+
*/
|
|
2114
|
+
omit?: string;
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
export interface SportRetrievePlayerPropsParams {
|
|
2118
|
+
/**
|
|
2119
|
+
* Path param: nfl, in any case. X has no college rosters or props, so ncaafb
|
|
2120
|
+
* gets a free 400 `unsupported_league`. Another value gets a free 400
|
|
2121
|
+
* `invalid_league`.
|
|
2122
|
+
*/
|
|
2123
|
+
league: 'nfl';
|
|
2124
|
+
|
|
2125
|
+
/**
|
|
2126
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields,
|
|
2127
|
+
* such as author.username. A list keeps the field in each item. Case &
|
|
2128
|
+
* underscores do not matter. A row that lacks a field leaves it out. Cursors,
|
|
2129
|
+
* counts & diagnostics always stay. An unknown name answers 400 unknown_field
|
|
2130
|
+
* with the valid names, before any read. The price stays the same. SDK row
|
|
2131
|
+
* types then hold only the named fields.
|
|
2132
|
+
*/
|
|
2133
|
+
fields?: string;
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
2137
|
+
* fields. With fields, it drops from the kept fields.
|
|
2138
|
+
*/
|
|
2139
|
+
omit?: string;
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
export interface SportListPostsParams {
|
|
2143
|
+
/**
|
|
2144
|
+
* Path param: nfl for the NFL or ncaafb for college football, in any case.
|
|
2145
|
+
* Another value gets a free 400 `invalid_league` before X is read.
|
|
2146
|
+
*/
|
|
2147
|
+
league: FootballLeague;
|
|
2148
|
+
|
|
2149
|
+
/**
|
|
2150
|
+
* Pagination cursor for collection results. Also read as next_cursor,
|
|
2151
|
+
* next_token, pagination_token or continuation_token.
|
|
2152
|
+
*/
|
|
2153
|
+
cursor?: string;
|
|
2154
|
+
|
|
2155
|
+
/**
|
|
2156
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields,
|
|
2157
|
+
* such as author.username. A list keeps the field in each item. Case &
|
|
2158
|
+
* underscores do not matter. A row that lacks a field leaves it out. Cursors,
|
|
2159
|
+
* counts & diagnostics always stay. An unknown name answers 400 unknown_field
|
|
2160
|
+
* with the valid names, before any read. The price stays the same. SDK row
|
|
2161
|
+
* types then hold only the named fields.
|
|
2162
|
+
*/
|
|
2163
|
+
fields?: string;
|
|
2164
|
+
|
|
2165
|
+
/**
|
|
2166
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
2167
|
+
* fields. With fields, it drops from the kept fields.
|
|
2168
|
+
*/
|
|
2169
|
+
omit?: string;
|
|
2170
|
+
|
|
2171
|
+
/**
|
|
2172
|
+
* Items per page (1-100, default 20). Filters or credits can return fewer.
|
|
2173
|
+
* Follow next_cursor for more pages. Its aliases are limit, count, max_results,
|
|
2174
|
+
* maxItems, max_items & per_page.
|
|
2175
|
+
*/
|
|
2176
|
+
pageSize?: number;
|
|
2177
|
+
|
|
2178
|
+
/**
|
|
2179
|
+
* Top for the posts X ranks highest, or Latest for the newest. Any case works,
|
|
2180
|
+
* & so do Relevance & Recency. Alias order or sort. Send the same value with
|
|
2181
|
+
* each cursor.
|
|
2182
|
+
*/
|
|
2183
|
+
queryType?: 'Top' | 'Latest';
|
|
2184
|
+
}
|
|
2185
|
+
|
|
1818
2186
|
export declare namespace Sports {
|
|
1819
2187
|
export {
|
|
1820
2188
|
type FootballLeague as FootballLeague,
|
|
@@ -1866,6 +2234,7 @@ export declare namespace Sports {
|
|
|
1866
2234
|
type SportRetrieveBoxScoreParams as SportRetrieveBoxScoreParams,
|
|
1867
2235
|
type SportRetrievePlaysParams as SportRetrievePlaysParams,
|
|
1868
2236
|
type SportsTeamRecord as SportsTeamRecord,
|
|
2237
|
+
type SportsTeamGame as SportsTeamGame,
|
|
1869
2238
|
type SportsGameAudienceViewers as SportsGameAudienceViewers,
|
|
1870
2239
|
type SportsGameAudienceTeamPick as SportsGameAudienceTeamPick,
|
|
1871
2240
|
type SportsGameAudienceTeamPicks as SportsGameAudienceTeamPicks,
|
|
@@ -1873,5 +2242,14 @@ export declare namespace Sports {
|
|
|
1873
2242
|
type SportsGameAudienceChat as SportsGameAudienceChat,
|
|
1874
2243
|
type SportsGameAudience as SportsGameAudience,
|
|
1875
2244
|
type SportRetrieveAudienceParams as SportRetrieveAudienceParams,
|
|
2245
|
+
type FootballRosterTeam as FootballRosterTeam,
|
|
2246
|
+
type FootballRoster as FootballRoster,
|
|
2247
|
+
type FootballPlayerProp as FootballPlayerProp,
|
|
2248
|
+
type FootballPropCategory as FootballPropCategory,
|
|
2249
|
+
type FootballProps as FootballProps,
|
|
2250
|
+
type SportsGamePosts as SportsGamePosts,
|
|
2251
|
+
type SportRetrieveRosterParams as SportRetrieveRosterParams,
|
|
2252
|
+
type SportRetrievePlayerPropsParams as SportRetrievePlayerPropsParams,
|
|
2253
|
+
type SportListPostsParams as SportListPostsParams,
|
|
1876
2254
|
};
|
|
1877
2255
|
}
|
|
@@ -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
|
*/
|
package/src/resources/x/x.ts
CHANGED
|
@@ -141,6 +141,7 @@ import {
|
|
|
141
141
|
FootballPlayStart,
|
|
142
142
|
FootballPlayer,
|
|
143
143
|
FootballPlayerHeadshots,
|
|
144
|
+
FootballPlayerProp,
|
|
144
145
|
FootballPlayerStats,
|
|
145
146
|
FootballPlayerStatsConversions,
|
|
146
147
|
FootballPlayerStatsDefense,
|
|
@@ -150,8 +151,12 @@ import {
|
|
|
150
151
|
FootballPlayerStatsReceiving,
|
|
151
152
|
FootballPlayerXUser,
|
|
152
153
|
FootballPlays,
|
|
154
|
+
FootballPropCategory,
|
|
155
|
+
FootballProps,
|
|
153
156
|
FootballQuarter,
|
|
154
157
|
FootballReturnStats,
|
|
158
|
+
FootballRoster,
|
|
159
|
+
FootballRosterTeam,
|
|
155
160
|
FootballRushingStats,
|
|
156
161
|
FootballSchedule,
|
|
157
162
|
FootballScheduleGame,
|
|
@@ -166,9 +171,12 @@ import {
|
|
|
166
171
|
FootballTeamTotalsPenalties,
|
|
167
172
|
FootballTeamTotalsThirdDowns,
|
|
168
173
|
SportListGamesParams,
|
|
174
|
+
SportListPostsParams,
|
|
169
175
|
SportRetrieveAudienceParams,
|
|
170
176
|
SportRetrieveBoxScoreParams,
|
|
177
|
+
SportRetrievePlayerPropsParams,
|
|
171
178
|
SportRetrievePlaysParams,
|
|
179
|
+
SportRetrieveRosterParams,
|
|
172
180
|
SportRetrieveScoreboardParams,
|
|
173
181
|
Sports,
|
|
174
182
|
SportsGameAudience,
|
|
@@ -177,8 +185,10 @@ import {
|
|
|
177
185
|
SportsGameAudienceTeamPick,
|
|
178
186
|
SportsGameAudienceTeamPicks,
|
|
179
187
|
SportsGameAudienceViewers,
|
|
188
|
+
SportsGamePosts,
|
|
180
189
|
SportsTeam,
|
|
181
190
|
SportsTeamColor,
|
|
191
|
+
SportsTeamGame,
|
|
182
192
|
SportsTeamLogos,
|
|
183
193
|
SportsTeamRecord,
|
|
184
194
|
} from './sports';
|
|
@@ -2188,6 +2198,7 @@ export declare namespace X {
|
|
|
2188
2198
|
type SportRetrieveBoxScoreParams as SportRetrieveBoxScoreParams,
|
|
2189
2199
|
type SportRetrievePlaysParams as SportRetrievePlaysParams,
|
|
2190
2200
|
type SportsTeamRecord as SportsTeamRecord,
|
|
2201
|
+
type SportsTeamGame as SportsTeamGame,
|
|
2191
2202
|
type SportsGameAudienceViewers as SportsGameAudienceViewers,
|
|
2192
2203
|
type SportsGameAudienceTeamPick as SportsGameAudienceTeamPick,
|
|
2193
2204
|
type SportsGameAudienceTeamPicks as SportsGameAudienceTeamPicks,
|
|
@@ -2195,5 +2206,14 @@ export declare namespace X {
|
|
|
2195
2206
|
type SportsGameAudienceChat as SportsGameAudienceChat,
|
|
2196
2207
|
type SportsGameAudience as SportsGameAudience,
|
|
2197
2208
|
type SportRetrieveAudienceParams as SportRetrieveAudienceParams,
|
|
2209
|
+
type FootballRosterTeam as FootballRosterTeam,
|
|
2210
|
+
type FootballRoster as FootballRoster,
|
|
2211
|
+
type FootballPlayerProp as FootballPlayerProp,
|
|
2212
|
+
type FootballPropCategory as FootballPropCategory,
|
|
2213
|
+
type FootballProps as FootballProps,
|
|
2214
|
+
type SportsGamePosts as SportsGamePosts,
|
|
2215
|
+
type SportRetrieveRosterParams as SportRetrieveRosterParams,
|
|
2216
|
+
type SportRetrievePlayerPropsParams as SportRetrievePlayerPropsParams,
|
|
2217
|
+
type SportListPostsParams as SportListPostsParams,
|
|
2198
2218
|
};
|
|
2199
2219
|
}
|
package/src/version.ts
CHANGED
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.19.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.19.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED