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
|
@@ -7,6 +7,7 @@ import * as AttachmentsAPI from './attachments';
|
|
|
7
7
|
import { AttachmentDownloadParams, Attachments } from './attachments';
|
|
8
8
|
import * as TicketsAPI from './tickets';
|
|
9
9
|
import {
|
|
10
|
+
SupportReceipt,
|
|
10
11
|
TicketCreateParams,
|
|
11
12
|
TicketCreateResponse,
|
|
12
13
|
TicketListParams,
|
|
@@ -32,6 +33,7 @@ export declare namespace Support {
|
|
|
32
33
|
|
|
33
34
|
export {
|
|
34
35
|
Tickets as Tickets,
|
|
36
|
+
type SupportReceipt as SupportReceipt,
|
|
35
37
|
type TicketCreateResponse as TicketCreateResponse,
|
|
36
38
|
type TicketRetrieveResponse as TicketRetrieveResponse,
|
|
37
39
|
type TicketUpdateResponse as TicketUpdateResponse,
|
|
@@ -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';
|
|
@@ -24,7 +25,7 @@ export class Tickets extends APIResource {
|
|
|
24
25
|
* });
|
|
25
26
|
* ```
|
|
26
27
|
*/
|
|
27
|
-
create(params: TicketCreateParams, options?: RequestOptions): APIPromise<
|
|
28
|
+
create(params: TicketCreateParams, options?: RequestOptions): APIPromise<SupportReceipt> {
|
|
28
29
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
29
30
|
return this._client.post(
|
|
30
31
|
'/support/tickets',
|
|
@@ -97,7 +98,7 @@ export class Tickets extends APIResource {
|
|
|
97
98
|
* );
|
|
98
99
|
* ```
|
|
99
100
|
*/
|
|
100
|
-
reply(id: string, params: TicketReplyParams, options?: RequestOptions): APIPromise<
|
|
101
|
+
reply(id: string, params: TicketReplyParams, options?: RequestOptions): APIPromise<SupportReceipt> {
|
|
101
102
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
102
103
|
return this._client.post(
|
|
103
104
|
path`/support/tickets/${id}/messages`,
|
|
@@ -119,13 +120,13 @@ export class Tickets extends APIResource {
|
|
|
119
120
|
/**
|
|
120
121
|
* Support submission receipt.
|
|
121
122
|
*/
|
|
122
|
-
export interface
|
|
123
|
-
attachments: Array<
|
|
123
|
+
export interface SupportReceipt {
|
|
124
|
+
attachments: Array<SupportReceipt.Attachment>;
|
|
124
125
|
|
|
125
126
|
publicId: string;
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
export namespace
|
|
129
|
+
export namespace SupportReceipt {
|
|
129
130
|
/**
|
|
130
131
|
* Attachment identifier and initial processing state.
|
|
131
132
|
*/
|
|
@@ -136,6 +137,12 @@ export namespace TicketCreateResponse {
|
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
139
|
|
|
140
|
+
export type TicketCreateResponse = SupportReceipt;
|
|
141
|
+
|
|
142
|
+
export namespace TicketCreateResponse {
|
|
143
|
+
export type Attachment = SupportReceipt.Attachment;
|
|
144
|
+
}
|
|
145
|
+
|
|
139
146
|
export interface TicketRetrieveResponse {
|
|
140
147
|
createdAt: string;
|
|
141
148
|
|
|
@@ -229,36 +236,27 @@ export namespace TicketListResponse {
|
|
|
229
236
|
}
|
|
230
237
|
}
|
|
231
238
|
|
|
232
|
-
|
|
233
|
-
* Support submission receipt.
|
|
234
|
-
*/
|
|
235
|
-
export interface TicketReplyResponse {
|
|
236
|
-
attachments: Array<TicketReplyResponse.Attachment>;
|
|
239
|
+
export type TicketReplyResponse = SupportReceipt;
|
|
237
240
|
|
|
238
|
-
|
|
241
|
+
export namespace TicketReplyResponse {
|
|
242
|
+
export type Attachment = SupportReceipt.Attachment;
|
|
239
243
|
}
|
|
240
244
|
|
|
241
|
-
export
|
|
245
|
+
export interface TicketCreateParams {
|
|
242
246
|
/**
|
|
243
|
-
*
|
|
247
|
+
* Body param: Non-empty support ticket subject.
|
|
244
248
|
*/
|
|
245
|
-
|
|
246
|
-
publicId: string;
|
|
247
|
-
|
|
248
|
-
status: 'pending' | 'ready' | 'failed';
|
|
249
|
-
}
|
|
250
|
-
}
|
|
249
|
+
subject: string;
|
|
251
250
|
|
|
252
|
-
export interface TicketCreateParams {
|
|
253
251
|
/**
|
|
254
|
-
* Body param:
|
|
252
|
+
* Body param: 1 to 4 support image or video uploads.
|
|
255
253
|
*/
|
|
256
|
-
|
|
254
|
+
attachments?: Array<Uploadable>;
|
|
257
255
|
|
|
258
256
|
/**
|
|
259
|
-
* Body param: Non-empty support
|
|
257
|
+
* Body param: Non-empty support message text.
|
|
260
258
|
*/
|
|
261
|
-
|
|
259
|
+
body?: string;
|
|
262
260
|
|
|
263
261
|
/**
|
|
264
262
|
* Header param: Generate one random value per ticket or reply. Reuse it only when
|
|
@@ -286,10 +284,15 @@ export interface TicketListParams {
|
|
|
286
284
|
}
|
|
287
285
|
|
|
288
286
|
export interface TicketReplyParams {
|
|
287
|
+
/**
|
|
288
|
+
* Body param: 1 to 4 support image or video uploads.
|
|
289
|
+
*/
|
|
290
|
+
attachments?: Array<Uploadable>;
|
|
291
|
+
|
|
289
292
|
/**
|
|
290
293
|
* Body param: Non-empty support message text.
|
|
291
294
|
*/
|
|
292
|
-
body
|
|
295
|
+
body?: string;
|
|
293
296
|
|
|
294
297
|
/**
|
|
295
298
|
* Header param: Generate one random value per ticket or reply. Reuse it only when
|
|
@@ -300,6 +303,7 @@ export interface TicketReplyParams {
|
|
|
300
303
|
|
|
301
304
|
export declare namespace Tickets {
|
|
302
305
|
export {
|
|
306
|
+
type SupportReceipt as SupportReceipt,
|
|
303
307
|
type TicketCreateResponse as TicketCreateResponse,
|
|
304
308
|
type TicketRetrieveResponse as TicketRetrieveResponse,
|
|
305
309
|
type TicketUpdateResponse as TicketUpdateResponse,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { APIResource } from '../core/resource';
|
|
6
6
|
import * as Shared from './shared';
|
|
7
|
+
import * as PostsAPI from './monitors/posts';
|
|
7
8
|
import { APIPromise } from '../core/api-promise';
|
|
8
9
|
import { RequestOptions } from '../internal/request-options';
|
|
9
10
|
import { path } from '../internal/utils/path';
|
|
@@ -179,7 +180,7 @@ export interface Webhook {
|
|
|
179
180
|
/**
|
|
180
181
|
* Array of event types to subscribe to.
|
|
181
182
|
*/
|
|
182
|
-
eventTypes: Array<Shared.EventType>;
|
|
183
|
+
eventTypes: Array<Shared.EventType | PostsAPI.PostEventType>;
|
|
183
184
|
|
|
184
185
|
/**
|
|
185
186
|
* Maximum reported failures before needs_attention. It does not pause delivery.
|
|
@@ -199,7 +200,7 @@ export interface WebhookCreateResponse {
|
|
|
199
200
|
/**
|
|
200
201
|
* Array of event types to subscribe to.
|
|
201
202
|
*/
|
|
202
|
-
eventTypes: Array<Shared.EventType>;
|
|
203
|
+
eventTypes: Array<Shared.EventType | PostsAPI.PostEventType>;
|
|
203
204
|
|
|
204
205
|
/**
|
|
205
206
|
* Plaintext HMAC signing secret returned only at creation.
|
|
@@ -207,6 +208,12 @@ export interface WebhookCreateResponse {
|
|
|
207
208
|
secret: string;
|
|
208
209
|
|
|
209
210
|
url: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Fields the request sent that this route does not read, in the order sent. They
|
|
214
|
+
* changed nothing. The answer leaves this out when the route read every field.
|
|
215
|
+
*/
|
|
216
|
+
ignoredFields?: Array<string>;
|
|
210
217
|
}
|
|
211
218
|
|
|
212
219
|
export interface WebhookListResponse {
|
|
@@ -264,7 +271,7 @@ export interface WebhookCreateParams {
|
|
|
264
271
|
/**
|
|
265
272
|
* Array of event types to subscribe to.
|
|
266
273
|
*/
|
|
267
|
-
eventTypes: Array<Shared.EventType>;
|
|
274
|
+
eventTypes: Array<Shared.EventType | PostsAPI.PostEventType>;
|
|
268
275
|
|
|
269
276
|
/**
|
|
270
277
|
* HTTPS URL. A Discord channel webhook URL gets each event as a Discord message, &
|
|
@@ -278,7 +285,7 @@ export interface WebhookUpdateParams {
|
|
|
278
285
|
/**
|
|
279
286
|
* Array of event types to subscribe to.
|
|
280
287
|
*/
|
|
281
|
-
eventTypes?: Array<Shared.EventType>;
|
|
288
|
+
eventTypes?: Array<Shared.EventType | PostsAPI.PostEventType>;
|
|
282
289
|
|
|
283
290
|
isActive?: boolean;
|
|
284
291
|
|
|
@@ -71,16 +71,21 @@ export class Accounts extends APIResource {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* Clears loginFailedAt and loginFailureReason for
|
|
75
|
-
* automated failure
|
|
74
|
+
* Clears loginFailedAt and loginFailureReason for every account with a transient
|
|
75
|
+
* or automated failure reason. Each can then retry on its next use. Name accounts
|
|
76
|
+
* in accountIds to retry only those. Needs a dashboard session, since each retry
|
|
77
|
+
* signs in to X again.
|
|
76
78
|
*
|
|
77
79
|
* @example
|
|
78
80
|
* ```ts
|
|
79
81
|
* const response = await client.x.accounts.bulkRetry();
|
|
80
82
|
* ```
|
|
81
83
|
*/
|
|
82
|
-
bulkRetry(
|
|
83
|
-
|
|
84
|
+
bulkRetry(
|
|
85
|
+
body: AccountBulkRetryParams | null | undefined = {},
|
|
86
|
+
options?: RequestOptions,
|
|
87
|
+
): APIPromise<AccountBulkRetryResponse> {
|
|
88
|
+
return this._client.post('/x/accounts/bulk-retry', { body, ...options });
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
/**
|
|
@@ -290,6 +295,15 @@ export interface AccountListParams {
|
|
|
290
295
|
limit?: number;
|
|
291
296
|
}
|
|
292
297
|
|
|
298
|
+
export interface AccountBulkRetryParams {
|
|
299
|
+
/**
|
|
300
|
+
* IDs of the X accounts to retry. Accounts that failed for another reason, or
|
|
301
|
+
* belong to someone else, stay as they are. Accepts 1 to 1,000 IDs. Omit accountIds
|
|
302
|
+
* to retry every account with a transient or automated failure.
|
|
303
|
+
*/
|
|
304
|
+
accountIds?: Array<string>;
|
|
305
|
+
}
|
|
306
|
+
|
|
293
307
|
export interface AccountReauthParams {
|
|
294
308
|
/**
|
|
295
309
|
* Updated account password
|
|
@@ -318,6 +332,7 @@ export declare namespace Accounts {
|
|
|
318
332
|
type AccountReauthResponse as AccountReauthResponse,
|
|
319
333
|
type AccountCreateParams as AccountCreateParams,
|
|
320
334
|
type AccountListParams as AccountListParams,
|
|
335
|
+
type AccountBulkRetryParams as AccountBulkRetryParams,
|
|
321
336
|
type AccountReauthParams as AccountReauthParams,
|
|
322
337
|
};
|
|
323
338
|
}
|
|
@@ -35,165 +35,14 @@ export interface BroadcastRetrieveResponse {
|
|
|
35
35
|
/**
|
|
36
36
|
* X broadcast, a live video
|
|
37
37
|
*/
|
|
38
|
-
broadcast:
|
|
38
|
+
broadcast: Shared.Broadcast;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export namespace BroadcastRetrieveResponse {
|
|
42
|
-
|
|
43
|
-
* X broadcast, a live video
|
|
44
|
-
*/
|
|
45
|
-
export interface Broadcast {
|
|
46
|
-
/**
|
|
47
|
-
* Broadcast ID
|
|
48
|
-
*/
|
|
49
|
-
id: string;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Camera rotation in degrees
|
|
53
|
-
*/
|
|
54
|
-
cameraRotation?: number;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* X's code for who may chat
|
|
58
|
-
*/
|
|
59
|
-
chatOption?: number;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Public X profile.
|
|
63
|
-
*/
|
|
64
|
-
creator?: Shared.UserProfile;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* When the broadcast ended
|
|
68
|
-
*/
|
|
69
|
-
endedAt?: string;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Video height in pixels
|
|
73
|
-
*/
|
|
74
|
-
height?: number;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Whether X offers a recording of the broadcast
|
|
78
|
-
*/
|
|
79
|
-
isAvailableForReplay?: boolean;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Whether the video stream runs in high-latency mode
|
|
83
|
-
*/
|
|
84
|
-
isHighLatency?: boolean;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Whether X marks the chat private
|
|
88
|
-
*/
|
|
89
|
-
isPrivateChat?: boolean;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Whether the broadcaster edited the title of the replay
|
|
93
|
-
*/
|
|
94
|
-
isTitleEdited?: boolean;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* When the video stream last reached X
|
|
98
|
-
*/
|
|
99
|
-
lastPingAt?: string;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* X's media key for the video
|
|
103
|
-
*/
|
|
104
|
-
mediaKey?: string;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Broadcaster, as X's live video service names the account
|
|
108
|
-
*/
|
|
109
|
-
periscopeUser?: Broadcast.PeriscopeUser;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Image X shows before the broadcast starts
|
|
113
|
-
*/
|
|
114
|
-
preLiveSlateUrl?: string;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* When the broadcast was set to start
|
|
118
|
-
*/
|
|
119
|
-
scheduledStart?: string;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* What produced the video stream, as X names it
|
|
123
|
-
*/
|
|
124
|
-
source?: string;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* When the broadcast went live
|
|
128
|
-
*/
|
|
129
|
-
startedAt?: string;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Such as NotStarted, Running or Ended, as X names it
|
|
133
|
-
*/
|
|
134
|
-
state?: string;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Broadcast title
|
|
138
|
-
*/
|
|
139
|
-
title?: string;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Accounts that watched, live or after
|
|
143
|
-
*/
|
|
144
|
-
totalWatched?: number;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Accounts watching, as X counts them
|
|
148
|
-
*/
|
|
149
|
-
totalWatching?: number;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Search tweet with author. Zero metrics may mean X omitted counts.
|
|
153
|
-
*/
|
|
154
|
-
tweet?: Shared.SearchTweet;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* ID of the post that announces the broadcast
|
|
158
|
-
*/
|
|
159
|
-
tweetId?: string;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* X's revision number of the broadcast
|
|
163
|
-
*/
|
|
164
|
-
version?: number;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Video width in pixels
|
|
168
|
-
*/
|
|
169
|
-
width?: number;
|
|
170
|
-
}
|
|
42
|
+
export type Broadcast = Shared.Broadcast;
|
|
171
43
|
|
|
172
44
|
export namespace Broadcast {
|
|
173
|
-
|
|
174
|
-
* Broadcaster, as X's live video service names the account
|
|
175
|
-
*/
|
|
176
|
-
export interface PeriscopeUser {
|
|
177
|
-
/**
|
|
178
|
-
* Live video account ID
|
|
179
|
-
*/
|
|
180
|
-
id?: string;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Live video display name
|
|
184
|
-
*/
|
|
185
|
-
displayName?: string;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Live video avatar URL
|
|
189
|
-
*/
|
|
190
|
-
profilePicture?: string;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Live video username
|
|
194
|
-
*/
|
|
195
|
-
username?: string;
|
|
196
|
-
}
|
|
45
|
+
export type PeriscopeUser = Shared.Broadcast.PeriscopeUser;
|
|
197
46
|
}
|
|
198
47
|
}
|
|
199
48
|
|
|
@@ -144,6 +144,25 @@ export class Communities extends APIResource {
|
|
|
144
144
|
return this._client.get('/x/communities/topics', { query, ...options });
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
/**
|
|
148
|
+
* Returns community activity for X's latest period. Includes likes, new members,
|
|
149
|
+
* posts, replies & unique posters. Each metric has a count and a changePercent.
|
|
150
|
+
* Each request costs 1 credit.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* const communityAnalytics =
|
|
155
|
+
* await client.x.communities.retrieveAnalytics('id');
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
retrieveAnalytics(
|
|
159
|
+
id: string,
|
|
160
|
+
query: CommunityRetrieveAnalyticsParams | null | undefined = {},
|
|
161
|
+
options?: RequestOptions,
|
|
162
|
+
): APIPromise<CommunityAnalytics> {
|
|
163
|
+
return this._client.get(path`/x/communities/${id}/analytics`, { query, ...options });
|
|
164
|
+
}
|
|
165
|
+
|
|
147
166
|
/**
|
|
148
167
|
* Returns one community's public identity, rules, join question, search tags,
|
|
149
168
|
* membership counts, and the profiles of its creator, admin and previewed members.
|
|
@@ -238,6 +257,79 @@ export class Communities extends APIResource {
|
|
|
238
257
|
}
|
|
239
258
|
}
|
|
240
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Community activity & growth for X's latest period.
|
|
262
|
+
*/
|
|
263
|
+
export interface CommunityAnalytics {
|
|
264
|
+
/**
|
|
265
|
+
* The community ID from your request.
|
|
266
|
+
*/
|
|
267
|
+
id: string;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* The period's activity, each metric with its count and changePercent. likes
|
|
271
|
+
* counts likes on community posts and newMembers the accounts that joined. posts
|
|
272
|
+
* counts the community posts and replies the replies to them. uniquePosters counts
|
|
273
|
+
* the distinct accounts that posted.
|
|
274
|
+
*/
|
|
275
|
+
metrics: CommunityAnalytics.Metrics;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The end of X's latest period, in UTC.
|
|
279
|
+
*/
|
|
280
|
+
periodEndsAt: string;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export namespace CommunityAnalytics {
|
|
284
|
+
/**
|
|
285
|
+
* The period's activity, each metric with its count and changePercent. likes
|
|
286
|
+
* counts likes on community posts and newMembers the accounts that joined. posts
|
|
287
|
+
* counts the community posts and replies the replies to them. uniquePosters counts
|
|
288
|
+
* the distinct accounts that posted.
|
|
289
|
+
*/
|
|
290
|
+
export interface Metrics {
|
|
291
|
+
/**
|
|
292
|
+
* A community metric for X's latest period & its percent change.
|
|
293
|
+
*/
|
|
294
|
+
likes: CommunityAnalyticsMetric;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* A community metric for X's latest period & its percent change.
|
|
298
|
+
*/
|
|
299
|
+
newMembers: CommunityAnalyticsMetric;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* A community metric for X's latest period & its percent change.
|
|
303
|
+
*/
|
|
304
|
+
posts: CommunityAnalyticsMetric;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* A community metric for X's latest period & its percent change.
|
|
308
|
+
*/
|
|
309
|
+
replies: CommunityAnalyticsMetric;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* A community metric for X's latest period & its percent change.
|
|
313
|
+
*/
|
|
314
|
+
uniquePosters: CommunityAnalyticsMetric;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* A community metric for X's latest period & its percent change.
|
|
320
|
+
*/
|
|
321
|
+
export interface CommunityAnalyticsMetric {
|
|
322
|
+
/**
|
|
323
|
+
* Change in percent from the same figure 1 day earlier. Values stay unrounded.
|
|
324
|
+
*/
|
|
325
|
+
changePercent: number;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Total for this metric during X's latest period.
|
|
329
|
+
*/
|
|
330
|
+
count: number;
|
|
331
|
+
}
|
|
332
|
+
|
|
241
333
|
/**
|
|
242
334
|
* Durable write record. Poll statusUrl until terminal is true. Reusing its
|
|
243
335
|
* Idempotency-Key returns this record. Create another action only when safeToRetry
|
|
@@ -955,6 +1047,24 @@ export interface CommunityListTopicsParams {
|
|
|
955
1047
|
omit?: string;
|
|
956
1048
|
}
|
|
957
1049
|
|
|
1050
|
+
export interface CommunityRetrieveAnalyticsParams {
|
|
1051
|
+
/**
|
|
1052
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields, such as
|
|
1053
|
+
* author.username. A list keeps the field in each item. Case & underscores do not
|
|
1054
|
+
* matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics
|
|
1055
|
+
* always stay. An unknown name answers 400 unknown_field with the valid names,
|
|
1056
|
+
* before any read. The price stays the same. SDK row types then hold only the
|
|
1057
|
+
* named fields.
|
|
1058
|
+
*/
|
|
1059
|
+
fields?: string;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
1063
|
+
* fields. With fields, it drops from the kept fields.
|
|
1064
|
+
*/
|
|
1065
|
+
omit?: string;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
958
1068
|
export interface CommunityRetrieveInfoParams {
|
|
959
1069
|
/**
|
|
960
1070
|
* Fields to keep in each row, comma-separated. Use dots for nested fields, such as
|
|
@@ -1561,6 +1671,8 @@ Communities.Media = Media;
|
|
|
1561
1671
|
|
|
1562
1672
|
export declare namespace Communities {
|
|
1563
1673
|
export {
|
|
1674
|
+
type CommunityAnalytics as CommunityAnalytics,
|
|
1675
|
+
type CommunityAnalyticsMetric as CommunityAnalyticsMetric,
|
|
1564
1676
|
type CommunityCreateResponse as CommunityCreateResponse,
|
|
1565
1677
|
type CommunityDeleteResponse as CommunityDeleteResponse,
|
|
1566
1678
|
type CommunityListSuggestedResponse as CommunityListSuggestedResponse,
|
|
@@ -1572,6 +1684,7 @@ export declare namespace Communities {
|
|
|
1572
1684
|
type CommunityListPopularParams as CommunityListPopularParams,
|
|
1573
1685
|
type CommunityListSuggestedParams as CommunityListSuggestedParams,
|
|
1574
1686
|
type CommunityListTopicsParams as CommunityListTopicsParams,
|
|
1687
|
+
type CommunityRetrieveAnalyticsParams as CommunityRetrieveAnalyticsParams,
|
|
1575
1688
|
type CommunityRetrieveInfoParams as CommunityRetrieveInfoParams,
|
|
1576
1689
|
type CommunityRetrieveMembersParams as CommunityRetrieveMembersParams,
|
|
1577
1690
|
type CommunityRetrieveModeratorsParams as CommunityRetrieveModeratorsParams,
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
export {
|
|
6
6
|
Communities,
|
|
7
|
+
type CommunityAnalytics,
|
|
8
|
+
type CommunityAnalyticsMetric,
|
|
7
9
|
type CommunityCreateResponse,
|
|
8
10
|
type CommunityDeleteResponse,
|
|
9
11
|
type CommunityListSuggestedResponse,
|
|
@@ -15,6 +17,7 @@ export {
|
|
|
15
17
|
type CommunityListPopularParams,
|
|
16
18
|
type CommunityListSuggestedParams,
|
|
17
19
|
type CommunityListTopicsParams,
|
|
20
|
+
type CommunityRetrieveAnalyticsParams,
|
|
18
21
|
type CommunityRetrieveInfoParams,
|
|
19
22
|
type CommunityRetrieveMembersParams,
|
|
20
23
|
type CommunityRetrieveModeratorsParams,
|