x-twitter-scraper 0.1.0 → 0.2.1
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 +31 -0
- package/README.md +5 -5
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -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/account.d.mts +19 -0
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +19 -0
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +20 -1
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +20 -1
- package/resources/account.mjs.map +1 -1
- package/resources/api-keys.d.mts +20 -0
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +20 -0
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +20 -3
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +20 -3
- package/resources/api-keys.mjs.map +1 -1
- package/resources/compose.d.mts +28 -3
- package/resources/compose.d.mts.map +1 -1
- package/resources/compose.d.ts +28 -3
- package/resources/compose.d.ts.map +1 -1
- package/resources/compose.js +9 -0
- package/resources/compose.js.map +1 -1
- package/resources/compose.mjs +9 -0
- package/resources/compose.mjs.map +1 -1
- package/resources/credits.d.mts +12 -0
- package/resources/credits.d.mts.map +1 -1
- package/resources/credits.d.ts +12 -0
- package/resources/credits.d.ts.map +1 -1
- package/resources/credits.js +12 -0
- package/resources/credits.js.map +1 -1
- package/resources/credits.mjs +12 -0
- package/resources/credits.mjs.map +1 -1
- package/resources/drafts.d.mts +33 -0
- package/resources/drafts.d.mts.map +1 -1
- package/resources/drafts.d.ts +33 -0
- package/resources/drafts.d.ts.map +1 -1
- package/resources/drafts.js +24 -0
- package/resources/drafts.js.map +1 -1
- package/resources/drafts.mjs +24 -0
- package/resources/drafts.mjs.map +1 -1
- package/resources/draws.d.mts +46 -1
- package/resources/draws.d.mts.map +1 -1
- package/resources/draws.d.ts +46 -1
- package/resources/draws.d.ts.map +1 -1
- package/resources/draws.js +27 -0
- package/resources/draws.js.map +1 -1
- package/resources/draws.mjs +27 -0
- package/resources/draws.mjs.map +1 -1
- package/resources/events.d.mts +25 -1
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +25 -1
- package/resources/events.d.ts.map +1 -1
- package/resources/extractions.d.mts +74 -5
- package/resources/extractions.d.mts.map +1 -1
- package/resources/extractions.d.ts +74 -5
- package/resources/extractions.d.ts.map +1 -1
- package/resources/extractions.js +36 -0
- package/resources/extractions.js.map +1 -1
- package/resources/extractions.mjs +36 -0
- package/resources/extractions.mjs.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/integrations.d.mts +77 -0
- package/resources/integrations.d.mts.map +1 -1
- package/resources/integrations.d.ts +77 -0
- package/resources/integrations.d.ts.map +1 -1
- package/resources/integrations.js +47 -0
- package/resources/integrations.js.map +1 -1
- package/resources/integrations.mjs +47 -0
- package/resources/integrations.mjs.map +1 -1
- package/resources/monitors.d.mts +46 -0
- package/resources/monitors.d.mts.map +1 -1
- package/resources/monitors.d.ts +46 -0
- package/resources/monitors.d.ts.map +1 -1
- package/resources/monitors.js +31 -0
- package/resources/monitors.js.map +1 -1
- package/resources/monitors.mjs +31 -0
- package/resources/monitors.mjs.map +1 -1
- package/resources/radar.d.mts +4 -1
- package/resources/radar.d.mts.map +1 -1
- package/resources/radar.d.ts +4 -1
- package/resources/radar.d.ts.map +1 -1
- package/resources/shared.d.mts +12 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +12 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/styles.d.mts +63 -4
- package/resources/styles.d.mts.map +1 -1
- package/resources/styles.d.ts +63 -4
- package/resources/styles.d.ts.map +1 -1
- package/resources/styles.js +55 -8
- package/resources/styles.js.map +1 -1
- package/resources/styles.mjs +55 -8
- package/resources/styles.mjs.map +1 -1
- package/resources/support/tickets.d.mts +34 -0
- package/resources/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts +34 -0
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/support/tickets.js +34 -0
- package/resources/support/tickets.js.map +1 -1
- package/resources/support/tickets.mjs +34 -0
- package/resources/support/tickets.mjs.map +1 -1
- package/resources/trends.d.mts +4 -1
- package/resources/trends.d.mts.map +1 -1
- package/resources/trends.d.ts +4 -1
- package/resources/trends.d.ts.map +1 -1
- package/resources/trends.js +1 -1
- package/resources/trends.mjs +1 -1
- package/resources/webhooks.d.mts +54 -0
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +54 -0
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +36 -0
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +36 -0
- package/resources/webhooks.mjs.map +1 -1
- package/resources/x/accounts.d.mts +59 -3
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +59 -3
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/accounts.js +55 -5
- package/resources/x/accounts.js.map +1 -1
- package/resources/x/accounts.mjs +55 -5
- package/resources/x/accounts.mjs.map +1 -1
- package/resources/x/bookmarks.d.mts +11 -1
- package/resources/x/bookmarks.d.mts.map +1 -1
- package/resources/x/bookmarks.d.ts +11 -1
- package/resources/x/bookmarks.d.ts.map +1 -1
- package/resources/x/bookmarks.js +10 -0
- package/resources/x/bookmarks.js.map +1 -1
- package/resources/x/bookmarks.mjs +10 -0
- package/resources/x/bookmarks.mjs.map +1 -1
- package/resources/x/communities/communities.d.mts +118 -11
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +118 -11
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +45 -16
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +45 -16
- 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/communities/join.d.mts +18 -2
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +18 -2
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +16 -0
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +16 -0
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/communities/tweets.d.mts +28 -5
- package/resources/x/communities/tweets.d.mts.map +1 -1
- package/resources/x/communities/tweets.d.ts +28 -5
- package/resources/x/communities/tweets.d.ts.map +1 -1
- package/resources/x/communities/tweets.js +20 -6
- package/resources/x/communities/tweets.js.map +1 -1
- package/resources/x/communities/tweets.mjs +20 -6
- package/resources/x/communities/tweets.mjs.map +1 -1
- package/resources/x/dm.d.mts +19 -2
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +19 -2
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +17 -0
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +17 -0
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/followers.d.mts +8 -0
- package/resources/x/followers.d.mts.map +1 -1
- package/resources/x/followers.d.ts +8 -0
- package/resources/x/followers.d.ts.map +1 -1
- package/resources/x/followers.js +8 -0
- package/resources/x/followers.js.map +1 -1
- package/resources/x/followers.mjs +8 -0
- package/resources/x/followers.mjs.map +1 -1
- package/resources/x/index.d.mts +2 -2
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +2 -2
- package/resources/x/index.d.ts.map +1 -1
- package/resources/x/index.js.map +1 -1
- package/resources/x/index.mjs.map +1 -1
- package/resources/x/lists.d.mts +27 -6
- package/resources/x/lists.d.mts.map +1 -1
- package/resources/x/lists.d.ts +27 -6
- package/resources/x/lists.d.ts.map +1 -1
- package/resources/x/lists.js +23 -16
- package/resources/x/lists.js.map +1 -1
- package/resources/x/lists.mjs +23 -16
- package/resources/x/lists.mjs.map +1 -1
- package/resources/x/media.d.mts +17 -1
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +17 -1
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +16 -0
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs +16 -0
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +30 -3
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +30 -3
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +27 -0
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs +27 -0
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts +18 -4
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts +18 -4
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.js +18 -4
- package/resources/x/tweets/like.js.map +1 -1
- package/resources/x/tweets/like.mjs +18 -4
- package/resources/x/tweets/like.mjs.map +1 -1
- package/resources/x/tweets/retweet.d.mts +18 -4
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts +18 -4
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.js +18 -4
- package/resources/x/tweets/retweet.js.map +1 -1
- package/resources/x/tweets/retweet.mjs +18 -4
- package/resources/x/tweets/retweet.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +146 -15
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +146 -15
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +74 -10
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +74 -10
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/users/follow.d.mts +19 -4
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts +19 -4
- package/resources/x/users/follow.d.ts.map +1 -1
- package/resources/x/users/follow.js +19 -4
- package/resources/x/users/follow.js.map +1 -1
- package/resources/x/users/follow.mjs +19 -4
- package/resources/x/users/follow.mjs.map +1 -1
- package/resources/x/users/users.d.mts +94 -21
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +94 -21
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +78 -33
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +78 -33
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/x.d.mts +42 -6
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +42 -6
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js +21 -5
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs +21 -5
- package/resources/x/x.mjs.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/account.ts +20 -1
- package/src/resources/api-keys.ts +23 -3
- package/src/resources/compose.ts +32 -1
- package/src/resources/credits.ts +12 -0
- package/src/resources/drafts.ts +33 -0
- package/src/resources/draws.ts +46 -1
- package/src/resources/events.ts +25 -1
- package/src/resources/extractions.ts +74 -5
- package/src/resources/index.ts +1 -0
- package/src/resources/integrations.ts +77 -0
- package/src/resources/monitors.ts +46 -0
- package/src/resources/radar.ts +4 -1
- package/src/resources/shared.ts +12 -0
- package/src/resources/styles.ts +67 -8
- package/src/resources/support/tickets.ts +34 -0
- package/src/resources/trends.ts +4 -1
- package/src/resources/webhooks.ts +54 -0
- package/src/resources/x/accounts.ts +72 -7
- package/src/resources/x/bookmarks.ts +11 -1
- package/src/resources/x/communities/communities.ts +142 -26
- package/src/resources/x/communities/index.ts +1 -1
- package/src/resources/x/communities/join.ts +18 -2
- package/src/resources/x/communities/tweets.ts +41 -11
- package/src/resources/x/dm.ts +19 -2
- package/src/resources/x/followers.ts +8 -0
- package/src/resources/x/index.ts +2 -0
- package/src/resources/x/lists.ts +30 -22
- package/src/resources/x/media.ts +17 -1
- package/src/resources/x/profile.ts +30 -3
- package/src/resources/x/tweets/like.ts +20 -6
- package/src/resources/x/tweets/retweet.ts +20 -14
- package/src/resources/x/tweets/tweets.ts +157 -27
- package/src/resources/x/users/follow.ts +21 -10
- package/src/resources/x/users/users.ts +103 -52
- package/src/resources/x/x.ts +50 -8
- 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
|
@@ -7,12 +7,26 @@ import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
|
7
7
|
export declare class Like extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Like tweet
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const like = await client.x.tweets.like.create('id', {
|
|
14
|
+
* account: '@elonmusk',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
10
17
|
*/
|
|
11
|
-
create(
|
|
18
|
+
create(id: string, body: LikeCreateParams, options?: RequestOptions): APIPromise<LikeCreateResponse>;
|
|
12
19
|
/**
|
|
13
20
|
* Unlike tweet
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const like = await client.x.tweets.like.delete('id', {
|
|
25
|
+
* account: '@elonmusk',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
14
28
|
*/
|
|
15
|
-
delete(
|
|
29
|
+
delete(id: string, body: LikeDeleteParams, options?: RequestOptions): APIPromise<LikeDeleteResponse>;
|
|
16
30
|
}
|
|
17
31
|
export interface LikeCreateResponse {
|
|
18
32
|
success: true;
|
|
@@ -22,13 +36,13 @@ export interface LikeDeleteResponse {
|
|
|
22
36
|
}
|
|
23
37
|
export interface LikeCreateParams {
|
|
24
38
|
/**
|
|
25
|
-
* X account (@username or account ID)
|
|
39
|
+
* X account identifier (@username or account ID)
|
|
26
40
|
*/
|
|
27
41
|
account: string;
|
|
28
42
|
}
|
|
29
43
|
export interface LikeDeleteParams {
|
|
30
44
|
/**
|
|
31
|
-
* X account (@username or account ID)
|
|
45
|
+
* X account identifier (@username or account ID)
|
|
32
46
|
*/
|
|
33
47
|
account: string;
|
|
34
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"like.d.mts","sourceRoot":"","sources":["../../../src/resources/x/tweets/like.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"like.d.mts","sourceRoot":"","sources":["../../../src/resources/x/tweets/like.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAIpG;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;CAGrG;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -7,12 +7,26 @@ import { RequestOptions } from "../../../internal/request-options.js";
|
|
|
7
7
|
export declare class Like extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Like tweet
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const like = await client.x.tweets.like.create('id', {
|
|
14
|
+
* account: '@elonmusk',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
10
17
|
*/
|
|
11
|
-
create(
|
|
18
|
+
create(id: string, body: LikeCreateParams, options?: RequestOptions): APIPromise<LikeCreateResponse>;
|
|
12
19
|
/**
|
|
13
20
|
* Unlike tweet
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const like = await client.x.tweets.like.delete('id', {
|
|
25
|
+
* account: '@elonmusk',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
14
28
|
*/
|
|
15
|
-
delete(
|
|
29
|
+
delete(id: string, body: LikeDeleteParams, options?: RequestOptions): APIPromise<LikeDeleteResponse>;
|
|
16
30
|
}
|
|
17
31
|
export interface LikeCreateResponse {
|
|
18
32
|
success: true;
|
|
@@ -22,13 +36,13 @@ export interface LikeDeleteResponse {
|
|
|
22
36
|
}
|
|
23
37
|
export interface LikeCreateParams {
|
|
24
38
|
/**
|
|
25
|
-
* X account (@username or account ID)
|
|
39
|
+
* X account identifier (@username or account ID)
|
|
26
40
|
*/
|
|
27
41
|
account: string;
|
|
28
42
|
}
|
|
29
43
|
export interface LikeDeleteParams {
|
|
30
44
|
/**
|
|
31
|
-
* X account (@username or account ID)
|
|
45
|
+
* X account identifier (@username or account ID)
|
|
32
46
|
*/
|
|
33
47
|
account: string;
|
|
34
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"like.d.ts","sourceRoot":"","sources":["../../../src/resources/x/tweets/like.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"like.d.ts","sourceRoot":"","sources":["../../../src/resources/x/tweets/like.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAIpG;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;CAGrG;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -10,15 +10,29 @@ const path_1 = require("../../../internal/utils/path.js");
|
|
|
10
10
|
class Like extends resource_1.APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Like tweet
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const like = await client.x.tweets.like.create('id', {
|
|
17
|
+
* account: '@elonmusk',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
13
20
|
*/
|
|
14
|
-
create(
|
|
15
|
-
return this._client.post((0, path_1.path) `/x/tweets/${
|
|
21
|
+
create(id, body, options) {
|
|
22
|
+
return this._client.post((0, path_1.path) `/x/tweets/${id}/like`, { body, ...options });
|
|
16
23
|
}
|
|
17
24
|
/**
|
|
18
25
|
* Unlike tweet
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const like = await client.x.tweets.like.delete('id', {
|
|
30
|
+
* account: '@elonmusk',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
19
33
|
*/
|
|
20
|
-
delete(
|
|
21
|
-
return this._client.delete((0, path_1.path) `/x/tweets/${
|
|
34
|
+
delete(id, body, options) {
|
|
35
|
+
return this._client.delete((0, path_1.path) `/x/tweets/${id}/like`, { body, ...options });
|
|
22
36
|
}
|
|
23
37
|
}
|
|
24
38
|
exports.Like = Like;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"like.js","sourceRoot":"","sources":["../../../src/resources/x/tweets/like.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,IAAK,SAAQ,sBAAW;IACnC
|
|
1
|
+
{"version":3,"file":"like.js","sourceRoot":"","sources":["../../../src/resources/x/tweets/like.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAsB,EAAE,OAAwB;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAsB,EAAE,OAAwB;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AA5BD,oBA4BC"}
|
|
@@ -7,15 +7,29 @@ import { path } from "../../../internal/utils/path.mjs";
|
|
|
7
7
|
export class Like extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Like tweet
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const like = await client.x.tweets.like.create('id', {
|
|
14
|
+
* account: '@elonmusk',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
10
17
|
*/
|
|
11
|
-
create(
|
|
12
|
-
return this._client.post(path `/x/tweets/${
|
|
18
|
+
create(id, body, options) {
|
|
19
|
+
return this._client.post(path `/x/tweets/${id}/like`, { body, ...options });
|
|
13
20
|
}
|
|
14
21
|
/**
|
|
15
22
|
* Unlike tweet
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const like = await client.x.tweets.like.delete('id', {
|
|
27
|
+
* account: '@elonmusk',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
16
30
|
*/
|
|
17
|
-
delete(
|
|
18
|
-
return this._client.delete(path `/x/tweets/${
|
|
31
|
+
delete(id, body, options) {
|
|
32
|
+
return this._client.delete(path `/x/tweets/${id}/like`, { body, ...options });
|
|
19
33
|
}
|
|
20
34
|
}
|
|
21
35
|
//# sourceMappingURL=like.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"like.mjs","sourceRoot":"","sources":["../../../src/resources/x/tweets/like.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"like.mjs","sourceRoot":"","sources":["../../../src/resources/x/tweets/like.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAsB,EAAE,OAAwB;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAsB,EAAE,OAAwB;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF"}
|
|
@@ -7,12 +7,26 @@ import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
|
7
7
|
export declare class Retweet extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Retweet
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const retweet = await client.x.tweets.retweet.create('id', {
|
|
14
|
+
* account: '@elonmusk',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
10
17
|
*/
|
|
11
|
-
create(
|
|
18
|
+
create(id: string, body: RetweetCreateParams, options?: RequestOptions): APIPromise<RetweetCreateResponse>;
|
|
12
19
|
/**
|
|
13
20
|
* Unretweet
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const retweet = await client.x.tweets.retweet.delete('id', {
|
|
25
|
+
* account: '@elonmusk',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
14
28
|
*/
|
|
15
|
-
delete(
|
|
29
|
+
delete(id: string, body: RetweetDeleteParams, options?: RequestOptions): APIPromise<RetweetDeleteResponse>;
|
|
16
30
|
}
|
|
17
31
|
export interface RetweetCreateResponse {
|
|
18
32
|
success: true;
|
|
@@ -22,13 +36,13 @@ export interface RetweetDeleteResponse {
|
|
|
22
36
|
}
|
|
23
37
|
export interface RetweetCreateParams {
|
|
24
38
|
/**
|
|
25
|
-
* X account (@username or account ID)
|
|
39
|
+
* X account identifier (@username or account ID)
|
|
26
40
|
*/
|
|
27
41
|
account: string;
|
|
28
42
|
}
|
|
29
43
|
export interface RetweetDeleteParams {
|
|
30
44
|
/**
|
|
31
|
-
* X account (@username or account ID)
|
|
45
|
+
* X account identifier (@username or account ID)
|
|
32
46
|
*/
|
|
33
47
|
account: string;
|
|
34
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retweet.d.mts","sourceRoot":"","sources":["../../../src/resources/x/tweets/retweet.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"retweet.d.mts","sourceRoot":"","sources":["../../../src/resources/x/tweets/retweet.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI1G;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAG3G;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -7,12 +7,26 @@ import { RequestOptions } from "../../../internal/request-options.js";
|
|
|
7
7
|
export declare class Retweet extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Retweet
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const retweet = await client.x.tweets.retweet.create('id', {
|
|
14
|
+
* account: '@elonmusk',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
10
17
|
*/
|
|
11
|
-
create(
|
|
18
|
+
create(id: string, body: RetweetCreateParams, options?: RequestOptions): APIPromise<RetweetCreateResponse>;
|
|
12
19
|
/**
|
|
13
20
|
* Unretweet
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const retweet = await client.x.tweets.retweet.delete('id', {
|
|
25
|
+
* account: '@elonmusk',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
14
28
|
*/
|
|
15
|
-
delete(
|
|
29
|
+
delete(id: string, body: RetweetDeleteParams, options?: RequestOptions): APIPromise<RetweetDeleteResponse>;
|
|
16
30
|
}
|
|
17
31
|
export interface RetweetCreateResponse {
|
|
18
32
|
success: true;
|
|
@@ -22,13 +36,13 @@ export interface RetweetDeleteResponse {
|
|
|
22
36
|
}
|
|
23
37
|
export interface RetweetCreateParams {
|
|
24
38
|
/**
|
|
25
|
-
* X account (@username or account ID)
|
|
39
|
+
* X account identifier (@username or account ID)
|
|
26
40
|
*/
|
|
27
41
|
account: string;
|
|
28
42
|
}
|
|
29
43
|
export interface RetweetDeleteParams {
|
|
30
44
|
/**
|
|
31
|
-
* X account (@username or account ID)
|
|
45
|
+
* X account identifier (@username or account ID)
|
|
32
46
|
*/
|
|
33
47
|
account: string;
|
|
34
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retweet.d.ts","sourceRoot":"","sources":["../../../src/resources/x/tweets/retweet.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"retweet.d.ts","sourceRoot":"","sources":["../../../src/resources/x/tweets/retweet.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI1G;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAG3G;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -10,15 +10,29 @@ const path_1 = require("../../../internal/utils/path.js");
|
|
|
10
10
|
class Retweet extends resource_1.APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Retweet
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const retweet = await client.x.tweets.retweet.create('id', {
|
|
17
|
+
* account: '@elonmusk',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
13
20
|
*/
|
|
14
|
-
create(
|
|
15
|
-
return this._client.post((0, path_1.path) `/x/tweets/${
|
|
21
|
+
create(id, body, options) {
|
|
22
|
+
return this._client.post((0, path_1.path) `/x/tweets/${id}/retweet`, { body, ...options });
|
|
16
23
|
}
|
|
17
24
|
/**
|
|
18
25
|
* Unretweet
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const retweet = await client.x.tweets.retweet.delete('id', {
|
|
30
|
+
* account: '@elonmusk',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
19
33
|
*/
|
|
20
|
-
delete(
|
|
21
|
-
return this._client.delete((0, path_1.path) `/x/tweets/${
|
|
34
|
+
delete(id, body, options) {
|
|
35
|
+
return this._client.delete((0, path_1.path) `/x/tweets/${id}/retweet`, { body, ...options });
|
|
22
36
|
}
|
|
23
37
|
}
|
|
24
38
|
exports.Retweet = Retweet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retweet.js","sourceRoot":"","sources":["../../../src/resources/x/tweets/retweet.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC
|
|
1
|
+
{"version":3,"file":"retweet.js","sourceRoot":"","sources":["../../../src/resources/x/tweets/retweet.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;CACF;AA5BD,0BA4BC"}
|
|
@@ -7,15 +7,29 @@ import { path } from "../../../internal/utils/path.mjs";
|
|
|
7
7
|
export class Retweet extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Retweet
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const retweet = await client.x.tweets.retweet.create('id', {
|
|
14
|
+
* account: '@elonmusk',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
10
17
|
*/
|
|
11
|
-
create(
|
|
12
|
-
return this._client.post(path `/x/tweets/${
|
|
18
|
+
create(id, body, options) {
|
|
19
|
+
return this._client.post(path `/x/tweets/${id}/retweet`, { body, ...options });
|
|
13
20
|
}
|
|
14
21
|
/**
|
|
15
22
|
* Unretweet
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const retweet = await client.x.tweets.retweet.delete('id', {
|
|
27
|
+
* account: '@elonmusk',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
16
30
|
*/
|
|
17
|
-
delete(
|
|
18
|
-
return this._client.delete(path `/x/tweets/${
|
|
31
|
+
delete(id, body, options) {
|
|
32
|
+
return this._client.delete(path `/x/tweets/${id}/retweet`, { body, ...options });
|
|
19
33
|
}
|
|
20
34
|
}
|
|
21
35
|
//# sourceMappingURL=retweet.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retweet.mjs","sourceRoot":"","sources":["../../../src/resources/x/tweets/retweet.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"retweet.mjs","sourceRoot":"","sources":["../../../src/resources/x/tweets/retweet.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;CACF"}
|
|
@@ -11,51 +11,127 @@ export declare class Tweets extends APIResource {
|
|
|
11
11
|
retweet: RetweetAPI.Retweet;
|
|
12
12
|
/**
|
|
13
13
|
* Create tweet
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const tweet = await client.x.tweets.create({
|
|
18
|
+
* account: '@elonmusk',
|
|
19
|
+
* text: 'Just launched our new feature!',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
14
22
|
*/
|
|
15
23
|
create(body: TweetCreateParams, options?: RequestOptions): APIPromise<TweetCreateResponse>;
|
|
16
24
|
/**
|
|
17
25
|
* Look up tweet
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const tweet = await client.x.tweets.retrieve('id');
|
|
30
|
+
* ```
|
|
18
31
|
*/
|
|
19
|
-
retrieve(
|
|
32
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<TweetRetrieveResponse>;
|
|
20
33
|
/**
|
|
21
34
|
* Get multiple tweets by IDs
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const paginatedTweets = await client.x.tweets.list({
|
|
39
|
+
* ids: 'ids',
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
22
42
|
*/
|
|
23
|
-
list(query: TweetListParams, options?: RequestOptions): APIPromise<
|
|
43
|
+
list(query: TweetListParams, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
24
44
|
/**
|
|
25
45
|
* Delete tweet
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const tweet = await client.x.tweets.delete('id', {
|
|
50
|
+
* account: '@elonmusk',
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
26
53
|
*/
|
|
27
|
-
delete(
|
|
54
|
+
delete(id: string, body: TweetDeleteParams, options?: RequestOptions): APIPromise<TweetDeleteResponse>;
|
|
28
55
|
/**
|
|
29
56
|
* Get users who liked a tweet
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const paginatedUsers = await client.x.tweets.getFavoriters(
|
|
61
|
+
* 'id',
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
30
64
|
*/
|
|
31
65
|
getFavoriters(id: string, query?: TweetGetFavoritersParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
32
66
|
/**
|
|
33
67
|
* Get quote tweets of a tweet
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const paginatedTweets = await client.x.tweets.getQuotes(
|
|
72
|
+
* 'id',
|
|
73
|
+
* );
|
|
74
|
+
* ```
|
|
34
75
|
*/
|
|
35
76
|
getQuotes(id: string, query?: TweetGetQuotesParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
36
77
|
/**
|
|
37
78
|
* Get replies to a tweet
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const paginatedTweets = await client.x.tweets.getReplies(
|
|
83
|
+
* 'id',
|
|
84
|
+
* );
|
|
85
|
+
* ```
|
|
38
86
|
*/
|
|
39
87
|
getReplies(id: string, query?: TweetGetRepliesParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
40
88
|
/**
|
|
41
89
|
* Get users who retweeted a tweet
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* const paginatedUsers = await client.x.tweets.getRetweeters(
|
|
94
|
+
* 'id',
|
|
95
|
+
* );
|
|
96
|
+
* ```
|
|
42
97
|
*/
|
|
43
98
|
getRetweeters(id: string, query?: TweetGetRetweetersParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
44
99
|
/**
|
|
45
100
|
* Get thread context for a tweet
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* const paginatedTweets = await client.x.tweets.getThread(
|
|
105
|
+
* 'id',
|
|
106
|
+
* );
|
|
107
|
+
* ```
|
|
46
108
|
*/
|
|
47
109
|
getThread(id: string, query?: TweetGetThreadParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
48
110
|
/**
|
|
49
111
|
* Search tweets
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```ts
|
|
115
|
+
* const paginatedTweets = await client.x.tweets.search({
|
|
116
|
+
* q: 'q',
|
|
117
|
+
* });
|
|
118
|
+
* ```
|
|
50
119
|
*/
|
|
51
120
|
search(query: TweetSearchParams, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
52
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Tweet returned from search results with inline author info.
|
|
124
|
+
*/
|
|
53
125
|
export interface SearchTweet {
|
|
54
126
|
id: string;
|
|
55
127
|
text: string;
|
|
56
128
|
author?: SearchTweet.Author;
|
|
57
129
|
bookmarkCount?: number;
|
|
58
130
|
createdAt?: string;
|
|
131
|
+
/**
|
|
132
|
+
* True for Note Tweets (long-form content, up to 25,000 characters)
|
|
133
|
+
*/
|
|
134
|
+
isNoteTweet?: boolean;
|
|
59
135
|
likeCount?: number;
|
|
60
136
|
quoteCount?: number;
|
|
61
137
|
replyCount?: number;
|
|
@@ -70,6 +146,9 @@ export declare namespace SearchTweet {
|
|
|
70
146
|
verified?: boolean;
|
|
71
147
|
}
|
|
72
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Author of a tweet with follower count and verification status.
|
|
151
|
+
*/
|
|
73
152
|
export interface TweetAuthor {
|
|
74
153
|
id: string;
|
|
75
154
|
followers: number;
|
|
@@ -77,6 +156,9 @@ export interface TweetAuthor {
|
|
|
77
156
|
verified: boolean;
|
|
78
157
|
profilePicture?: string;
|
|
79
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Full tweet with text, engagement metrics, media, and metadata.
|
|
161
|
+
*/
|
|
80
162
|
export interface TweetDetail {
|
|
81
163
|
id: string;
|
|
82
164
|
bookmarkCount: number;
|
|
@@ -86,14 +168,63 @@ export interface TweetDetail {
|
|
|
86
168
|
retweetCount: number;
|
|
87
169
|
text: string;
|
|
88
170
|
viewCount: number;
|
|
171
|
+
/**
|
|
172
|
+
* ID of the root tweet in the conversation thread
|
|
173
|
+
*/
|
|
174
|
+
conversationId?: string;
|
|
89
175
|
createdAt?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Parsed entities from the tweet text (URLs, mentions, hashtags, media)
|
|
178
|
+
*/
|
|
179
|
+
entities?: {
|
|
180
|
+
[key: string]: unknown;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Whether this is a Note Tweet (long-form post, up to 25,000 characters)
|
|
184
|
+
*/
|
|
185
|
+
isNoteTweet?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Whether this tweet quotes another tweet
|
|
188
|
+
*/
|
|
189
|
+
isQuoteStatus?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Whether this tweet is a reply to another tweet
|
|
192
|
+
*/
|
|
193
|
+
isReply?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Attached media items, omitted when the tweet has no media
|
|
196
|
+
*/
|
|
197
|
+
media?: Array<TweetDetail.Media>;
|
|
198
|
+
/**
|
|
199
|
+
* The quoted tweet object, present when isQuoteStatus is true
|
|
200
|
+
*/
|
|
201
|
+
quoted_tweet?: {
|
|
202
|
+
[key: string]: unknown;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* Client application used to post this tweet
|
|
206
|
+
*/
|
|
207
|
+
source?: string;
|
|
208
|
+
}
|
|
209
|
+
export declare namespace TweetDetail {
|
|
210
|
+
interface Media {
|
|
211
|
+
mediaUrl?: string;
|
|
212
|
+
type?: 'photo' | 'video' | 'animated_gif';
|
|
213
|
+
url?: string;
|
|
214
|
+
}
|
|
90
215
|
}
|
|
91
216
|
export interface TweetCreateResponse {
|
|
92
217
|
success: true;
|
|
93
218
|
tweetId: string;
|
|
94
219
|
}
|
|
95
220
|
export interface TweetRetrieveResponse {
|
|
221
|
+
/**
|
|
222
|
+
* Full tweet with text, engagement metrics, media, and metadata.
|
|
223
|
+
*/
|
|
96
224
|
tweet: TweetDetail;
|
|
225
|
+
/**
|
|
226
|
+
* Author of a tweet with follower count and verification status.
|
|
227
|
+
*/
|
|
97
228
|
author?: TweetAuthor;
|
|
98
229
|
}
|
|
99
230
|
export interface TweetDeleteResponse {
|
|
@@ -119,57 +250,57 @@ export interface TweetListParams {
|
|
|
119
250
|
}
|
|
120
251
|
export interface TweetDeleteParams {
|
|
121
252
|
/**
|
|
122
|
-
* X account (@username or account ID)
|
|
253
|
+
* X account identifier (@username or account ID)
|
|
123
254
|
*/
|
|
124
255
|
account: string;
|
|
125
256
|
}
|
|
126
257
|
export interface TweetGetFavoritersParams {
|
|
127
258
|
/**
|
|
128
|
-
* Pagination cursor
|
|
259
|
+
* Pagination cursor for favoriters
|
|
129
260
|
*/
|
|
130
261
|
cursor?: string;
|
|
131
262
|
}
|
|
132
263
|
export interface TweetGetQuotesParams {
|
|
133
264
|
/**
|
|
134
|
-
* Pagination cursor
|
|
265
|
+
* Pagination cursor for quote tweets
|
|
135
266
|
*/
|
|
136
267
|
cursor?: string;
|
|
137
268
|
/**
|
|
138
|
-
* Include
|
|
269
|
+
* Include reply quotes (default false)
|
|
139
270
|
*/
|
|
140
271
|
includeReplies?: boolean;
|
|
141
272
|
/**
|
|
142
|
-
* Unix timestamp -
|
|
273
|
+
* Unix timestamp - return quotes posted after this time
|
|
143
274
|
*/
|
|
144
275
|
sinceTime?: string;
|
|
145
276
|
/**
|
|
146
|
-
* Unix timestamp -
|
|
277
|
+
* Unix timestamp - return quotes posted before this time
|
|
147
278
|
*/
|
|
148
279
|
untilTime?: string;
|
|
149
280
|
}
|
|
150
281
|
export interface TweetGetRepliesParams {
|
|
151
282
|
/**
|
|
152
|
-
* Pagination cursor
|
|
283
|
+
* Pagination cursor for tweet replies
|
|
153
284
|
*/
|
|
154
285
|
cursor?: string;
|
|
155
286
|
/**
|
|
156
|
-
* Unix timestamp -
|
|
287
|
+
* Unix timestamp - return replies posted after this time
|
|
157
288
|
*/
|
|
158
289
|
sinceTime?: string;
|
|
159
290
|
/**
|
|
160
|
-
* Unix timestamp -
|
|
291
|
+
* Unix timestamp - return replies posted before this time
|
|
161
292
|
*/
|
|
162
293
|
untilTime?: string;
|
|
163
294
|
}
|
|
164
295
|
export interface TweetGetRetweetersParams {
|
|
165
296
|
/**
|
|
166
|
-
* Pagination cursor
|
|
297
|
+
* Pagination cursor for retweeters
|
|
167
298
|
*/
|
|
168
299
|
cursor?: string;
|
|
169
300
|
}
|
|
170
301
|
export interface TweetGetThreadParams {
|
|
171
302
|
/**
|
|
172
|
-
* Pagination cursor
|
|
303
|
+
* Pagination cursor for thread tweets
|
|
173
304
|
*/
|
|
174
305
|
cursor?: string;
|
|
175
306
|
}
|
|
@@ -183,7 +314,7 @@ export interface TweetSearchParams {
|
|
|
183
314
|
*/
|
|
184
315
|
cursor?: string;
|
|
185
316
|
/**
|
|
186
|
-
*
|
|
317
|
+
* Max tweets to return (server paginates internally). Omit for single page (~20).
|
|
187
318
|
*/
|
|
188
319
|
limit?: number;
|
|
189
320
|
/**
|