x-twitter-scraper 0.13.2 → 0.14.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 +20 -0
- package/README.md +78 -37
- package/client.d.mts +3 -15
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -15
- package/client.d.ts.map +1 -1
- package/client.js +4 -50
- package/client.js.map +1 -1
- package/client.mjs +4 -50
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +0 -8
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +0 -8
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js +0 -11
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +0 -11
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts.map +1 -1
- package/core/error.js +0 -1
- package/core/error.js.map +1 -1
- package/core/error.mjs +0 -1
- package/core/error.mjs.map +1 -1
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.js +0 -10
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +0 -10
- package/core/streaming.mjs.map +1 -1
- package/internal/builtin-types.d.mts +0 -41
- package/internal/builtin-types.d.mts.map +1 -1
- package/internal/builtin-types.d.ts +0 -41
- package/internal/builtin-types.d.ts.map +1 -1
- package/internal/decoders/line.d.mts.map +1 -1
- package/internal/decoders/line.d.ts.map +1 -1
- package/internal/decoders/line.js +4 -21
- package/internal/decoders/line.js.map +1 -1
- package/internal/decoders/line.mjs +4 -21
- package/internal/decoders/line.mjs.map +1 -1
- package/internal/detect-platform.d.mts.map +1 -1
- package/internal/detect-platform.d.ts.map +1 -1
- package/internal/detect-platform.js +0 -20
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +0 -20
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/errors.d.mts.map +1 -1
- package/internal/errors.d.ts.map +1 -1
- package/internal/errors.js +0 -2
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs +0 -2
- package/internal/errors.mjs.map +1 -1
- package/internal/headers.d.mts +0 -8
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts +0 -8
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +0 -2
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +0 -2
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +0 -4
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +0 -4
- package/internal/parse.mjs.map +1 -1
- package/internal/shim-types.d.mts +0 -6
- package/internal/shim-types.d.mts.map +1 -1
- package/internal/shim-types.d.ts +0 -6
- package/internal/shim-types.d.ts.map +1 -1
- package/internal/shims.d.mts +0 -9
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +0 -9
- package/internal/shims.d.ts.map +1 -1
- package/internal/shims.js +2 -7
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +2 -7
- package/internal/shims.mjs.map +1 -1
- package/internal/to-file.d.mts +0 -16
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts +0 -16
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js +3 -14
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +3 -14
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +1 -32
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +1 -32
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts +0 -8
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +0 -8
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +0 -18
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +0 -18
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/env.d.mts +0 -7
- package/internal/utils/env.d.mts.map +1 -1
- package/internal/utils/env.d.ts +0 -7
- package/internal/utils/env.d.ts.map +1 -1
- package/internal/utils/env.js +0 -7
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +0 -7
- package/internal/utils/env.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +1 -2
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -2
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts +0 -3
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts +0 -3
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js +0 -6
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +0 -6
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.d.mts +0 -3
- package/internal/utils/query.d.mts.map +1 -1
- package/internal/utils/query.d.ts +0 -3
- package/internal/utils/query.d.ts.map +1 -1
- package/internal/utils/query.js +0 -3
- package/internal/utils/query.js.map +1 -1
- package/internal/utils/query.mjs +0 -3
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.d.mts +0 -1
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts +0 -1
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +0 -3
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +0 -3
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/x/community-notes.d.mts +850 -0
- package/resources/x/community-notes.d.mts.map +1 -0
- package/resources/x/community-notes.d.ts +850 -0
- package/resources/x/community-notes.d.ts.map +1 -0
- package/resources/x/community-notes.js +62 -0
- package/resources/x/community-notes.js.map +1 -0
- package/resources/x/community-notes.mjs +58 -0
- package/resources/x/community-notes.mjs.map +1 -0
- package/resources/x/index.d.mts +2 -1
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +2 -1
- package/resources/x/index.d.ts.map +1 -1
- package/resources/x/index.js +3 -1
- package/resources/x/index.js.map +1 -1
- package/resources/x/index.mjs +1 -0
- package/resources/x/index.mjs.map +1 -1
- package/resources/x/x.d.mts +255 -1
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +255 -1
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js +38 -0
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs +38 -0
- package/resources/x/x.mjs.map +1 -1
- package/src/client.ts +12 -52
- package/src/core/api-promise.ts +0 -11
- package/src/core/error.ts +0 -1
- package/src/core/streaming.ts +0 -10
- package/src/internal/builtin-types.ts +0 -41
- package/src/internal/decoders/line.ts +4 -21
- package/src/internal/detect-platform.ts +0 -21
- package/src/internal/errors.ts +0 -2
- package/src/internal/headers.ts +0 -10
- package/src/internal/parse.ts +0 -4
- package/src/internal/shim-types.ts +0 -7
- package/src/internal/shims.ts +2 -14
- package/src/internal/to-file.ts +3 -33
- package/src/internal/types.ts +0 -30
- package/src/internal/uploads.ts +0 -18
- package/src/internal/utils/env.ts +0 -7
- package/src/internal/utils/log.ts +1 -2
- package/src/internal/utils/path.ts +0 -6
- package/src/internal/utils/query.ts +0 -3
- package/src/internal/utils/values.ts +0 -3
- package/src/resources/index.ts +4 -0
- package/src/resources/x/community-notes.ts +1040 -0
- package/src/resources/x/index.ts +13 -0
- package/src/resources/x/x.ts +335 -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.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/src/resources/x/index.ts
CHANGED
|
@@ -65,6 +65,15 @@ export {
|
|
|
65
65
|
type CommunityRetrieveSearchParams,
|
|
66
66
|
type CommunitySearchMembersParams,
|
|
67
67
|
} from './communities/index';
|
|
68
|
+
export {
|
|
69
|
+
CommunityNotes,
|
|
70
|
+
type CommunityNoteListContributorDeletedNotesResponse,
|
|
71
|
+
type CommunityNoteListContributorNotesResponse,
|
|
72
|
+
type CommunityNoteRetrieveContributorResponse,
|
|
73
|
+
type CommunityNoteListContributorDeletedNotesParams,
|
|
74
|
+
type CommunityNoteListContributorNotesParams,
|
|
75
|
+
type CommunityNoteRetrieveContributorParams,
|
|
76
|
+
} from './community-notes';
|
|
68
77
|
export {
|
|
69
78
|
Dm,
|
|
70
79
|
type DmDeleteMessageResponse,
|
|
@@ -206,16 +215,20 @@ export {
|
|
|
206
215
|
type XAutocompleteSearchResponse,
|
|
207
216
|
type XGetArticleResponse,
|
|
208
217
|
type XGetHashflagsResponse,
|
|
218
|
+
type XGetNewsStoryVersionsResponse,
|
|
209
219
|
type XGetNotificationsResponse,
|
|
210
220
|
type XGetTrendLocationsResponse,
|
|
211
221
|
type XGetTrendsResponse,
|
|
222
|
+
type XGetTrendsHistoryResponse,
|
|
212
223
|
type XSearchPlacesResponse,
|
|
213
224
|
type XAutocompleteSearchParams,
|
|
214
225
|
type XGetArticleParams,
|
|
215
226
|
type XGetHashflagsParams,
|
|
216
227
|
type XGetHomeTimelineParams,
|
|
228
|
+
type XGetNewsStoryVersionsParams,
|
|
217
229
|
type XGetNotificationsParams,
|
|
218
230
|
type XGetTrendLocationsParams,
|
|
219
231
|
type XGetTrendsParams,
|
|
232
|
+
type XGetTrendsHistoryParams,
|
|
220
233
|
type XSearchPlacesParams,
|
|
221
234
|
} from './x';
|
package/src/resources/x/x.ts
CHANGED
|
@@ -54,6 +54,16 @@ import {
|
|
|
54
54
|
} from './bookmarks';
|
|
55
55
|
import * as BroadcastsAPI from './broadcasts';
|
|
56
56
|
import { BroadcastRetrieveParams, BroadcastRetrieveResponse, Broadcasts } from './broadcasts';
|
|
57
|
+
import * as CommunityNotesAPI from './community-notes';
|
|
58
|
+
import {
|
|
59
|
+
CommunityNoteListContributorDeletedNotesParams,
|
|
60
|
+
CommunityNoteListContributorDeletedNotesResponse,
|
|
61
|
+
CommunityNoteListContributorNotesParams,
|
|
62
|
+
CommunityNoteListContributorNotesResponse,
|
|
63
|
+
CommunityNoteRetrieveContributorParams,
|
|
64
|
+
CommunityNoteRetrieveContributorResponse,
|
|
65
|
+
CommunityNotes,
|
|
66
|
+
} from './community-notes';
|
|
57
67
|
import * as DmAPI from './dm';
|
|
58
68
|
import {
|
|
59
69
|
Dm,
|
|
@@ -243,6 +253,7 @@ export class X extends APIResource {
|
|
|
243
253
|
bookmarks: BookmarksAPI.Bookmarks = new BookmarksAPI.Bookmarks(this._client);
|
|
244
254
|
lists: ListsAPI.Lists = new ListsAPI.Lists(this._client);
|
|
245
255
|
broadcasts: BroadcastsAPI.Broadcasts = new BroadcastsAPI.Broadcasts(this._client);
|
|
256
|
+
communityNotes: CommunityNotesAPI.CommunityNotes = new CommunityNotesAPI.CommunityNotes(this._client);
|
|
246
257
|
spaces: SpacesAPI.Spaces = new SpacesAPI.Spaces(this._client);
|
|
247
258
|
|
|
248
259
|
/**
|
|
@@ -315,6 +326,25 @@ export class X extends APIResource {
|
|
|
315
326
|
return this._client.get('/x/timeline', { query, ...options });
|
|
316
327
|
}
|
|
317
328
|
|
|
329
|
+
/**
|
|
330
|
+
* Returns each version X wrote of 1 news story, the AI trends x.com shows under
|
|
331
|
+
* Explore & News. Each version has its time, headline & text, oldest first, so you
|
|
332
|
+
* can see how the story changed. X lists every version at once. Each request costs
|
|
333
|
+
* 1 credit.
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```ts
|
|
337
|
+
* const response = await client.x.getNewsStoryVersions('id');
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
getNewsStoryVersions(
|
|
341
|
+
id: string,
|
|
342
|
+
query: XGetNewsStoryVersionsParams | null | undefined = {},
|
|
343
|
+
options?: RequestOptions,
|
|
344
|
+
): APIPromise<XGetNewsStoryVersionsResponse> {
|
|
345
|
+
return this._client.get(path`/x/news/${id}/versions`, { query, ...options });
|
|
346
|
+
}
|
|
347
|
+
|
|
318
348
|
/**
|
|
319
349
|
* Returns your X account's notifications, else 424 `account_required`.
|
|
320
350
|
*
|
|
@@ -363,6 +393,30 @@ export class X extends APIResource {
|
|
|
363
393
|
return this._client.get('/x/trends', { query, ...options });
|
|
364
394
|
}
|
|
365
395
|
|
|
396
|
+
/**
|
|
397
|
+
* Returns the Twitter trends archive of a place, as the lists X showed there over a
|
|
398
|
+
* range of time. Use it for trending on Twitter yesterday, last week or any day
|
|
399
|
+
* since 2026-10-13 02:20 UTC. Xquik stores 1 list per place every 5 minutes and
|
|
400
|
+
* keeps it for 25 months. Pick the place by woeid, country or location name, the
|
|
401
|
+
* range with from & to, and the step with every. from & to take a time or a span
|
|
402
|
+
* back from now, such as 7d, so a schedule can read the last day on every run.
|
|
403
|
+
* Each step returns the first list stored in it, with its own time. Each returned
|
|
404
|
+
* list costs 1 credit, so 24 lists cost 24 credits. A step with no stored list
|
|
405
|
+
* returns none and costs nothing. 1 request returns 24 lists, or up to 100 with
|
|
406
|
+
* limit.
|
|
407
|
+
*
|
|
408
|
+
* @example
|
|
409
|
+
* ```ts
|
|
410
|
+
* const response = await client.x.getTrendsHistory();
|
|
411
|
+
* ```
|
|
412
|
+
*/
|
|
413
|
+
getTrendsHistory(
|
|
414
|
+
query: XGetTrendsHistoryParams | null | undefined = {},
|
|
415
|
+
options?: RequestOptions,
|
|
416
|
+
): APIPromise<XGetTrendsHistoryResponse> {
|
|
417
|
+
return this._client.get('/x/trends/history', { query, ...options });
|
|
418
|
+
}
|
|
419
|
+
|
|
366
420
|
/**
|
|
367
421
|
* Finds places on X by name. Pass a place's id as place to /x/tweets/search to
|
|
368
422
|
* read posts tagged there. X ranks the places, so their order can differ between
|
|
@@ -939,6 +993,48 @@ export namespace XGetHashflagsResponse {
|
|
|
939
993
|
}
|
|
940
994
|
}
|
|
941
995
|
|
|
996
|
+
export interface XGetNewsStoryVersionsResponse {
|
|
997
|
+
/**
|
|
998
|
+
* The story's ID, as the request named it.
|
|
999
|
+
*/
|
|
1000
|
+
id: string;
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* Versions returned.
|
|
1004
|
+
*/
|
|
1005
|
+
count: number;
|
|
1006
|
+
|
|
1007
|
+
versions: Array<XGetNewsStoryVersionsResponse.Version>;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
export namespace XGetNewsStoryVersionsResponse {
|
|
1011
|
+
/**
|
|
1012
|
+
* 1 version X wrote of a news story.
|
|
1013
|
+
*/
|
|
1014
|
+
export interface Version {
|
|
1015
|
+
/**
|
|
1016
|
+
* The version's ID.
|
|
1017
|
+
*/
|
|
1018
|
+
id: string;
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* When X wrote the version, in UTC, from its ID.
|
|
1022
|
+
*/
|
|
1023
|
+
createdAt: string;
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* The story's headline in this version.
|
|
1027
|
+
*/
|
|
1028
|
+
headline: string;
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* The story's text in this version, without the time line X writes above it in
|
|
1032
|
+
* the reader's time zone.
|
|
1033
|
+
*/
|
|
1034
|
+
text: string;
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
|
|
942
1038
|
export interface XGetNotificationsResponse {
|
|
943
1039
|
has_next_page: boolean;
|
|
944
1040
|
|
|
@@ -1106,6 +1202,137 @@ export namespace XGetTrendsResponse {
|
|
|
1106
1202
|
}
|
|
1107
1203
|
}
|
|
1108
1204
|
|
|
1205
|
+
export interface XGetTrendsHistoryResponse {
|
|
1206
|
+
/**
|
|
1207
|
+
* Lists returned & charged.
|
|
1208
|
+
*/
|
|
1209
|
+
count: number;
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* Start of the range as Xquik read it. A span such as 7d shows here as the time it
|
|
1213
|
+
* counted back to.
|
|
1214
|
+
*/
|
|
1215
|
+
fromTime: string;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Whether the range holds more lists.
|
|
1219
|
+
*/
|
|
1220
|
+
has_next_page: boolean;
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
* Send it as cursor for the next lists. Empty on the last page.
|
|
1224
|
+
*/
|
|
1225
|
+
next_cursor: string;
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* 1 stored list per step, oldest first. A step with no stored list is left out.
|
|
1229
|
+
*/
|
|
1230
|
+
snapshots: Array<XGetTrendsHistoryResponse.Snapshot>;
|
|
1231
|
+
|
|
1232
|
+
/**
|
|
1233
|
+
* End of the range as Xquik read it, which the range leaves out. Without to, it is
|
|
1234
|
+
* the time of the first request.
|
|
1235
|
+
*/
|
|
1236
|
+
toTime: string;
|
|
1237
|
+
|
|
1238
|
+
woeid: number;
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* The place the request named by country or location. Absent when it sent a woeid
|
|
1242
|
+
* or named no place.
|
|
1243
|
+
*/
|
|
1244
|
+
location?: XGetTrendsHistoryResponse.Location;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
export namespace XGetTrendsHistoryResponse {
|
|
1248
|
+
export interface Snapshot {
|
|
1249
|
+
/**
|
|
1250
|
+
* When Xquik read this stored list from X. Xquik never estimates it.
|
|
1251
|
+
*/
|
|
1252
|
+
capturedAt: string;
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* Trends in this list.
|
|
1256
|
+
*/
|
|
1257
|
+
count: number;
|
|
1258
|
+
|
|
1259
|
+
trends: Array<Snapshot.Trend>;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
export namespace Snapshot {
|
|
1263
|
+
export interface Trend {
|
|
1264
|
+
name: string;
|
|
1265
|
+
|
|
1266
|
+
description?: string;
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* X's promotion ID of a promoted trend. Null for the others.
|
|
1270
|
+
*/
|
|
1271
|
+
promotedContent?: string | null;
|
|
1272
|
+
|
|
1273
|
+
query?: string;
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* The trend's place in X's list at that time.
|
|
1277
|
+
*/
|
|
1278
|
+
rank?: number;
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* X's post count for the trend at that time, when X showed one.
|
|
1282
|
+
*/
|
|
1283
|
+
tweetVolume?: number | null;
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* The trend's search link on X.
|
|
1287
|
+
*/
|
|
1288
|
+
url?: string;
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* The place the request named by country or location. Absent when it sent a woeid
|
|
1294
|
+
* or named no place.
|
|
1295
|
+
*/
|
|
1296
|
+
export interface Location {
|
|
1297
|
+
/**
|
|
1298
|
+
* Country name. Null for Worldwide.
|
|
1299
|
+
*/
|
|
1300
|
+
country: string | null;
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* 2-letter country code. Null for Worldwide.
|
|
1304
|
+
*/
|
|
1305
|
+
countryCode: string | null;
|
|
1306
|
+
|
|
1307
|
+
name: string;
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* WOEID of the country or region above it. Null for Worldwide.
|
|
1311
|
+
*/
|
|
1312
|
+
parentWoeid: number | null;
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
* X's kind of place. Town, Country, Supername for Worldwide, or Unknown.
|
|
1316
|
+
*/
|
|
1317
|
+
placeType: string | null;
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* X's numeric code for the kind of place.
|
|
1321
|
+
*/
|
|
1322
|
+
placeTypeCode: number | null;
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* X's legacy Yahoo GeoPlanet reference. It may not resolve.
|
|
1326
|
+
*/
|
|
1327
|
+
url: string | null;
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Location ID. Pass it as woeid to /x/trends.
|
|
1331
|
+
*/
|
|
1332
|
+
woeid: number;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1109
1336
|
export interface XSearchPlacesResponse {
|
|
1110
1337
|
/**
|
|
1111
1338
|
* Places returned & charged.
|
|
@@ -1380,6 +1607,24 @@ export interface XGetHomeTimelineParams {
|
|
|
1380
1607
|
seenTweetIds?: string;
|
|
1381
1608
|
}
|
|
1382
1609
|
|
|
1610
|
+
export interface XGetNewsStoryVersionsParams {
|
|
1611
|
+
/**
|
|
1612
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields, such as
|
|
1613
|
+
* author.username. A list keeps the field in each item. Case & underscores do not
|
|
1614
|
+
* matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics
|
|
1615
|
+
* always stay. An unknown name answers 400 unknown_field with the valid names,
|
|
1616
|
+
* before any read. The price stays the same. SDK row types then hold only the
|
|
1617
|
+
* named fields.
|
|
1618
|
+
*/
|
|
1619
|
+
fields?: string;
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
1623
|
+
* fields. With fields, it drops from the kept fields.
|
|
1624
|
+
*/
|
|
1625
|
+
omit?: string;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1383
1628
|
export interface XGetNotificationsParams {
|
|
1384
1629
|
/**
|
|
1385
1630
|
* Pagination cursor for collection results. Also read as next_cursor, next_token,
|
|
@@ -1474,6 +1719,81 @@ export interface XGetTrendsParams {
|
|
|
1474
1719
|
woeid?: number;
|
|
1475
1720
|
}
|
|
1476
1721
|
|
|
1722
|
+
export interface XGetTrendsHistoryParams {
|
|
1723
|
+
/**
|
|
1724
|
+
* Trends to return in each list, from 1 to 50.
|
|
1725
|
+
*/
|
|
1726
|
+
count?: number;
|
|
1727
|
+
|
|
1728
|
+
/**
|
|
1729
|
+
* Country to read trends history for, by name or 2-letter code, such as Turkey or
|
|
1730
|
+
* TR. Case insensitive.
|
|
1731
|
+
*/
|
|
1732
|
+
country?: string;
|
|
1733
|
+
|
|
1734
|
+
/**
|
|
1735
|
+
* The next_cursor of the page before, for the next lists. It keeps the time of the
|
|
1736
|
+
* first request, so a range of spans stays the same on every page.
|
|
1737
|
+
*/
|
|
1738
|
+
cursor?: string;
|
|
1739
|
+
|
|
1740
|
+
/**
|
|
1741
|
+
* Step between 2 returned lists, as a number & m, h or d, such as 15m, 1h or 1d. A
|
|
1742
|
+
* step under 5m returns every stored list.
|
|
1743
|
+
*/
|
|
1744
|
+
every?: string;
|
|
1745
|
+
|
|
1746
|
+
/**
|
|
1747
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields, such as
|
|
1748
|
+
* author.username. A list keeps the field in each item. Case & underscores do not
|
|
1749
|
+
* matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics
|
|
1750
|
+
* always stay. An unknown name answers 400 unknown_field with the valid names,
|
|
1751
|
+
* before any read. The price stays the same. SDK row types then hold only the
|
|
1752
|
+
* named fields.
|
|
1753
|
+
*/
|
|
1754
|
+
fields?: string;
|
|
1755
|
+
|
|
1756
|
+
/**
|
|
1757
|
+
* Start of the range. Takes an ISO 8601 time, a date such as 2026-10-13, or Unix
|
|
1758
|
+
* seconds. A time without a zone reads as UTC. It also takes a span back from now,
|
|
1759
|
+
* as a number & s, m, h or d, so from=7d reads the last 7 days. Defaults to 24
|
|
1760
|
+
* hours before to. History starts 2026-10-13 02:20 UTC, and a range that begins
|
|
1761
|
+
* earlier returns the stored part. Alias sinceTime.
|
|
1762
|
+
*/
|
|
1763
|
+
from?: string;
|
|
1764
|
+
|
|
1765
|
+
/**
|
|
1766
|
+
* Maximum lists 1 request returns & charges. A wider range gives a next_cursor for
|
|
1767
|
+
* the next lists. A low credit balance can return fewer.
|
|
1768
|
+
*/
|
|
1769
|
+
limit?: number;
|
|
1770
|
+
|
|
1771
|
+
/**
|
|
1772
|
+
* Town or country to read trends history for, by name, such as Istanbul. Case
|
|
1773
|
+
* insensitive. Add country when 2 towns share a name. /x/trends/locations lists
|
|
1774
|
+
* every name.
|
|
1775
|
+
*/
|
|
1776
|
+
location?: string;
|
|
1777
|
+
|
|
1778
|
+
/**
|
|
1779
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
1780
|
+
* fields. With fields, it drops from the kept fields.
|
|
1781
|
+
*/
|
|
1782
|
+
omit?: string;
|
|
1783
|
+
|
|
1784
|
+
/**
|
|
1785
|
+
* End of the range, which it leaves out. Takes the forms of from, so from=2d with
|
|
1786
|
+
* to=1d reads the day before the last 24 hours. Defaults to now. Alias untilTime.
|
|
1787
|
+
*/
|
|
1788
|
+
to?: string;
|
|
1789
|
+
|
|
1790
|
+
/**
|
|
1791
|
+
* WOEID of the place, such as 1 for Worldwide or 23424969 for Turkey. It wins over
|
|
1792
|
+
* country & location. /x/trends/locations lists every WOEID.
|
|
1793
|
+
*/
|
|
1794
|
+
woeid?: number;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1477
1797
|
export interface XSearchPlacesParams {
|
|
1478
1798
|
/**
|
|
1479
1799
|
* Place name to search for, such as istanbul. Alias query.
|
|
@@ -1519,6 +1839,7 @@ X.AccountConnectionAttempts = AccountConnectionAttempts;
|
|
|
1519
1839
|
X.Bookmarks = Bookmarks;
|
|
1520
1840
|
X.Lists = Lists;
|
|
1521
1841
|
X.Broadcasts = Broadcasts;
|
|
1842
|
+
X.CommunityNotes = CommunityNotes;
|
|
1522
1843
|
X.Spaces = Spaces;
|
|
1523
1844
|
|
|
1524
1845
|
export declare namespace X {
|
|
@@ -1526,17 +1847,21 @@ export declare namespace X {
|
|
|
1526
1847
|
type XAutocompleteSearchResponse as XAutocompleteSearchResponse,
|
|
1527
1848
|
type XGetArticleResponse as XGetArticleResponse,
|
|
1528
1849
|
type XGetHashflagsResponse as XGetHashflagsResponse,
|
|
1850
|
+
type XGetNewsStoryVersionsResponse as XGetNewsStoryVersionsResponse,
|
|
1529
1851
|
type XGetNotificationsResponse as XGetNotificationsResponse,
|
|
1530
1852
|
type XGetTrendLocationsResponse as XGetTrendLocationsResponse,
|
|
1531
1853
|
type XGetTrendsResponse as XGetTrendsResponse,
|
|
1854
|
+
type XGetTrendsHistoryResponse as XGetTrendsHistoryResponse,
|
|
1532
1855
|
type XSearchPlacesResponse as XSearchPlacesResponse,
|
|
1533
1856
|
type XAutocompleteSearchParams as XAutocompleteSearchParams,
|
|
1534
1857
|
type XGetArticleParams as XGetArticleParams,
|
|
1535
1858
|
type XGetHashflagsParams as XGetHashflagsParams,
|
|
1536
1859
|
type XGetHomeTimelineParams as XGetHomeTimelineParams,
|
|
1860
|
+
type XGetNewsStoryVersionsParams as XGetNewsStoryVersionsParams,
|
|
1537
1861
|
type XGetNotificationsParams as XGetNotificationsParams,
|
|
1538
1862
|
type XGetTrendLocationsParams as XGetTrendLocationsParams,
|
|
1539
1863
|
type XGetTrendsParams as XGetTrendsParams,
|
|
1864
|
+
type XGetTrendsHistoryParams as XGetTrendsHistoryParams,
|
|
1540
1865
|
type XSearchPlacesParams as XSearchPlacesParams,
|
|
1541
1866
|
};
|
|
1542
1867
|
|
|
@@ -1754,6 +2079,16 @@ export declare namespace X {
|
|
|
1754
2079
|
type BroadcastRetrieveParams as BroadcastRetrieveParams,
|
|
1755
2080
|
};
|
|
1756
2081
|
|
|
2082
|
+
export {
|
|
2083
|
+
CommunityNotes as CommunityNotes,
|
|
2084
|
+
type CommunityNoteListContributorDeletedNotesResponse as CommunityNoteListContributorDeletedNotesResponse,
|
|
2085
|
+
type CommunityNoteListContributorNotesResponse as CommunityNoteListContributorNotesResponse,
|
|
2086
|
+
type CommunityNoteRetrieveContributorResponse as CommunityNoteRetrieveContributorResponse,
|
|
2087
|
+
type CommunityNoteListContributorDeletedNotesParams as CommunityNoteListContributorDeletedNotesParams,
|
|
2088
|
+
type CommunityNoteListContributorNotesParams as CommunityNoteListContributorNotesParams,
|
|
2089
|
+
type CommunityNoteRetrieveContributorParams as CommunityNoteRetrieveContributorParams,
|
|
2090
|
+
};
|
|
2091
|
+
|
|
1757
2092
|
export {
|
|
1758
2093
|
Spaces as Spaces,
|
|
1759
2094
|
type SpaceRetrieveResponse as SpaceRetrieveResponse,
|
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.14.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.14.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEzB,QAAA,OAAO,GAAG,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEzB,QAAA,OAAO,GAAG,QAAQ,CAAC"}
|
package/version.mjs
CHANGED
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"}
|