x-twitter-scraper 0.15.0 → 0.17.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 +63 -5
- package/README.md +1 -0
- package/client.d.mts +12 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/internal/detect-platform.d.mts +3 -1
- package/internal/detect-platform.d.mts.map +1 -1
- package/internal/detect-platform.d.ts +3 -1
- package/internal/detect-platform.d.ts.map +1 -1
- package/internal/detect-platform.js +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/account.d.mts +5 -0
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +5 -0
- package/resources/account.d.ts.map +1 -1
- package/resources/compose.d.mts +1 -1
- package/resources/compose.d.mts.map +1 -1
- package/resources/compose.d.ts +1 -1
- package/resources/compose.d.ts.map +1 -1
- package/resources/drafts.d.mts +13 -3
- package/resources/drafts.d.mts.map +1 -1
- package/resources/drafts.d.ts +13 -3
- package/resources/drafts.d.ts.map +1 -1
- package/resources/drafts.js +1 -1
- package/resources/drafts.mjs +1 -1
- package/resources/events.d.mts +100 -29
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +100 -29
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js.map +1 -1
- package/resources/events.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/monitors/index.d.mts +2 -1
- package/resources/monitors/index.d.mts.map +1 -1
- package/resources/monitors/index.d.ts +2 -1
- package/resources/monitors/index.d.ts.map +1 -1
- package/resources/monitors/index.js +3 -1
- package/resources/monitors/index.js.map +1 -1
- package/resources/monitors/index.mjs +1 -0
- package/resources/monitors/index.mjs.map +1 -1
- package/resources/monitors/keywords.d.mts +15 -65
- package/resources/monitors/keywords.d.mts.map +1 -1
- package/resources/monitors/keywords.d.ts +15 -65
- package/resources/monitors/keywords.d.ts.map +1 -1
- package/resources/monitors/monitors.d.mts +12 -5
- package/resources/monitors/monitors.d.mts.map +1 -1
- package/resources/monitors/monitors.d.ts +12 -5
- package/resources/monitors/monitors.d.ts.map +1 -1
- package/resources/monitors/monitors.js +4 -0
- package/resources/monitors/monitors.js.map +1 -1
- package/resources/monitors/monitors.mjs +4 -0
- package/resources/monitors/monitors.mjs.map +1 -1
- package/resources/monitors/posts.d.mts +344 -0
- package/resources/monitors/posts.d.mts.map +1 -0
- package/resources/monitors/posts.d.ts +344 -0
- package/resources/monitors/posts.d.ts.map +1 -0
- package/resources/monitors/posts.js +94 -0
- package/resources/monitors/posts.js.map +1 -0
- package/resources/monitors/posts.mjs +90 -0
- package/resources/monitors/posts.mjs.map +1 -0
- package/resources/shared.d.mts +671 -7
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +671 -7
- package/resources/shared.d.ts.map +1 -1
- package/resources/support/index.d.mts +1 -1
- package/resources/support/index.d.mts.map +1 -1
- package/resources/support/index.d.ts +1 -1
- package/resources/support/index.d.ts.map +1 -1
- package/resources/support/index.js.map +1 -1
- package/resources/support/index.mjs.map +1 -1
- package/resources/support/support.d.mts +2 -2
- package/resources/support/support.d.mts.map +1 -1
- package/resources/support/support.d.ts +2 -2
- package/resources/support/support.d.ts.map +1 -1
- package/resources/support/support.js.map +1 -1
- package/resources/support/support.mjs.map +1 -1
- package/resources/support/tickets.d.mts +26 -25
- package/resources/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts +26 -25
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/support/tickets.js.map +1 -1
- package/resources/support/tickets.mjs.map +1 -1
- package/resources/webhooks.d.mts +10 -4
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +10 -4
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources/x/accounts.d.mts +14 -4
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +14 -4
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/accounts.js +6 -4
- package/resources/x/accounts.js.map +1 -1
- package/resources/x/accounts.mjs +6 -4
- package/resources/x/accounts.mjs.map +1 -1
- package/resources/x/broadcasts.d.mts +3 -127
- package/resources/x/broadcasts.d.mts.map +1 -1
- package/resources/x/broadcasts.d.ts +3 -127
- package/resources/x/broadcasts.d.ts.map +1 -1
- package/resources/x/communities/communities.d.mts +92 -1
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +92 -1
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +14 -0
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +14 -0
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/index.d.mts +1 -1
- package/resources/x/communities/index.d.mts.map +1 -1
- package/resources/x/communities/index.d.ts +1 -1
- package/resources/x/communities/index.d.ts.map +1 -1
- package/resources/x/communities/index.js.map +1 -1
- package/resources/x/communities/index.mjs.map +1 -1
- package/resources/x/community-notes.d.mts +122 -510
- package/resources/x/community-notes.d.mts.map +1 -1
- package/resources/x/community-notes.d.ts +122 -510
- package/resources/x/community-notes.d.ts.map +1 -1
- package/resources/x/community-notes.js.map +1 -1
- package/resources/x/community-notes.mjs.map +1 -1
- package/resources/x/index.d.mts +7 -6
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +7 -6
- 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/jobs.d.mts +144 -283
- package/resources/x/jobs.d.mts.map +1 -1
- package/resources/x/jobs.d.ts +144 -283
- package/resources/x/jobs.d.ts.map +1 -1
- package/resources/x/jobs.js.map +1 -1
- package/resources/x/jobs.mjs.map +1 -1
- package/resources/x/lists.d.mts +27 -425
- package/resources/x/lists.d.mts.map +1 -1
- package/resources/x/lists.d.ts +27 -425
- package/resources/x/lists.d.ts.map +1 -1
- package/resources/x/media.d.mts +13 -2
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +13 -2
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +13 -4
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +13 -4
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/spaces.d.mts +213 -669
- package/resources/x/spaces.d.mts.map +1 -1
- package/resources/x/spaces.d.ts +213 -669
- package/resources/x/spaces.d.ts.map +1 -1
- package/resources/x/spaces.js.map +1 -1
- package/resources/x/spaces.mjs.map +1 -1
- package/resources/x/sports.d.mts +1349 -0
- package/resources/x/sports.d.mts.map +1 -0
- package/resources/x/sports.d.ts +1349 -0
- package/resources/x/sports.d.ts.map +1 -0
- package/resources/x/sports.js +76 -0
- package/resources/x/sports.js.map +1 -0
- package/resources/x/sports.mjs +72 -0
- package/resources/x/sports.mjs.map +1 -0
- package/resources/x/tweets/tweets.d.mts +32 -24
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +32 -24
- 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/users/users.d.mts +62 -614
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +62 -614
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/x.d.mts +63 -118
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +63 -118
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js +4 -0
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs +4 -0
- package/resources/x/x.mjs.map +1 -1
- package/skills/x-twitter-scraper/references/api-endpoints-x-api.md +1 -0
- package/src/client.ts +12 -0
- package/src/internal/detect-platform.ts +2 -2
- package/src/internal/uploads.ts +1 -1
- package/src/resources/account.ts +6 -0
- package/src/resources/compose.ts +1 -1
- package/src/resources/drafts.ts +14 -2
- package/src/resources/events.ts +137 -29
- package/src/resources/index.ts +2 -0
- package/src/resources/monitors/index.ts +21 -0
- package/src/resources/monitors/keywords.ts +15 -79
- package/src/resources/monitors/monitors.ts +52 -3
- package/src/resources/monitors/posts.ts +463 -0
- package/src/resources/shared.ts +897 -215
- package/src/resources/support/index.ts +1 -0
- package/src/resources/support/support.ts +2 -0
- package/src/resources/support/tickets.ts +29 -25
- package/src/resources/webhooks.ts +11 -4
- package/src/resources/x/accounts.ts +19 -4
- package/src/resources/x/broadcasts.ts +3 -154
- package/src/resources/x/communities/communities.ts +113 -0
- package/src/resources/x/communities/index.ts +3 -0
- package/src/resources/x/community-notes.ts +137 -582
- package/src/resources/x/index.ts +62 -0
- package/src/resources/x/jobs.ts +160 -324
- package/src/resources/x/lists.ts +27 -499
- package/src/resources/x/media.ts +15 -2
- package/src/resources/x/profile.ts +15 -4
- package/src/resources/x/spaces.ts +227 -787
- package/src/resources/x/sports.ts +1675 -0
- package/src/resources/x/tweets/tweets.ts +41 -26
- package/src/resources/x/users/users.ts +62 -721
- package/src/resources/x/x.ts +185 -128
- 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/src/lib/.keep +0 -2
package/src/resources/x/lists.ts
CHANGED
|
@@ -81,7 +81,7 @@ export class Lists extends APIResource {
|
|
|
81
81
|
retrieveSearch(
|
|
82
82
|
query: ListRetrieveSearchParams,
|
|
83
83
|
options?: RequestOptions,
|
|
84
|
-
): APIPromise<
|
|
84
|
+
): APIPromise<Shared.PaginatedLists> {
|
|
85
85
|
return this._client.get('/x/lists/search', { query, ...options });
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -110,266 +110,35 @@ export interface ListRetrieveResponse {
|
|
|
110
110
|
* Public X List with its owner's public profile. Leaves out what X tells the
|
|
111
111
|
* reading account, such as whether it follows the List.
|
|
112
112
|
*/
|
|
113
|
-
list:
|
|
113
|
+
list: Shared.XList;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
export namespace ListRetrieveResponse {
|
|
117
|
-
|
|
118
|
-
* Public X List with its owner's public profile. Leaves out what X tells the
|
|
119
|
-
* reading account, such as whether it follows the List.
|
|
120
|
-
*/
|
|
121
|
-
export interface List {
|
|
122
|
-
/**
|
|
123
|
-
* Numeric ID of the List.
|
|
124
|
-
*/
|
|
125
|
-
id: string;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Name the owner gave the List.
|
|
129
|
-
*/
|
|
130
|
-
name: string;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* URL of the banner the owner uploaded. Absent when the owner uploaded none.
|
|
134
|
-
*/
|
|
135
|
-
bannerUrl?: string;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* When the owner made the List.
|
|
139
|
-
*/
|
|
140
|
-
createdAt?: string;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Banner the owner uploaded.
|
|
144
|
-
*/
|
|
145
|
-
customBanner?: List.CustomBanner;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Banner X shows when the owner uploaded none. X picks it per reading account, so
|
|
149
|
-
* 2 calls can return different ones.
|
|
150
|
-
*/
|
|
151
|
-
defaultBanner?: List.DefaultBanner;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* About text of the List. Empty when the owner wrote none.
|
|
155
|
-
*/
|
|
156
|
-
description?: string;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Avatar URLs of a few List members, which X may pick per request.
|
|
160
|
-
*/
|
|
161
|
-
facepileUrls?: Array<string>;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Accounts on the List.
|
|
165
|
-
*/
|
|
166
|
-
memberCount?: number;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Member count as X words it, such as 35 members.
|
|
170
|
-
*/
|
|
171
|
-
membersContext?: string;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Public profile of the account that owns the List.
|
|
175
|
-
*/
|
|
176
|
-
owner?: Shared.UserProfile;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Accounts that follow the List, which X calls followers.
|
|
180
|
-
*/
|
|
181
|
-
subscriberCount?: number;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* List page on x.com.
|
|
185
|
-
*/
|
|
186
|
-
url?: string;
|
|
187
|
-
}
|
|
117
|
+
export type List = Shared.XList;
|
|
188
118
|
|
|
189
119
|
export namespace List {
|
|
190
|
-
|
|
191
|
-
* Banner the owner uploaded.
|
|
192
|
-
*/
|
|
193
|
-
export interface CustomBanner {
|
|
194
|
-
/**
|
|
195
|
-
* Banner image URL.
|
|
196
|
-
*/
|
|
197
|
-
url: string;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Banner height in pixels.
|
|
201
|
-
*/
|
|
202
|
-
height?: number;
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Media ID of an uploaded banner.
|
|
206
|
-
*/
|
|
207
|
-
mediaId?: string;
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Stable media key of an uploaded banner.
|
|
211
|
-
*/
|
|
212
|
-
mediaKey?: string;
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Dominant colors of an uploaded banner and their shares.
|
|
216
|
-
*/
|
|
217
|
-
palette?: Array<CustomBanner.Palette>;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Area X marks as the subject of the banner, in pixels.
|
|
221
|
-
*/
|
|
222
|
-
salientRect?: CustomBanner.SalientRect;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Banner width in pixels.
|
|
226
|
-
*/
|
|
227
|
-
width?: number;
|
|
228
|
-
}
|
|
120
|
+
export type CustomBanner = Shared.XListBanner;
|
|
229
121
|
|
|
230
122
|
export namespace CustomBanner {
|
|
231
|
-
export
|
|
232
|
-
/**
|
|
233
|
-
* Share of the banner
|
|
234
|
-
*/
|
|
235
|
-
percentage?: number;
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* The color's red, green and blue values.
|
|
239
|
-
*/
|
|
240
|
-
rgb?: Palette.Rgb;
|
|
241
|
-
}
|
|
123
|
+
export type Palette = Shared.XListBanner.Palette;
|
|
242
124
|
|
|
243
125
|
export namespace Palette {
|
|
244
|
-
|
|
245
|
-
* The color's red, green and blue values.
|
|
246
|
-
*/
|
|
247
|
-
export interface Rgb {
|
|
248
|
-
blue?: number;
|
|
249
|
-
|
|
250
|
-
green?: number;
|
|
251
|
-
|
|
252
|
-
red?: number;
|
|
253
|
-
}
|
|
126
|
+
export type Rgb = Shared.XListBanner.Palette.Rgb;
|
|
254
127
|
}
|
|
255
128
|
|
|
256
|
-
|
|
257
|
-
* Area X marks as the subject of the banner, in pixels.
|
|
258
|
-
*/
|
|
259
|
-
export interface SalientRect {
|
|
260
|
-
/**
|
|
261
|
-
* Height of the marked area.
|
|
262
|
-
*/
|
|
263
|
-
height?: number;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Pixels from the banner's left.
|
|
267
|
-
*/
|
|
268
|
-
left?: number;
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Pixels from the banner's top.
|
|
272
|
-
*/
|
|
273
|
-
top?: number;
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Width of the marked area.
|
|
277
|
-
*/
|
|
278
|
-
width?: number;
|
|
279
|
-
}
|
|
129
|
+
export type SalientRect = Shared.XListBanner.SalientRect;
|
|
280
130
|
}
|
|
281
131
|
|
|
282
|
-
|
|
283
|
-
* Banner X shows when the owner uploaded none. X picks it per reading account, so
|
|
284
|
-
* 2 calls can return different ones.
|
|
285
|
-
*/
|
|
286
|
-
export interface DefaultBanner {
|
|
287
|
-
/**
|
|
288
|
-
* Banner image URL.
|
|
289
|
-
*/
|
|
290
|
-
url: string;
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Banner height in pixels.
|
|
294
|
-
*/
|
|
295
|
-
height?: number;
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Media ID of an uploaded banner.
|
|
299
|
-
*/
|
|
300
|
-
mediaId?: string;
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Stable media key of an uploaded banner.
|
|
304
|
-
*/
|
|
305
|
-
mediaKey?: string;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Dominant colors of an uploaded banner and their shares.
|
|
309
|
-
*/
|
|
310
|
-
palette?: Array<DefaultBanner.Palette>;
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Area X marks as the subject of the banner, in pixels.
|
|
314
|
-
*/
|
|
315
|
-
salientRect?: DefaultBanner.SalientRect;
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* Banner width in pixels.
|
|
319
|
-
*/
|
|
320
|
-
width?: number;
|
|
321
|
-
}
|
|
132
|
+
export type DefaultBanner = Shared.XListBanner;
|
|
322
133
|
|
|
323
134
|
export namespace DefaultBanner {
|
|
324
|
-
export
|
|
325
|
-
/**
|
|
326
|
-
* Share of the banner
|
|
327
|
-
*/
|
|
328
|
-
percentage?: number;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* The color's red, green and blue values.
|
|
332
|
-
*/
|
|
333
|
-
rgb?: Palette.Rgb;
|
|
334
|
-
}
|
|
135
|
+
export type Palette = Shared.XListBanner.Palette;
|
|
335
136
|
|
|
336
137
|
export namespace Palette {
|
|
337
|
-
|
|
338
|
-
* The color's red, green and blue values.
|
|
339
|
-
*/
|
|
340
|
-
export interface Rgb {
|
|
341
|
-
blue?: number;
|
|
342
|
-
|
|
343
|
-
green?: number;
|
|
344
|
-
|
|
345
|
-
red?: number;
|
|
346
|
-
}
|
|
138
|
+
export type Rgb = Shared.XListBanner.Palette.Rgb;
|
|
347
139
|
}
|
|
348
140
|
|
|
349
|
-
|
|
350
|
-
* Area X marks as the subject of the banner, in pixels.
|
|
351
|
-
*/
|
|
352
|
-
export interface SalientRect {
|
|
353
|
-
/**
|
|
354
|
-
* Height of the marked area.
|
|
355
|
-
*/
|
|
356
|
-
height?: number;
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Pixels from the banner's left.
|
|
360
|
-
*/
|
|
361
|
-
left?: number;
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* Pixels from the banner's top.
|
|
365
|
-
*/
|
|
366
|
-
top?: number;
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Width of the marked area.
|
|
370
|
-
*/
|
|
371
|
-
width?: number;
|
|
372
|
-
}
|
|
141
|
+
export type SalientRect = Shared.XListBanner.SalientRect;
|
|
373
142
|
}
|
|
374
143
|
}
|
|
375
144
|
}
|
|
@@ -378,7 +147,7 @@ export namespace ListRetrieveResponse {
|
|
|
378
147
|
* A standard or terminal maximum-coverage relationship page.
|
|
379
148
|
*/
|
|
380
149
|
export type ListRetrieveFollowersResponse =
|
|
381
|
-
Shared.
|
|
150
|
+
Shared.UserListPage | ListRetrieveFollowersResponse.UserListCoverageResponse;
|
|
382
151
|
|
|
383
152
|
export namespace ListRetrieveFollowersResponse {
|
|
384
153
|
/**
|
|
@@ -393,9 +162,9 @@ export namespace ListRetrieveFollowersResponse {
|
|
|
393
162
|
*/
|
|
394
163
|
diagnostic: UserListCoverageResponse.Diagnostic;
|
|
395
164
|
|
|
396
|
-
has_next_page
|
|
165
|
+
has_next_page: false;
|
|
397
166
|
|
|
398
|
-
next_cursor
|
|
167
|
+
next_cursor: '';
|
|
399
168
|
}
|
|
400
169
|
|
|
401
170
|
export namespace UserListCoverageResponse {
|
|
@@ -493,7 +262,7 @@ export namespace ListRetrieveFollowersResponse {
|
|
|
493
262
|
* A standard or terminal maximum-coverage relationship page.
|
|
494
263
|
*/
|
|
495
264
|
export type ListRetrieveMembersResponse =
|
|
496
|
-
Shared.
|
|
265
|
+
Shared.UserListPage | ListRetrieveMembersResponse.UserListCoverageResponse;
|
|
497
266
|
|
|
498
267
|
export namespace ListRetrieveMembersResponse {
|
|
499
268
|
/**
|
|
@@ -508,9 +277,9 @@ export namespace ListRetrieveMembersResponse {
|
|
|
508
277
|
*/
|
|
509
278
|
diagnostic: UserListCoverageResponse.Diagnostic;
|
|
510
279
|
|
|
511
|
-
has_next_page
|
|
280
|
+
has_next_page: false;
|
|
512
281
|
|
|
513
|
-
next_cursor
|
|
282
|
+
next_cursor: '';
|
|
514
283
|
}
|
|
515
284
|
|
|
516
285
|
export namespace UserListCoverageResponse {
|
|
@@ -604,275 +373,34 @@ export namespace ListRetrieveMembersResponse {
|
|
|
604
373
|
}
|
|
605
374
|
}
|
|
606
375
|
|
|
607
|
-
|
|
608
|
-
* One page of public X Lists. Follow next_cursor while the response reports more
|
|
609
|
-
* pages. Each returned List costs 1 credit.
|
|
610
|
-
*/
|
|
611
|
-
export interface ListRetrieveSearchResponse {
|
|
612
|
-
has_next_page: boolean;
|
|
613
|
-
|
|
614
|
-
lists: Array<ListRetrieveSearchResponse.List>;
|
|
615
|
-
|
|
616
|
-
next_cursor: string;
|
|
617
|
-
}
|
|
376
|
+
export type ListRetrieveSearchResponse = Shared.PaginatedLists;
|
|
618
377
|
|
|
619
378
|
export namespace ListRetrieveSearchResponse {
|
|
620
|
-
|
|
621
|
-
* Public X List with its owner's public profile. Leaves out what X tells the
|
|
622
|
-
* reading account, such as whether it follows the List.
|
|
623
|
-
*/
|
|
624
|
-
export interface List {
|
|
625
|
-
/**
|
|
626
|
-
* Numeric ID of the List.
|
|
627
|
-
*/
|
|
628
|
-
id: string;
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Name the owner gave the List.
|
|
632
|
-
*/
|
|
633
|
-
name: string;
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* URL of the banner the owner uploaded. Absent when the owner uploaded none.
|
|
637
|
-
*/
|
|
638
|
-
bannerUrl?: string;
|
|
639
|
-
|
|
640
|
-
/**
|
|
641
|
-
* When the owner made the List.
|
|
642
|
-
*/
|
|
643
|
-
createdAt?: string;
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* Banner the owner uploaded.
|
|
647
|
-
*/
|
|
648
|
-
customBanner?: List.CustomBanner;
|
|
649
|
-
|
|
650
|
-
/**
|
|
651
|
-
* Banner X shows when the owner uploaded none. X picks it per reading account, so
|
|
652
|
-
* 2 calls can return different ones.
|
|
653
|
-
*/
|
|
654
|
-
defaultBanner?: List.DefaultBanner;
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* About text of the List. Empty when the owner wrote none.
|
|
658
|
-
*/
|
|
659
|
-
description?: string;
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Avatar URLs of a few List members, which X may pick per request.
|
|
663
|
-
*/
|
|
664
|
-
facepileUrls?: Array<string>;
|
|
665
|
-
|
|
666
|
-
/**
|
|
667
|
-
* Accounts on the List.
|
|
668
|
-
*/
|
|
669
|
-
memberCount?: number;
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* Member count as X words it, such as 35 members.
|
|
673
|
-
*/
|
|
674
|
-
membersContext?: string;
|
|
675
|
-
|
|
676
|
-
/**
|
|
677
|
-
* Public profile of the account that owns the List.
|
|
678
|
-
*/
|
|
679
|
-
owner?: Shared.UserProfile;
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* Accounts that follow the List, which X calls followers.
|
|
683
|
-
*/
|
|
684
|
-
subscriberCount?: number;
|
|
685
|
-
|
|
686
|
-
/**
|
|
687
|
-
* List page on x.com.
|
|
688
|
-
*/
|
|
689
|
-
url?: string;
|
|
690
|
-
}
|
|
379
|
+
export type List = Shared.XList;
|
|
691
380
|
|
|
692
381
|
export namespace List {
|
|
693
|
-
|
|
694
|
-
* Banner the owner uploaded.
|
|
695
|
-
*/
|
|
696
|
-
export interface CustomBanner {
|
|
697
|
-
/**
|
|
698
|
-
* Banner image URL.
|
|
699
|
-
*/
|
|
700
|
-
url: string;
|
|
701
|
-
|
|
702
|
-
/**
|
|
703
|
-
* Banner height in pixels.
|
|
704
|
-
*/
|
|
705
|
-
height?: number;
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
* Media ID of an uploaded banner.
|
|
709
|
-
*/
|
|
710
|
-
mediaId?: string;
|
|
711
|
-
|
|
712
|
-
/**
|
|
713
|
-
* Stable media key of an uploaded banner.
|
|
714
|
-
*/
|
|
715
|
-
mediaKey?: string;
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* Dominant colors of an uploaded banner and their shares.
|
|
719
|
-
*/
|
|
720
|
-
palette?: Array<CustomBanner.Palette>;
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* Area X marks as the subject of the banner, in pixels.
|
|
724
|
-
*/
|
|
725
|
-
salientRect?: CustomBanner.SalientRect;
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* Banner width in pixels.
|
|
729
|
-
*/
|
|
730
|
-
width?: number;
|
|
731
|
-
}
|
|
382
|
+
export type CustomBanner = Shared.XListBanner;
|
|
732
383
|
|
|
733
384
|
export namespace CustomBanner {
|
|
734
|
-
export
|
|
735
|
-
/**
|
|
736
|
-
* Share of the banner
|
|
737
|
-
*/
|
|
738
|
-
percentage?: number;
|
|
739
|
-
|
|
740
|
-
/**
|
|
741
|
-
* The color's red, green and blue values.
|
|
742
|
-
*/
|
|
743
|
-
rgb?: Palette.Rgb;
|
|
744
|
-
}
|
|
385
|
+
export type Palette = Shared.XListBanner.Palette;
|
|
745
386
|
|
|
746
387
|
export namespace Palette {
|
|
747
|
-
|
|
748
|
-
* The color's red, green and blue values.
|
|
749
|
-
*/
|
|
750
|
-
export interface Rgb {
|
|
751
|
-
blue?: number;
|
|
752
|
-
|
|
753
|
-
green?: number;
|
|
754
|
-
|
|
755
|
-
red?: number;
|
|
756
|
-
}
|
|
388
|
+
export type Rgb = Shared.XListBanner.Palette.Rgb;
|
|
757
389
|
}
|
|
758
390
|
|
|
759
|
-
|
|
760
|
-
* Area X marks as the subject of the banner, in pixels.
|
|
761
|
-
*/
|
|
762
|
-
export interface SalientRect {
|
|
763
|
-
/**
|
|
764
|
-
* Height of the marked area.
|
|
765
|
-
*/
|
|
766
|
-
height?: number;
|
|
767
|
-
|
|
768
|
-
/**
|
|
769
|
-
* Pixels from the banner's left.
|
|
770
|
-
*/
|
|
771
|
-
left?: number;
|
|
772
|
-
|
|
773
|
-
/**
|
|
774
|
-
* Pixels from the banner's top.
|
|
775
|
-
*/
|
|
776
|
-
top?: number;
|
|
777
|
-
|
|
778
|
-
/**
|
|
779
|
-
* Width of the marked area.
|
|
780
|
-
*/
|
|
781
|
-
width?: number;
|
|
782
|
-
}
|
|
391
|
+
export type SalientRect = Shared.XListBanner.SalientRect;
|
|
783
392
|
}
|
|
784
393
|
|
|
785
|
-
|
|
786
|
-
* Banner X shows when the owner uploaded none. X picks it per reading account, so
|
|
787
|
-
* 2 calls can return different ones.
|
|
788
|
-
*/
|
|
789
|
-
export interface DefaultBanner {
|
|
790
|
-
/**
|
|
791
|
-
* Banner image URL.
|
|
792
|
-
*/
|
|
793
|
-
url: string;
|
|
794
|
-
|
|
795
|
-
/**
|
|
796
|
-
* Banner height in pixels.
|
|
797
|
-
*/
|
|
798
|
-
height?: number;
|
|
799
|
-
|
|
800
|
-
/**
|
|
801
|
-
* Media ID of an uploaded banner.
|
|
802
|
-
*/
|
|
803
|
-
mediaId?: string;
|
|
804
|
-
|
|
805
|
-
/**
|
|
806
|
-
* Stable media key of an uploaded banner.
|
|
807
|
-
*/
|
|
808
|
-
mediaKey?: string;
|
|
809
|
-
|
|
810
|
-
/**
|
|
811
|
-
* Dominant colors of an uploaded banner and their shares.
|
|
812
|
-
*/
|
|
813
|
-
palette?: Array<DefaultBanner.Palette>;
|
|
814
|
-
|
|
815
|
-
/**
|
|
816
|
-
* Area X marks as the subject of the banner, in pixels.
|
|
817
|
-
*/
|
|
818
|
-
salientRect?: DefaultBanner.SalientRect;
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* Banner width in pixels.
|
|
822
|
-
*/
|
|
823
|
-
width?: number;
|
|
824
|
-
}
|
|
394
|
+
export type DefaultBanner = Shared.XListBanner;
|
|
825
395
|
|
|
826
396
|
export namespace DefaultBanner {
|
|
827
|
-
export
|
|
828
|
-
/**
|
|
829
|
-
* Share of the banner
|
|
830
|
-
*/
|
|
831
|
-
percentage?: number;
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* The color's red, green and blue values.
|
|
835
|
-
*/
|
|
836
|
-
rgb?: Palette.Rgb;
|
|
837
|
-
}
|
|
397
|
+
export type Palette = Shared.XListBanner.Palette;
|
|
838
398
|
|
|
839
399
|
export namespace Palette {
|
|
840
|
-
|
|
841
|
-
* The color's red, green and blue values.
|
|
842
|
-
*/
|
|
843
|
-
export interface Rgb {
|
|
844
|
-
blue?: number;
|
|
845
|
-
|
|
846
|
-
green?: number;
|
|
847
|
-
|
|
848
|
-
red?: number;
|
|
849
|
-
}
|
|
400
|
+
export type Rgb = Shared.XListBanner.Palette.Rgb;
|
|
850
401
|
}
|
|
851
402
|
|
|
852
|
-
|
|
853
|
-
* Area X marks as the subject of the banner, in pixels.
|
|
854
|
-
*/
|
|
855
|
-
export interface SalientRect {
|
|
856
|
-
/**
|
|
857
|
-
* Height of the marked area.
|
|
858
|
-
*/
|
|
859
|
-
height?: number;
|
|
860
|
-
|
|
861
|
-
/**
|
|
862
|
-
* Pixels from the banner's left.
|
|
863
|
-
*/
|
|
864
|
-
left?: number;
|
|
865
|
-
|
|
866
|
-
/**
|
|
867
|
-
* Pixels from the banner's top.
|
|
868
|
-
*/
|
|
869
|
-
top?: number;
|
|
870
|
-
|
|
871
|
-
/**
|
|
872
|
-
* Width of the marked area.
|
|
873
|
-
*/
|
|
874
|
-
width?: number;
|
|
875
|
-
}
|
|
403
|
+
export type SalientRect = Shared.XListBanner.SalientRect;
|
|
876
404
|
}
|
|
877
405
|
}
|
|
878
406
|
}
|
package/src/resources/x/media.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { APIResource } from '../../core/resource';
|
|
6
6
|
import { APIPromise } from '../../core/api-promise';
|
|
7
|
+
import { type Uploadable } from '../../core/uploads';
|
|
7
8
|
import { buildHeaders } from '../../internal/headers';
|
|
8
9
|
import { RequestOptions } from '../../internal/request-options';
|
|
9
10
|
import { maybeMultipartFormRequestOptions } from '../../internal/uploads';
|
|
@@ -339,15 +340,27 @@ export interface MediaDownloadParams {
|
|
|
339
340
|
|
|
340
341
|
export interface MediaUploadParams {
|
|
341
342
|
/**
|
|
342
|
-
* Body param: X account (@username or ID) uploading media
|
|
343
|
+
* Body param: X account (@username or ID) uploading media
|
|
343
344
|
*/
|
|
344
345
|
account: string;
|
|
345
346
|
|
|
347
|
+
/**
|
|
348
|
+
* Body param: Media file to upload, up to 15 MB. A larger file gets 413
|
|
349
|
+
* `media_too_large` before any account lookup.
|
|
350
|
+
*/
|
|
351
|
+
file?: Uploadable;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Body param: Set true only for video/mp4 multipart uploads longer than 140
|
|
355
|
+
* seconds.
|
|
356
|
+
*/
|
|
357
|
+
is_long_video?: boolean;
|
|
358
|
+
|
|
346
359
|
/**
|
|
347
360
|
* Body param: HTTPS URL to download and upload as media, up to 15 MB. Another
|
|
348
361
|
* scheme gets 400 `invalid_media_url`.
|
|
349
362
|
*/
|
|
350
|
-
url
|
|
363
|
+
url?: string;
|
|
351
364
|
|
|
352
365
|
/**
|
|
353
366
|
* Header param: Use one unique value per intended write. Reuse it only for an
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { APIResource } from '../../core/resource';
|
|
6
6
|
import { APIPromise } from '../../core/api-promise';
|
|
7
|
+
import { type Uploadable } from '../../core/uploads';
|
|
7
8
|
import { buildHeaders } from '../../internal/headers';
|
|
8
9
|
import { RequestOptions } from '../../internal/request-options';
|
|
9
10
|
import { maybeMultipartFormRequestOptions } from '../../internal/uploads';
|
|
@@ -889,14 +890,19 @@ export interface ProfileUpdateParams {
|
|
|
889
890
|
|
|
890
891
|
export interface ProfileUpdateAvatarParams {
|
|
891
892
|
/**
|
|
892
|
-
* Body param: X account (@username or ID)
|
|
893
|
+
* Body param: X account (@username or ID) whose avatar to update
|
|
893
894
|
*/
|
|
894
895
|
account: string;
|
|
895
896
|
|
|
897
|
+
/**
|
|
898
|
+
* Body param: Avatar image (max 15 MiB)
|
|
899
|
+
*/
|
|
900
|
+
file?: Uploadable;
|
|
901
|
+
|
|
896
902
|
/**
|
|
897
903
|
* Body param: HTTPS URL to the avatar image to download
|
|
898
904
|
*/
|
|
899
|
-
url
|
|
905
|
+
url?: string;
|
|
900
906
|
|
|
901
907
|
/**
|
|
902
908
|
* Header param: Use one unique value per intended write. Reuse it only for an
|
|
@@ -911,14 +917,19 @@ export interface ProfileUpdateAvatarParams {
|
|
|
911
917
|
|
|
912
918
|
export interface ProfileUpdateBannerParams {
|
|
913
919
|
/**
|
|
914
|
-
* Body param: X account (@username or ID)
|
|
920
|
+
* Body param: X account (@username or ID) whose banner to update
|
|
915
921
|
*/
|
|
916
922
|
account: string;
|
|
917
923
|
|
|
924
|
+
/**
|
|
925
|
+
* Body param: Banner image (max 15 MiB)
|
|
926
|
+
*/
|
|
927
|
+
file?: Uploadable;
|
|
928
|
+
|
|
918
929
|
/**
|
|
919
930
|
* Body param: HTTPS URL to the banner image to download
|
|
920
931
|
*/
|
|
921
|
-
url
|
|
932
|
+
url?: string;
|
|
922
933
|
|
|
923
934
|
/**
|
|
924
935
|
* Header param: Use one unique value per intended write. Reuse it only for an
|