x-twitter-scraper 0.19.0 → 0.21.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 +79 -0
- package/README.md +120 -120
- package/client.d.mts +7 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/activity.d.mts +18 -2
- package/resources/activity.d.mts.map +1 -1
- package/resources/activity.d.ts +18 -2
- package/resources/activity.d.ts.map +1 -1
- package/resources/credits.d.mts +5 -0
- package/resources/credits.d.mts.map +1 -1
- package/resources/credits.d.ts +5 -0
- package/resources/credits.d.ts.map +1 -1
- package/resources/extractions.d.mts +153 -5
- package/resources/extractions.d.mts.map +1 -1
- package/resources/extractions.d.ts +153 -5
- package/resources/extractions.d.ts.map +1 -1
- 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/monitors/index.d.mts +1 -1
- package/resources/monitors/index.d.mts.map +1 -1
- package/resources/monitors/index.d.ts +1 -1
- package/resources/monitors/index.d.ts.map +1 -1
- package/resources/monitors/index.js.map +1 -1
- package/resources/monitors/index.mjs.map +1 -1
- package/resources/monitors/monitors.d.mts +38 -1
- package/resources/monitors/monitors.d.mts.map +1 -1
- package/resources/monitors/monitors.d.ts +38 -1
- package/resources/monitors/monitors.d.ts.map +1 -1
- package/resources/monitors/monitors.js +18 -0
- package/resources/monitors/monitors.js.map +1 -1
- package/resources/monitors/monitors.mjs +18 -0
- package/resources/monitors/monitors.mjs.map +1 -1
- package/resources/monitors/posts.d.mts +27 -0
- package/resources/monitors/posts.d.mts.map +1 -1
- package/resources/monitors/posts.d.ts +27 -0
- package/resources/monitors/posts.d.ts.map +1 -1
- package/resources/radar.d.mts +9 -0
- package/resources/radar.d.mts.map +1 -1
- package/resources/radar.d.ts +9 -0
- package/resources/radar.d.ts.map +1 -1
- package/resources/shared.d.mts +175 -5
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +175 -5
- package/resources/shared.d.ts.map +1 -1
- package/resources/x/account-connection-attempts.d.mts +4 -0
- package/resources/x/account-connection-attempts.d.mts.map +1 -1
- package/resources/x/account-connection-attempts.d.ts +4 -0
- package/resources/x/account-connection-attempts.d.ts.map +1 -1
- package/resources/x/account-connection-links.d.mts +159 -0
- package/resources/x/account-connection-links.d.mts.map +1 -0
- package/resources/x/account-connection-links.d.ts +159 -0
- package/resources/x/account-connection-links.d.ts.map +1 -0
- package/resources/x/account-connection-links.js +82 -0
- package/resources/x/account-connection-links.js.map +1 -0
- package/resources/x/account-connection-links.mjs +78 -0
- package/resources/x/account-connection-links.mjs.map +1 -0
- package/resources/x/accounts.d.mts +13 -9
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +13 -9
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/analysis.d.mts +540 -36
- package/resources/x/analysis.d.mts.map +1 -1
- package/resources/x/analysis.d.ts +540 -36
- package/resources/x/analysis.d.ts.map +1 -1
- package/resources/x/bookmarks.d.mts +5 -0
- package/resources/x/bookmarks.d.mts.map +1 -1
- package/resources/x/bookmarks.d.ts +5 -0
- package/resources/x/bookmarks.d.ts.map +1 -1
- package/resources/x/communities/communities.d.mts +19 -2
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +19 -2
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +7 -4
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +7 -4
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/join.d.mts +16 -2
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +16 -2
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +4 -4
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +4 -4
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/dm.d.mts +16 -2
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +16 -2
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +4 -4
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +4 -4
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/index.d.mts +2 -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/media.d.mts +55 -1
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +55 -1
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +2 -2
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs +2 -2
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +24 -3
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +24 -3
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +6 -6
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs +6 -6
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/tweets/bookmark.d.mts +84 -0
- package/resources/x/tweets/bookmark.d.mts.map +1 -0
- package/resources/x/tweets/bookmark.d.ts +84 -0
- package/resources/x/tweets/bookmark.d.ts.map +1 -0
- package/resources/x/tweets/bookmark.js +55 -0
- package/resources/x/tweets/bookmark.js.map +1 -0
- package/resources/x/tweets/bookmark.mjs +51 -0
- package/resources/x/tweets/bookmark.mjs.map +1 -0
- package/resources/x/tweets/index.d.mts +1 -0
- package/resources/x/tweets/index.d.mts.map +1 -1
- package/resources/x/tweets/index.d.ts +1 -0
- package/resources/x/tweets/index.d.ts.map +1 -1
- package/resources/x/tweets/index.js +3 -1
- package/resources/x/tweets/index.js.map +1 -1
- package/resources/x/tweets/index.mjs +1 -0
- package/resources/x/tweets/index.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts +16 -2
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts +16 -2
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.js +4 -4
- package/resources/x/tweets/like.js.map +1 -1
- package/resources/x/tweets/like.mjs +4 -4
- package/resources/x/tweets/like.mjs.map +1 -1
- package/resources/x/tweets/retweet.d.mts +16 -2
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts +16 -2
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.js +4 -4
- package/resources/x/tweets/retweet.js.map +1 -1
- package/resources/x/tweets/retweet.mjs +4 -4
- package/resources/x/tweets/retweet.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +68 -13
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +68 -13
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +8 -4
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +8 -4
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/users/block.d.mts +84 -0
- package/resources/x/users/block.d.mts.map +1 -0
- package/resources/x/users/block.d.ts +84 -0
- package/resources/x/users/block.d.ts.map +1 -0
- package/resources/x/users/block.js +55 -0
- package/resources/x/users/block.js.map +1 -0
- package/resources/x/users/block.mjs +51 -0
- package/resources/x/users/block.mjs.map +1 -0
- package/resources/x/users/follow.d.mts +16 -2
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts +16 -2
- package/resources/x/users/follow.d.ts.map +1 -1
- package/resources/x/users/follow.js +4 -4
- package/resources/x/users/follow.js.map +1 -1
- package/resources/x/users/follow.mjs +4 -4
- package/resources/x/users/follow.mjs.map +1 -1
- package/resources/x/users/index.d.mts +3 -1
- package/resources/x/users/index.d.mts.map +1 -1
- package/resources/x/users/index.d.ts +3 -1
- package/resources/x/users/index.d.ts.map +1 -1
- package/resources/x/users/index.js +5 -1
- package/resources/x/users/index.js.map +1 -1
- package/resources/x/users/index.mjs +2 -0
- package/resources/x/users/index.mjs.map +1 -1
- package/resources/x/users/mute.d.mts +84 -0
- package/resources/x/users/mute.d.mts.map +1 -0
- package/resources/x/users/mute.d.ts +84 -0
- package/resources/x/users/mute.d.ts.map +1 -0
- package/resources/x/users/mute.js +55 -0
- package/resources/x/users/mute.js.map +1 -0
- package/resources/x/users/mute.mjs +51 -0
- package/resources/x/users/mute.mjs.map +1 -0
- package/resources/x/users/users.d.mts +783 -9
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +783 -9
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +44 -3
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +44 -3
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/write-actions.d.mts +1 -1
- package/resources/x/write-actions.d.mts.map +1 -1
- package/resources/x/write-actions.d.ts +1 -1
- package/resources/x/write-actions.d.ts.map +1 -1
- package/resources/x/x.d.mts +15 -2
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +15 -2
- 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/src/client.ts +9 -0
- package/src/core/README.md +4 -0
- package/src/internal/README.md +6 -1
- package/src/resources/activity.ts +41 -2
- package/src/resources/credits.ts +6 -0
- package/src/resources/extractions.ts +183 -0
- package/src/resources/index.ts +2 -0
- package/src/resources/monitors/index.ts +2 -0
- package/src/resources/monitors/monitors.ts +49 -0
- package/src/resources/monitors/posts.ts +32 -0
- package/src/resources/radar.ts +10 -0
- package/src/resources/shared.ts +213 -4
- package/src/resources/x/account-connection-attempts.ts +5 -0
- package/src/resources/x/account-connection-links.ts +215 -0
- package/src/resources/x/accounts.ts +15 -14
- package/src/resources/x/analysis.ts +618 -36
- package/src/resources/x/bookmarks.ts +6 -0
- package/src/resources/x/communities/communities.ts +35 -4
- package/src/resources/x/communities/join.ts +32 -4
- package/src/resources/x/dm.ts +32 -4
- package/src/resources/x/index.ts +18 -0
- package/src/resources/x/media.ts +74 -2
- package/src/resources/x/profile.ts +48 -6
- package/src/resources/x/tweets/bookmark.ts +127 -0
- package/src/resources/x/tweets/index.ts +7 -0
- package/src/resources/x/tweets/like.ts +32 -4
- package/src/resources/x/tweets/retweet.ts +32 -4
- package/src/resources/x/tweets/tweets.ts +104 -14
- package/src/resources/x/users/block.ts +119 -0
- package/src/resources/x/users/follow.ts +32 -4
- package/src/resources/x/users/index.ts +23 -0
- package/src/resources/x/users/mute.ts +119 -0
- package/src/resources/x/users/users.ts +1063 -89
- package/src/resources/x/write-actions.ts +6 -0
- package/src/resources/x/x.ts +54 -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/src/internal/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
# `internal`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://youtu.be/4UOSpoOoC3Y?t=367)\
|
|
4
|
+
[Watch Framer build a tweet ticker with Xquik, from 6:07](https://youtu.be/4UOSpoOoC3Y?t=367).
|
|
5
|
+
This SDK calls the Xquik API.
|
|
6
|
+
|
|
7
|
+
Code outside this package can't import these modules.
|
|
8
|
+
They change between releases.
|
|
@@ -134,7 +134,24 @@ export interface ActivityRecord {
|
|
|
134
134
|
*/
|
|
135
135
|
details: { [key: string]: string | number | boolean | null };
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Kind of the activity. Only a signed-in dashboard session sees an `api_key`
|
|
139
|
+
* record.
|
|
140
|
+
*/
|
|
141
|
+
kind:
|
|
142
|
+
| 'write_action'
|
|
143
|
+
| 'extraction'
|
|
144
|
+
| 'monitor_change'
|
|
145
|
+
| 'api_key'
|
|
146
|
+
| 'billing'
|
|
147
|
+
| 'giveaway_draw'
|
|
148
|
+
| 'monitor_event'
|
|
149
|
+
| 'media_download'
|
|
150
|
+
| 'media_share'
|
|
151
|
+
| 'support_ticket'
|
|
152
|
+
| 'webhook_delivery'
|
|
153
|
+
| 'webhook_endpoint'
|
|
154
|
+
| 'x_account_connection';
|
|
138
155
|
|
|
139
156
|
object: 'activity';
|
|
140
157
|
|
|
@@ -159,7 +176,9 @@ export interface ActivityRecord {
|
|
|
159
176
|
timestamps: ActivityRecord.Timestamps;
|
|
160
177
|
|
|
161
178
|
/**
|
|
162
|
-
*
|
|
179
|
+
* Type of the activity within its kind, the same as the type of its Activity log
|
|
180
|
+
* row. Examples are a write action type, an extraction tool type, a monitor
|
|
181
|
+
* change, a monitor event type or a ledger entry type.
|
|
163
182
|
*/
|
|
164
183
|
type: string;
|
|
165
184
|
|
|
@@ -238,8 +257,28 @@ export namespace ActivityRecord {
|
|
|
238
257
|
|
|
239
258
|
confirmedAt?: string;
|
|
240
259
|
|
|
260
|
+
deliveredAt?: string;
|
|
261
|
+
|
|
262
|
+
discoveredAt?: string;
|
|
263
|
+
|
|
264
|
+
drawnAt?: string;
|
|
265
|
+
|
|
266
|
+
exhaustedAt?: string;
|
|
267
|
+
|
|
241
268
|
expiresAt?: string;
|
|
242
269
|
|
|
270
|
+
firstAttemptedAt?: string;
|
|
271
|
+
|
|
272
|
+
lastUsedAt?: string;
|
|
273
|
+
|
|
274
|
+
nextRetryAt?: string;
|
|
275
|
+
|
|
276
|
+
occurredAt?: string;
|
|
277
|
+
|
|
278
|
+
pausedAt?: string;
|
|
279
|
+
|
|
280
|
+
postedAt?: string;
|
|
281
|
+
|
|
243
282
|
updatedAt?: string;
|
|
244
283
|
}
|
|
245
284
|
}
|
package/src/resources/credits.ts
CHANGED
|
@@ -201,6 +201,12 @@ export interface CreditTopupBalanceParams {
|
|
|
201
201
|
* default.
|
|
202
202
|
*/
|
|
203
203
|
locale?: string;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Optional Xquik tool page to return to after Checkout, such as
|
|
207
|
+
* /en/x-article-reader.
|
|
208
|
+
*/
|
|
209
|
+
returnPath?: string;
|
|
204
210
|
}
|
|
205
211
|
|
|
206
212
|
export declare namespace Credits {
|
|
@@ -203,6 +203,7 @@ export interface ExtractionJob {
|
|
|
203
203
|
| 'space_explorer'
|
|
204
204
|
| 'thread_extractor'
|
|
205
205
|
| 'tweet_search_extractor'
|
|
206
|
+
| 'user_affiliates'
|
|
206
207
|
| 'user_likes'
|
|
207
208
|
| 'user_media'
|
|
208
209
|
| 'verified_follower_explorer';
|
|
@@ -212,6 +213,12 @@ export interface ExtractionJob {
|
|
|
212
213
|
*/
|
|
213
214
|
totalResults: number;
|
|
214
215
|
|
|
216
|
+
/**
|
|
217
|
+
* Dashboard page where a signed-in user follows this job & downloads its rows as
|
|
218
|
+
* CSV, XLSX, JSON, Markdown, PDF or text.
|
|
219
|
+
*/
|
|
220
|
+
url: string;
|
|
221
|
+
|
|
215
222
|
completedAt?: string;
|
|
216
223
|
|
|
217
224
|
/**
|
|
@@ -237,10 +244,22 @@ export interface ExtractionJob {
|
|
|
237
244
|
*/
|
|
238
245
|
errorMessage?: string;
|
|
239
246
|
|
|
247
|
+
/**
|
|
248
|
+
* What the image filter asked & how many posts it kept. Present on a job that sent
|
|
249
|
+
* imageShows.
|
|
250
|
+
*/
|
|
251
|
+
imageFilter?: Shared.ImageFilterSummary;
|
|
252
|
+
|
|
240
253
|
/**
|
|
241
254
|
* Requested result limit.
|
|
242
255
|
*/
|
|
243
256
|
resultsLimit?: number;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* What the topic filter asked & how many posts it kept. Present on a job that sent
|
|
260
|
+
* topic.
|
|
261
|
+
*/
|
|
262
|
+
topicFilter?: Shared.TopicFilterSummary;
|
|
244
263
|
}
|
|
245
264
|
|
|
246
265
|
export interface ExtractionRetrieveResponse {
|
|
@@ -299,11 +318,43 @@ export namespace ExtractionRetrieveResponse {
|
|
|
299
318
|
*/
|
|
300
319
|
media?: Array<Shared.TweetMedia>;
|
|
301
320
|
|
|
321
|
+
/**
|
|
322
|
+
* X's sensitive flag on the post with outputPreset=flat. Default nested output
|
|
323
|
+
* uses enrichmentData.tweet.possiblySensitive.
|
|
324
|
+
*/
|
|
325
|
+
possiblySensitive?: boolean;
|
|
326
|
+
|
|
302
327
|
/**
|
|
303
328
|
* Whole number from 0.
|
|
304
329
|
*/
|
|
305
330
|
quoteCount?: number;
|
|
306
331
|
|
|
332
|
+
/**
|
|
333
|
+
* True on a post its author deleted from X after Xquik saw it, with
|
|
334
|
+
* outputPreset=flat. Default nested output uses enrichmentData.tweet.isDeleted. An
|
|
335
|
+
* account post list with a date range adds such posts from the last 30 days.
|
|
336
|
+
* Absent on every other row.
|
|
337
|
+
*/
|
|
338
|
+
isDeleted?: boolean;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Media of the quoted post with outputPreset=flat. Default nested output uses
|
|
342
|
+
* enrichmentData.tweet.quotedMedia.
|
|
343
|
+
*/
|
|
344
|
+
quotedMedia?: Array<Shared.TweetMedia>;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* X's sensitive flag on the quoted post with outputPreset=flat. Default nested
|
|
348
|
+
* output uses enrichmentData.tweet.quotedPossiblySensitive.
|
|
349
|
+
*/
|
|
350
|
+
quotedPossiblySensitive?: boolean;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* The quoted post's ID, text, date & author with outputPreset=flat. Default nested
|
|
354
|
+
* output uses enrichmentData.tweet.quotedPost.
|
|
355
|
+
*/
|
|
356
|
+
quotedPost?: Result.QuotedPost;
|
|
357
|
+
|
|
307
358
|
/**
|
|
308
359
|
* Whole number from 0.
|
|
309
360
|
*/
|
|
@@ -352,6 +403,31 @@ export namespace ExtractionRetrieveResponse {
|
|
|
352
403
|
|
|
353
404
|
[k: string]: unknown;
|
|
354
405
|
}
|
|
406
|
+
|
|
407
|
+
export namespace Result {
|
|
408
|
+
/**
|
|
409
|
+
* The quoted post's ID, text, date & author with outputPreset=flat.
|
|
410
|
+
*/
|
|
411
|
+
export interface QuotedPost {
|
|
412
|
+
id?: string;
|
|
413
|
+
|
|
414
|
+
author?: QuotedPost.Author;
|
|
415
|
+
|
|
416
|
+
createdAt?: string;
|
|
417
|
+
|
|
418
|
+
text?: string;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export namespace QuotedPost {
|
|
422
|
+
export interface Author {
|
|
423
|
+
name?: string;
|
|
424
|
+
|
|
425
|
+
profilePicture?: string;
|
|
426
|
+
|
|
427
|
+
userName?: string;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
355
431
|
}
|
|
356
432
|
|
|
357
433
|
export interface ExtractionListResponse {
|
|
@@ -482,10 +558,18 @@ export namespace ExtractionRunResponse {
|
|
|
482
558
|
| 'space_explorer'
|
|
483
559
|
| 'thread_extractor'
|
|
484
560
|
| 'tweet_search_extractor'
|
|
561
|
+
| 'user_affiliates'
|
|
485
562
|
| 'user_likes'
|
|
486
563
|
| 'user_media'
|
|
487
564
|
| 'verified_follower_explorer';
|
|
488
565
|
|
|
566
|
+
/**
|
|
567
|
+
* Dashboard page of the job. A signed-in user follows its progress there and
|
|
568
|
+
* downloads every row as CSV, XLSX, JSON, Markdown, PDF or text, so give this link
|
|
569
|
+
* to a person who wants the whole list as a file.
|
|
570
|
+
*/
|
|
571
|
+
url: string;
|
|
572
|
+
|
|
489
573
|
waitUrl: string;
|
|
490
574
|
}
|
|
491
575
|
}
|
|
@@ -571,6 +655,7 @@ export interface ExtractionListParams {
|
|
|
571
655
|
| 'space_explorer'
|
|
572
656
|
| 'thread_extractor'
|
|
573
657
|
| 'tweet_search_extractor'
|
|
658
|
+
| 'user_affiliates'
|
|
574
659
|
| 'user_likes'
|
|
575
660
|
| 'user_media'
|
|
576
661
|
| 'verified_follower_explorer';
|
|
@@ -601,6 +686,7 @@ export interface ExtractionEstimateCostParams {
|
|
|
601
686
|
| 'space_explorer'
|
|
602
687
|
| 'thread_extractor'
|
|
603
688
|
| 'tweet_search_extractor'
|
|
689
|
+
| 'user_affiliates'
|
|
604
690
|
| 'user_likes'
|
|
605
691
|
| 'user_media'
|
|
606
692
|
| 'verified_follower_explorer';
|
|
@@ -737,6 +823,16 @@ export interface ExtractionEstimateCostParams {
|
|
|
737
823
|
*/
|
|
738
824
|
hasWebsite?: boolean;
|
|
739
825
|
|
|
826
|
+
/**
|
|
827
|
+
* Keep only the posts whose photos show this. Use charts, screenshots,
|
|
828
|
+
* product_photos, memes or people, or describe it in your own words. Each post with
|
|
829
|
+
* a safe photo is checked, & each stored post costs 2 credits instead of its read
|
|
830
|
+
* price. Posts without a safe photo aren't checked, billed or stored, & a post the
|
|
831
|
+
* filter drops costs nothing. resultsLimit caps the posts read. Works with tools
|
|
832
|
+
* that return posts. Send topic or imageShows, not both.
|
|
833
|
+
*/
|
|
834
|
+
imageShows?: string;
|
|
835
|
+
|
|
740
836
|
/**
|
|
741
837
|
* Include the source post in reply results.
|
|
742
838
|
*/
|
|
@@ -1071,6 +1167,21 @@ export interface ExtractionEstimateCostParams {
|
|
|
1071
1167
|
*/
|
|
1072
1168
|
targetUsernames?: Array<string>;
|
|
1073
1169
|
|
|
1170
|
+
/**
|
|
1171
|
+
* Collects a post only when 1 of these words or quoted phrases is in its text, a
|
|
1172
|
+
* link, its card or a quoted post. The author's name and username don't count.
|
|
1173
|
+
*/
|
|
1174
|
+
textOnlyTerms?: string;
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Keep only the posts about this topic, such as "the Rust programming language".
|
|
1178
|
+
* Each post the job reads is checked, only matching posts are stored, & each stored
|
|
1179
|
+
* post costs 2 credits instead of its read price. A post the filter drops costs
|
|
1180
|
+
* nothing. resultsLimit caps the posts read & checked. Works with tools that return
|
|
1181
|
+
* posts. Send topic or imageShows, not both.
|
|
1182
|
+
*/
|
|
1183
|
+
topic?: string;
|
|
1184
|
+
|
|
1074
1185
|
/**
|
|
1075
1186
|
* Replies to this username (tweet_search_extractor).
|
|
1076
1187
|
*/
|
|
@@ -1154,6 +1265,20 @@ export namespace ExtractionEstimateCostParams {
|
|
|
1154
1265
|
}
|
|
1155
1266
|
|
|
1156
1267
|
export interface ExtractionExportResultsParams {
|
|
1268
|
+
/**
|
|
1269
|
+
* With compare, `added` keeps this run's new rows and `removed` keeps the earlier
|
|
1270
|
+
* run's rows that this run lacks. The default is `added`. A run of another
|
|
1271
|
+
* account ignores it.
|
|
1272
|
+
*/
|
|
1273
|
+
change?: 'added' | 'removed';
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* ID of another run of this tool. For an earlier whole run of the same account,
|
|
1277
|
+
* the export holds only the rows that differ. For a run of another account, it
|
|
1278
|
+
* holds only this run's rows that the other run also lists.
|
|
1279
|
+
*/
|
|
1280
|
+
compare?: string;
|
|
1281
|
+
|
|
1157
1282
|
/**
|
|
1158
1283
|
* Export file format
|
|
1159
1284
|
*/
|
|
@@ -1190,11 +1315,43 @@ export interface ExtractionExportResultsParams {
|
|
|
1190
1315
|
*/
|
|
1191
1316
|
hasMedia?: boolean;
|
|
1192
1317
|
|
|
1318
|
+
/**
|
|
1319
|
+
* Require a website on the profile.
|
|
1320
|
+
*/
|
|
1321
|
+
hasWebsite?: boolean;
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* Drop accounts with at least 3 of these signs. No posts, a default picture, an
|
|
1325
|
+
* empty bio, or following at least 100 accounts and 10 times their followers.
|
|
1326
|
+
*/
|
|
1327
|
+
hideFake?: boolean;
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Drop accounts with under 1 post a month since joining that are at least 180
|
|
1331
|
+
* days old.
|
|
1332
|
+
*/
|
|
1333
|
+
hideInactive?: boolean;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* Keep accounts that joined X on this UTC day or later.
|
|
1337
|
+
*/
|
|
1338
|
+
joinedSince?: string;
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* Keep accounts that joined X before this UTC day.
|
|
1342
|
+
*/
|
|
1343
|
+
joinedUntil?: string;
|
|
1344
|
+
|
|
1193
1345
|
/**
|
|
1194
1346
|
* Filter by language code.
|
|
1195
1347
|
*/
|
|
1196
1348
|
lang?: string;
|
|
1197
1349
|
|
|
1350
|
+
/**
|
|
1351
|
+
* Keep accounts whose location contains this text.
|
|
1352
|
+
*/
|
|
1353
|
+
location?: string;
|
|
1354
|
+
|
|
1198
1355
|
/**
|
|
1199
1356
|
* Maximum follower count.
|
|
1200
1357
|
*/
|
|
@@ -1295,6 +1452,7 @@ export interface ExtractionRunParams {
|
|
|
1295
1452
|
| 'space_explorer'
|
|
1296
1453
|
| 'thread_extractor'
|
|
1297
1454
|
| 'tweet_search_extractor'
|
|
1455
|
+
| 'user_affiliates'
|
|
1298
1456
|
| 'user_likes'
|
|
1299
1457
|
| 'user_media'
|
|
1300
1458
|
| 'verified_follower_explorer';
|
|
@@ -1440,6 +1598,16 @@ export interface ExtractionRunParams {
|
|
|
1440
1598
|
*/
|
|
1441
1599
|
hasWebsite?: boolean;
|
|
1442
1600
|
|
|
1601
|
+
/**
|
|
1602
|
+
* Body param: Keep only the posts whose photos show this. Use charts, screenshots,
|
|
1603
|
+
* product_photos, memes or people, or describe it in your own words. Each post with
|
|
1604
|
+
* a safe photo is checked, & each stored post costs 2 credits instead of its read
|
|
1605
|
+
* price. Posts without a safe photo aren't checked, billed or stored, & a post the
|
|
1606
|
+
* filter drops costs nothing. resultsLimit caps the posts read. Works with tools
|
|
1607
|
+
* that return posts. Send topic or imageShows, not both.
|
|
1608
|
+
*/
|
|
1609
|
+
imageShows?: string;
|
|
1610
|
+
|
|
1443
1611
|
/**
|
|
1444
1612
|
* Body param: Include the source post in reply results.
|
|
1445
1613
|
*/
|
|
@@ -1780,6 +1948,21 @@ export interface ExtractionRunParams {
|
|
|
1780
1948
|
*/
|
|
1781
1949
|
targetUsernames?: Array<string>;
|
|
1782
1950
|
|
|
1951
|
+
/**
|
|
1952
|
+
* Collects a post only when 1 of these words or quoted phrases is in its text, a
|
|
1953
|
+
* link, its card or a quoted post. The author's name and username don't count.
|
|
1954
|
+
*/
|
|
1955
|
+
textOnlyTerms?: string;
|
|
1956
|
+
|
|
1957
|
+
/**
|
|
1958
|
+
* Body param: Keep only the posts about this topic, such as "the Rust programming
|
|
1959
|
+
* language". Each post the job reads is checked, only matching posts are stored, &
|
|
1960
|
+
* each stored post costs 2 credits instead of its read price. A post the filter
|
|
1961
|
+
* drops costs nothing. resultsLimit caps the posts read & checked. Works with tools
|
|
1962
|
+
* that return posts. Send topic or imageShows, not both.
|
|
1963
|
+
*/
|
|
1964
|
+
topic?: string;
|
|
1965
|
+
|
|
1783
1966
|
/**
|
|
1784
1967
|
* Body param: Replies to this username (tweet_search_extractor).
|
|
1785
1968
|
*/
|
package/src/resources/index.ts
CHANGED
|
@@ -87,9 +87,11 @@ export {
|
|
|
87
87
|
type MonitorCreateResponse,
|
|
88
88
|
type MonitorListResponse,
|
|
89
89
|
type MonitorDeactivateResponse,
|
|
90
|
+
type MonitorUpsertByUsernameResponse,
|
|
90
91
|
type MonitorCreateParams,
|
|
91
92
|
type MonitorUpdateParams,
|
|
92
93
|
type MonitorListParams,
|
|
94
|
+
type MonitorUpsertByUsernameParams,
|
|
93
95
|
} from './monitors/monitors';
|
|
94
96
|
export {
|
|
95
97
|
Radar,
|
|
@@ -20,9 +20,11 @@ export {
|
|
|
20
20
|
type MonitorCreateResponse,
|
|
21
21
|
type MonitorListResponse,
|
|
22
22
|
type MonitorDeactivateResponse,
|
|
23
|
+
type MonitorUpsertByUsernameResponse,
|
|
23
24
|
type MonitorCreateParams,
|
|
24
25
|
type MonitorUpdateParams,
|
|
25
26
|
type MonitorListParams,
|
|
27
|
+
type MonitorUpsertByUsernameParams,
|
|
26
28
|
} from './monitors';
|
|
27
29
|
export {
|
|
28
30
|
Posts,
|
|
@@ -122,6 +122,29 @@ export class Monitors extends APIResource {
|
|
|
122
122
|
deactivate(id: string, options?: RequestOptions): APIPromise<MonitorDeactivateResponse> {
|
|
123
123
|
return this._client.delete(path`/monitors/${id}`, options);
|
|
124
124
|
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Creates the monitor if it does not exist, or updates it if it does. Send the
|
|
128
|
+
* same call twice & you still have 1 monitor. `created` says which one ran.
|
|
129
|
+
* Creating needs the credits of the first hour, then costs 30 credits an hour. A
|
|
130
|
+
* stopped monitor turns back on & counts as created. Updating is free & replaces
|
|
131
|
+
* the event types. It changes the name only when you send one.
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```ts
|
|
135
|
+
* const monitor = await client.monitors.upsertByUsername(
|
|
136
|
+
* 'elonmusk',
|
|
137
|
+
* { eventTypes: ['tweet.new', 'tweet.reply'] },
|
|
138
|
+
* );
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
upsertByUsername(
|
|
142
|
+
username: string,
|
|
143
|
+
body: MonitorUpsertByUsernameParams,
|
|
144
|
+
options?: RequestOptions,
|
|
145
|
+
): APIPromise<MonitorUpsertByUsernameResponse> {
|
|
146
|
+
return this._client.put(path`/monitors/username/${username}`, { body, ...options });
|
|
147
|
+
}
|
|
125
148
|
}
|
|
126
149
|
|
|
127
150
|
/**
|
|
@@ -213,6 +236,17 @@ export interface MonitorDeactivateResponse {
|
|
|
213
236
|
success: true;
|
|
214
237
|
}
|
|
215
238
|
|
|
239
|
+
/**
|
|
240
|
+
* The account monitor an upsert created or updated.
|
|
241
|
+
*/
|
|
242
|
+
export interface MonitorUpsertByUsernameResponse extends Monitor {
|
|
243
|
+
/**
|
|
244
|
+
* True when this call created the monitor or turned it back on. False when it
|
|
245
|
+
* updated a running monitor.
|
|
246
|
+
*/
|
|
247
|
+
created: boolean;
|
|
248
|
+
}
|
|
249
|
+
|
|
216
250
|
export interface MonitorCreateParams {
|
|
217
251
|
/**
|
|
218
252
|
* Array of event types to subscribe to.
|
|
@@ -259,6 +293,19 @@ export interface MonitorListParams {
|
|
|
259
293
|
limit?: number;
|
|
260
294
|
}
|
|
261
295
|
|
|
296
|
+
export interface MonitorUpsertByUsernameParams {
|
|
297
|
+
/**
|
|
298
|
+
* Array of event types to subscribe to.
|
|
299
|
+
*/
|
|
300
|
+
eventTypes: Array<Shared.EventType>;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Your label for the monitor. Its events carry it as monitorName. Leave it out to
|
|
304
|
+
* keep the current label, or send null to remove it.
|
|
305
|
+
*/
|
|
306
|
+
name?: string | null;
|
|
307
|
+
}
|
|
308
|
+
|
|
262
309
|
Monitors.Keywords = Keywords;
|
|
263
310
|
Monitors.Posts = Posts;
|
|
264
311
|
|
|
@@ -268,9 +315,11 @@ export declare namespace Monitors {
|
|
|
268
315
|
type MonitorCreateResponse as MonitorCreateResponse,
|
|
269
316
|
type MonitorListResponse as MonitorListResponse,
|
|
270
317
|
type MonitorDeactivateResponse as MonitorDeactivateResponse,
|
|
318
|
+
type MonitorUpsertByUsernameResponse as MonitorUpsertByUsernameResponse,
|
|
271
319
|
type MonitorCreateParams as MonitorCreateParams,
|
|
272
320
|
type MonitorUpdateParams as MonitorUpdateParams,
|
|
273
321
|
type MonitorListParams as MonitorListParams,
|
|
322
|
+
type MonitorUpsertByUsernameParams as MonitorUpsertByUsernameParams,
|
|
274
323
|
};
|
|
275
324
|
|
|
276
325
|
export {
|
|
@@ -202,6 +202,12 @@ export interface PostMonitor {
|
|
|
202
202
|
*/
|
|
203
203
|
authorVerified?: 'blue' | 'business' | 'government';
|
|
204
204
|
|
|
205
|
+
/**
|
|
206
|
+
* The organization badge X shows beside the author's name. Omitted when X shows
|
|
207
|
+
* none.
|
|
208
|
+
*/
|
|
209
|
+
authorAffiliate?: PostMonitor.AuthorAffiliate;
|
|
210
|
+
|
|
205
211
|
/**
|
|
206
212
|
* Photos, videos & GIFs on the post, in X's order.
|
|
207
213
|
*/
|
|
@@ -260,6 +266,26 @@ export interface PostMonitor {
|
|
|
260
266
|
}
|
|
261
267
|
|
|
262
268
|
export namespace PostMonitor {
|
|
269
|
+
/**
|
|
270
|
+
* The organization badge X shows beside the author's name.
|
|
271
|
+
*/
|
|
272
|
+
export interface AuthorAffiliate {
|
|
273
|
+
/**
|
|
274
|
+
* The organization's badge image.
|
|
275
|
+
*/
|
|
276
|
+
badgeUrl: string;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* The organization's name, as X shows it.
|
|
280
|
+
*/
|
|
281
|
+
description: string;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* The organization's X profile, when X links one.
|
|
285
|
+
*/
|
|
286
|
+
url?: string;
|
|
287
|
+
}
|
|
288
|
+
|
|
263
289
|
/**
|
|
264
290
|
* 1 photo, video or GIF on the post.
|
|
265
291
|
*/
|
|
@@ -455,6 +481,12 @@ export interface PostCreateParams {
|
|
|
455
481
|
*/
|
|
456
482
|
eventTypes?: Array<PostEventType>;
|
|
457
483
|
|
|
484
|
+
/**
|
|
485
|
+
* Send false to create the monitor paused. A paused monitor reads nothing & costs
|
|
486
|
+
* nothing until a PATCH sets isActive to true.
|
|
487
|
+
*/
|
|
488
|
+
isActive?: boolean;
|
|
489
|
+
|
|
458
490
|
/**
|
|
459
491
|
* Your own label for the post monitor. Its events carry it as monitorName.
|
|
460
492
|
*/
|
package/src/resources/radar.ts
CHANGED
|
@@ -136,6 +136,11 @@ export namespace RadarItem {
|
|
|
136
136
|
|
|
137
137
|
selftext?: string;
|
|
138
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Tone of an English post title, from the VADER word list.
|
|
141
|
+
*/
|
|
142
|
+
sentiment?: 'positive' | 'neutral' | 'negative';
|
|
143
|
+
|
|
139
144
|
/**
|
|
140
145
|
* Current items use html. json and rss are retained for legacy rows.
|
|
141
146
|
*/
|
|
@@ -145,6 +150,11 @@ export namespace RadarItem {
|
|
|
145
150
|
|
|
146
151
|
upvoteRatio?: number;
|
|
147
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Reddit lists the post ranks in. now is the popular feed, and the rest are top
|
|
155
|
+
* lists of that window.
|
|
156
|
+
*/
|
|
157
|
+
windows?: Array<'now' | 'hour' | 'day' | 'week' | 'month' | 'year'>;
|
|
148
158
|
[k: string]: unknown;
|
|
149
159
|
}
|
|
150
160
|
}
|