x-twitter-scraper 0.1.0 → 0.2.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 +22 -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,27 @@ import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
|
7
7
|
export declare class Follow extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Follow user
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const follow = await client.x.users.follow.create('id', {
|
|
14
|
+
* account: '@elonmusk',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
10
17
|
*/
|
|
11
|
-
create(
|
|
18
|
+
create(id: string, body: FollowCreateParams, options?: RequestOptions): APIPromise<FollowCreateResponse>;
|
|
12
19
|
/**
|
|
13
20
|
* Unfollow user
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response = await client.x.users.follow.deleteAll(
|
|
25
|
+
* 'id',
|
|
26
|
+
* { account: '@elonmusk' },
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
14
29
|
*/
|
|
15
|
-
deleteAll(
|
|
30
|
+
deleteAll(id: string, body: FollowDeleteAllParams, options?: RequestOptions): APIPromise<FollowDeleteAllResponse>;
|
|
16
31
|
}
|
|
17
32
|
export interface FollowCreateResponse {
|
|
18
33
|
success: true;
|
|
@@ -22,13 +37,13 @@ export interface FollowDeleteAllResponse {
|
|
|
22
37
|
}
|
|
23
38
|
export interface FollowCreateParams {
|
|
24
39
|
/**
|
|
25
|
-
* X account (@username or account ID)
|
|
40
|
+
* X account identifier (@username or account ID)
|
|
26
41
|
*/
|
|
27
42
|
account: string;
|
|
28
43
|
}
|
|
29
44
|
export interface FollowDeleteAllParams {
|
|
30
45
|
/**
|
|
31
|
-
* X account (@username or account ID)
|
|
46
|
+
* X account identifier (@username or account ID)
|
|
32
47
|
*/
|
|
33
48
|
account: string;
|
|
34
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"follow.d.mts","sourceRoot":"","sources":["../../../src/resources/x/users/follow.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"follow.d.mts","sourceRoot":"","sources":["../../../src/resources/x/users/follow.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIxG;;;;;;;;;;OAUG;IACH,SAAS,CACP,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAGvC;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -7,12 +7,27 @@ import { RequestOptions } from "../../../internal/request-options.js";
|
|
|
7
7
|
export declare class Follow extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Follow user
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const follow = await client.x.users.follow.create('id', {
|
|
14
|
+
* account: '@elonmusk',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
10
17
|
*/
|
|
11
|
-
create(
|
|
18
|
+
create(id: string, body: FollowCreateParams, options?: RequestOptions): APIPromise<FollowCreateResponse>;
|
|
12
19
|
/**
|
|
13
20
|
* Unfollow user
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response = await client.x.users.follow.deleteAll(
|
|
25
|
+
* 'id',
|
|
26
|
+
* { account: '@elonmusk' },
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
14
29
|
*/
|
|
15
|
-
deleteAll(
|
|
30
|
+
deleteAll(id: string, body: FollowDeleteAllParams, options?: RequestOptions): APIPromise<FollowDeleteAllResponse>;
|
|
16
31
|
}
|
|
17
32
|
export interface FollowCreateResponse {
|
|
18
33
|
success: true;
|
|
@@ -22,13 +37,13 @@ export interface FollowDeleteAllResponse {
|
|
|
22
37
|
}
|
|
23
38
|
export interface FollowCreateParams {
|
|
24
39
|
/**
|
|
25
|
-
* X account (@username or account ID)
|
|
40
|
+
* X account identifier (@username or account ID)
|
|
26
41
|
*/
|
|
27
42
|
account: string;
|
|
28
43
|
}
|
|
29
44
|
export interface FollowDeleteAllParams {
|
|
30
45
|
/**
|
|
31
|
-
* X account (@username or account ID)
|
|
46
|
+
* X account identifier (@username or account ID)
|
|
32
47
|
*/
|
|
33
48
|
account: string;
|
|
34
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"follow.d.ts","sourceRoot":"","sources":["../../../src/resources/x/users/follow.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"follow.d.ts","sourceRoot":"","sources":["../../../src/resources/x/users/follow.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIxG;;;;;;;;;;OAUG;IACH,SAAS,CACP,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAGvC;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -10,15 +10,30 @@ const path_1 = require("../../../internal/utils/path.js");
|
|
|
10
10
|
class Follow extends resource_1.APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Follow user
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const follow = await client.x.users.follow.create('id', {
|
|
17
|
+
* account: '@elonmusk',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
13
20
|
*/
|
|
14
|
-
create(
|
|
15
|
-
return this._client.post((0, path_1.path) `/x/users/${
|
|
21
|
+
create(id, body, options) {
|
|
22
|
+
return this._client.post((0, path_1.path) `/x/users/${id}/follow`, { body, ...options });
|
|
16
23
|
}
|
|
17
24
|
/**
|
|
18
25
|
* Unfollow user
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response = await client.x.users.follow.deleteAll(
|
|
30
|
+
* 'id',
|
|
31
|
+
* { account: '@elonmusk' },
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
19
34
|
*/
|
|
20
|
-
deleteAll(
|
|
21
|
-
return this._client.delete((0, path_1.path) `/x/users/${
|
|
35
|
+
deleteAll(id, body, options) {
|
|
36
|
+
return this._client.delete((0, path_1.path) `/x/users/${id}/follow`, { body, ...options });
|
|
22
37
|
}
|
|
23
38
|
}
|
|
24
39
|
exports.Follow = Follow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"follow.js","sourceRoot":"","sources":["../../../src/resources/x/users/follow.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"follow.js","sourceRoot":"","sources":["../../../src/resources/x/users/follow.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAwB;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,YAAY,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;;;OAUG;IACH,SAAS,CACP,EAAU,EACV,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,YAAY,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAjCD,wBAiCC"}
|
|
@@ -7,15 +7,30 @@ import { path } from "../../../internal/utils/path.mjs";
|
|
|
7
7
|
export class Follow extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Follow user
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const follow = await client.x.users.follow.create('id', {
|
|
14
|
+
* account: '@elonmusk',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
10
17
|
*/
|
|
11
|
-
create(
|
|
12
|
-
return this._client.post(path `/x/users/${
|
|
18
|
+
create(id, body, options) {
|
|
19
|
+
return this._client.post(path `/x/users/${id}/follow`, { body, ...options });
|
|
13
20
|
}
|
|
14
21
|
/**
|
|
15
22
|
* Unfollow user
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const response = await client.x.users.follow.deleteAll(
|
|
27
|
+
* 'id',
|
|
28
|
+
* { account: '@elonmusk' },
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
16
31
|
*/
|
|
17
|
-
deleteAll(
|
|
18
|
-
return this._client.delete(path `/x/users/${
|
|
32
|
+
deleteAll(id, body, options) {
|
|
33
|
+
return this._client.delete(path `/x/users/${id}/follow`, { body, ...options });
|
|
19
34
|
}
|
|
20
35
|
}
|
|
21
36
|
//# sourceMappingURL=follow.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"follow.mjs","sourceRoot":"","sources":["../../../src/resources/x/users/follow.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"follow.mjs","sourceRoot":"","sources":["../../../src/resources/x/users/follow.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAwB;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,YAAY,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;;;OAUG;IACH,SAAS,CACP,EAAU,EACV,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,YAAY,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;CACF"}
|
|
@@ -11,49 +11,122 @@ export declare class Users extends APIResource {
|
|
|
11
11
|
follow: FollowAPI.Follow;
|
|
12
12
|
/**
|
|
13
13
|
* Look up X user
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const userProfile = await client.x.users.retrieve('id');
|
|
18
|
+
* ```
|
|
14
19
|
*/
|
|
15
|
-
retrieve(
|
|
20
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<UserProfile>;
|
|
16
21
|
/**
|
|
17
22
|
* Get multiple users by IDs
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const paginatedUsers = await client.x.users.retrieveBatch({
|
|
27
|
+
* ids: 'ids',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
18
30
|
*/
|
|
19
|
-
retrieveBatch(query: UserRetrieveBatchParams, options?: RequestOptions): APIPromise<
|
|
31
|
+
retrieveBatch(query: UserRetrieveBatchParams, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
20
32
|
/**
|
|
21
33
|
* Get user followers
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const paginatedUsers =
|
|
38
|
+
* await client.x.users.retrieveFollowers('id');
|
|
39
|
+
* ```
|
|
22
40
|
*/
|
|
23
|
-
retrieveFollowers(id: string, query?: UserRetrieveFollowersParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
41
|
+
retrieveFollowers(id: string, query?: UserRetrieveFollowersParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
24
42
|
/**
|
|
25
43
|
* Get followers you know for a user
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const paginatedUsers =
|
|
48
|
+
* await client.x.users.retrieveFollowersYouKnow('id');
|
|
49
|
+
* ```
|
|
26
50
|
*/
|
|
27
51
|
retrieveFollowersYouKnow(id: string, query?: UserRetrieveFollowersYouKnowParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
28
52
|
/**
|
|
29
53
|
* Get users this user follows
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const paginatedUsers =
|
|
58
|
+
* await client.x.users.retrieveFollowing('id');
|
|
59
|
+
* ```
|
|
30
60
|
*/
|
|
31
|
-
retrieveFollowing(id: string, query?: UserRetrieveFollowingParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
61
|
+
retrieveFollowing(id: string, query?: UserRetrieveFollowingParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
32
62
|
/**
|
|
33
63
|
* Get tweets liked by a user
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const paginatedTweets = await client.x.users.retrieveLikes(
|
|
68
|
+
* 'id',
|
|
69
|
+
* );
|
|
70
|
+
* ```
|
|
34
71
|
*/
|
|
35
72
|
retrieveLikes(id: string, query?: UserRetrieveLikesParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
36
73
|
/**
|
|
37
74
|
* Get media tweets by a user
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const paginatedTweets = await client.x.users.retrieveMedia(
|
|
79
|
+
* 'id',
|
|
80
|
+
* );
|
|
81
|
+
* ```
|
|
38
82
|
*/
|
|
39
83
|
retrieveMedia(id: string, query?: UserRetrieveMediaParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
40
84
|
/**
|
|
41
85
|
* Get tweets mentioning a user
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const paginatedTweets =
|
|
90
|
+
* await client.x.users.retrieveMentions('id');
|
|
91
|
+
* ```
|
|
42
92
|
*/
|
|
43
|
-
retrieveMentions(id: string, query?: UserRetrieveMentionsParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
93
|
+
retrieveMentions(id: string, query?: UserRetrieveMentionsParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
44
94
|
/**
|
|
45
95
|
* Search users by name or username
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* const paginatedUsers = await client.x.users.retrieveSearch({
|
|
100
|
+
* q: 'q',
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
46
103
|
*/
|
|
47
|
-
retrieveSearch(query: UserRetrieveSearchParams, options?: RequestOptions): APIPromise<
|
|
104
|
+
retrieveSearch(query: UserRetrieveSearchParams, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
48
105
|
/**
|
|
49
106
|
* Get recent tweets by a user
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* const paginatedTweets = await client.x.users.retrieveTweets(
|
|
111
|
+
* 'id',
|
|
112
|
+
* );
|
|
113
|
+
* ```
|
|
50
114
|
*/
|
|
51
115
|
retrieveTweets(id: string, query?: UserRetrieveTweetsParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
52
116
|
/**
|
|
53
117
|
* Get verified followers
|
|
54
|
-
|
|
55
|
-
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* const paginatedUsers =
|
|
122
|
+
* await client.x.users.retrieveVerifiedFollowers('id');
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
retrieveVerifiedFollowers(id: string, query?: UserRetrieveVerifiedFollowersParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
56
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* X user profile with bio, follower counts, and verification status.
|
|
129
|
+
*/
|
|
57
130
|
export interface UserProfile {
|
|
58
131
|
id: string;
|
|
59
132
|
name: string;
|
|
@@ -75,7 +148,7 @@ export interface UserRetrieveBatchParams {
|
|
|
75
148
|
}
|
|
76
149
|
export interface UserRetrieveFollowersParams {
|
|
77
150
|
/**
|
|
78
|
-
* Pagination cursor
|
|
151
|
+
* Pagination cursor for followers list
|
|
79
152
|
*/
|
|
80
153
|
cursor?: string;
|
|
81
154
|
/**
|
|
@@ -85,59 +158,59 @@ export interface UserRetrieveFollowersParams {
|
|
|
85
158
|
}
|
|
86
159
|
export interface UserRetrieveFollowersYouKnowParams {
|
|
87
160
|
/**
|
|
88
|
-
* Pagination cursor
|
|
161
|
+
* Pagination cursor for followers-you-know
|
|
89
162
|
*/
|
|
90
163
|
cursor?: string;
|
|
91
164
|
}
|
|
92
165
|
export interface UserRetrieveFollowingParams {
|
|
93
166
|
/**
|
|
94
|
-
* Pagination cursor
|
|
167
|
+
* Pagination cursor for following list
|
|
95
168
|
*/
|
|
96
169
|
cursor?: string;
|
|
97
170
|
/**
|
|
98
|
-
*
|
|
171
|
+
* Results per page (20-200, default 200)
|
|
99
172
|
*/
|
|
100
173
|
pageSize?: number;
|
|
101
174
|
}
|
|
102
175
|
export interface UserRetrieveLikesParams {
|
|
103
176
|
/**
|
|
104
|
-
* Pagination cursor
|
|
177
|
+
* Pagination cursor for liked tweets
|
|
105
178
|
*/
|
|
106
179
|
cursor?: string;
|
|
107
180
|
}
|
|
108
181
|
export interface UserRetrieveMediaParams {
|
|
109
182
|
/**
|
|
110
|
-
* Pagination cursor
|
|
183
|
+
* Pagination cursor for media tweets
|
|
111
184
|
*/
|
|
112
185
|
cursor?: string;
|
|
113
186
|
}
|
|
114
187
|
export interface UserRetrieveMentionsParams {
|
|
115
188
|
/**
|
|
116
|
-
* Pagination cursor
|
|
189
|
+
* Pagination cursor for mentions
|
|
117
190
|
*/
|
|
118
191
|
cursor?: string;
|
|
119
192
|
/**
|
|
120
|
-
* Unix timestamp -
|
|
193
|
+
* Unix timestamp - return mentions after this time
|
|
121
194
|
*/
|
|
122
195
|
sinceTime?: string;
|
|
123
196
|
/**
|
|
124
|
-
* Unix timestamp -
|
|
197
|
+
* Unix timestamp - return mentions before this time
|
|
125
198
|
*/
|
|
126
199
|
untilTime?: string;
|
|
127
200
|
}
|
|
128
201
|
export interface UserRetrieveSearchParams {
|
|
129
202
|
/**
|
|
130
|
-
*
|
|
203
|
+
* User search query
|
|
131
204
|
*/
|
|
132
205
|
q: string;
|
|
133
206
|
/**
|
|
134
|
-
* Pagination cursor
|
|
207
|
+
* Pagination cursor for user search
|
|
135
208
|
*/
|
|
136
209
|
cursor?: string;
|
|
137
210
|
}
|
|
138
211
|
export interface UserRetrieveTweetsParams {
|
|
139
212
|
/**
|
|
140
|
-
* Pagination cursor
|
|
213
|
+
* Pagination cursor for user tweets
|
|
141
214
|
*/
|
|
142
215
|
cursor?: string;
|
|
143
216
|
/**
|
|
@@ -151,7 +224,7 @@ export interface UserRetrieveTweetsParams {
|
|
|
151
224
|
}
|
|
152
225
|
export interface UserRetrieveVerifiedFollowersParams {
|
|
153
226
|
/**
|
|
154
|
-
* Pagination cursor
|
|
227
|
+
* Pagination cursor for verified followers
|
|
155
228
|
*/
|
|
156
229
|
cursor?: string;
|
|
157
230
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.mts","sourceRoot":"","sources":["../../../src/resources/x/users/users.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,SAAS;OACd,EACL,MAAM,EACN,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACxB;OACM,EAAE,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"users.d.mts","sourceRoot":"","sources":["../../../src/resources/x/users/users.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,SAAS;OACd,EACL,MAAM,EACN,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACxB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC,MAA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AuB,IAAI,uBAAuB,EACvD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mCAAmC,IAAI,mCAAmC,GAChF,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -11,49 +11,122 @@ export declare class Users extends APIResource {
|
|
|
11
11
|
follow: FollowAPI.Follow;
|
|
12
12
|
/**
|
|
13
13
|
* Look up X user
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const userProfile = await client.x.users.retrieve('id');
|
|
18
|
+
* ```
|
|
14
19
|
*/
|
|
15
|
-
retrieve(
|
|
20
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<UserProfile>;
|
|
16
21
|
/**
|
|
17
22
|
* Get multiple users by IDs
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const paginatedUsers = await client.x.users.retrieveBatch({
|
|
27
|
+
* ids: 'ids',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
18
30
|
*/
|
|
19
|
-
retrieveBatch(query: UserRetrieveBatchParams, options?: RequestOptions): APIPromise<
|
|
31
|
+
retrieveBatch(query: UserRetrieveBatchParams, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
20
32
|
/**
|
|
21
33
|
* Get user followers
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const paginatedUsers =
|
|
38
|
+
* await client.x.users.retrieveFollowers('id');
|
|
39
|
+
* ```
|
|
22
40
|
*/
|
|
23
|
-
retrieveFollowers(id: string, query?: UserRetrieveFollowersParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
41
|
+
retrieveFollowers(id: string, query?: UserRetrieveFollowersParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
24
42
|
/**
|
|
25
43
|
* Get followers you know for a user
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const paginatedUsers =
|
|
48
|
+
* await client.x.users.retrieveFollowersYouKnow('id');
|
|
49
|
+
* ```
|
|
26
50
|
*/
|
|
27
51
|
retrieveFollowersYouKnow(id: string, query?: UserRetrieveFollowersYouKnowParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
28
52
|
/**
|
|
29
53
|
* Get users this user follows
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const paginatedUsers =
|
|
58
|
+
* await client.x.users.retrieveFollowing('id');
|
|
59
|
+
* ```
|
|
30
60
|
*/
|
|
31
|
-
retrieveFollowing(id: string, query?: UserRetrieveFollowingParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
61
|
+
retrieveFollowing(id: string, query?: UserRetrieveFollowingParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
32
62
|
/**
|
|
33
63
|
* Get tweets liked by a user
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const paginatedTweets = await client.x.users.retrieveLikes(
|
|
68
|
+
* 'id',
|
|
69
|
+
* );
|
|
70
|
+
* ```
|
|
34
71
|
*/
|
|
35
72
|
retrieveLikes(id: string, query?: UserRetrieveLikesParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
36
73
|
/**
|
|
37
74
|
* Get media tweets by a user
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const paginatedTweets = await client.x.users.retrieveMedia(
|
|
79
|
+
* 'id',
|
|
80
|
+
* );
|
|
81
|
+
* ```
|
|
38
82
|
*/
|
|
39
83
|
retrieveMedia(id: string, query?: UserRetrieveMediaParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
40
84
|
/**
|
|
41
85
|
* Get tweets mentioning a user
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const paginatedTweets =
|
|
90
|
+
* await client.x.users.retrieveMentions('id');
|
|
91
|
+
* ```
|
|
42
92
|
*/
|
|
43
|
-
retrieveMentions(id: string, query?: UserRetrieveMentionsParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
93
|
+
retrieveMentions(id: string, query?: UserRetrieveMentionsParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
44
94
|
/**
|
|
45
95
|
* Search users by name or username
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* const paginatedUsers = await client.x.users.retrieveSearch({
|
|
100
|
+
* q: 'q',
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
46
103
|
*/
|
|
47
|
-
retrieveSearch(query: UserRetrieveSearchParams, options?: RequestOptions): APIPromise<
|
|
104
|
+
retrieveSearch(query: UserRetrieveSearchParams, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
48
105
|
/**
|
|
49
106
|
* Get recent tweets by a user
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* const paginatedTweets = await client.x.users.retrieveTweets(
|
|
111
|
+
* 'id',
|
|
112
|
+
* );
|
|
113
|
+
* ```
|
|
50
114
|
*/
|
|
51
115
|
retrieveTweets(id: string, query?: UserRetrieveTweetsParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
52
116
|
/**
|
|
53
117
|
* Get verified followers
|
|
54
|
-
|
|
55
|
-
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* const paginatedUsers =
|
|
122
|
+
* await client.x.users.retrieveVerifiedFollowers('id');
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
retrieveVerifiedFollowers(id: string, query?: UserRetrieveVerifiedFollowersParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
56
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* X user profile with bio, follower counts, and verification status.
|
|
129
|
+
*/
|
|
57
130
|
export interface UserProfile {
|
|
58
131
|
id: string;
|
|
59
132
|
name: string;
|
|
@@ -75,7 +148,7 @@ export interface UserRetrieveBatchParams {
|
|
|
75
148
|
}
|
|
76
149
|
export interface UserRetrieveFollowersParams {
|
|
77
150
|
/**
|
|
78
|
-
* Pagination cursor
|
|
151
|
+
* Pagination cursor for followers list
|
|
79
152
|
*/
|
|
80
153
|
cursor?: string;
|
|
81
154
|
/**
|
|
@@ -85,59 +158,59 @@ export interface UserRetrieveFollowersParams {
|
|
|
85
158
|
}
|
|
86
159
|
export interface UserRetrieveFollowersYouKnowParams {
|
|
87
160
|
/**
|
|
88
|
-
* Pagination cursor
|
|
161
|
+
* Pagination cursor for followers-you-know
|
|
89
162
|
*/
|
|
90
163
|
cursor?: string;
|
|
91
164
|
}
|
|
92
165
|
export interface UserRetrieveFollowingParams {
|
|
93
166
|
/**
|
|
94
|
-
* Pagination cursor
|
|
167
|
+
* Pagination cursor for following list
|
|
95
168
|
*/
|
|
96
169
|
cursor?: string;
|
|
97
170
|
/**
|
|
98
|
-
*
|
|
171
|
+
* Results per page (20-200, default 200)
|
|
99
172
|
*/
|
|
100
173
|
pageSize?: number;
|
|
101
174
|
}
|
|
102
175
|
export interface UserRetrieveLikesParams {
|
|
103
176
|
/**
|
|
104
|
-
* Pagination cursor
|
|
177
|
+
* Pagination cursor for liked tweets
|
|
105
178
|
*/
|
|
106
179
|
cursor?: string;
|
|
107
180
|
}
|
|
108
181
|
export interface UserRetrieveMediaParams {
|
|
109
182
|
/**
|
|
110
|
-
* Pagination cursor
|
|
183
|
+
* Pagination cursor for media tweets
|
|
111
184
|
*/
|
|
112
185
|
cursor?: string;
|
|
113
186
|
}
|
|
114
187
|
export interface UserRetrieveMentionsParams {
|
|
115
188
|
/**
|
|
116
|
-
* Pagination cursor
|
|
189
|
+
* Pagination cursor for mentions
|
|
117
190
|
*/
|
|
118
191
|
cursor?: string;
|
|
119
192
|
/**
|
|
120
|
-
* Unix timestamp -
|
|
193
|
+
* Unix timestamp - return mentions after this time
|
|
121
194
|
*/
|
|
122
195
|
sinceTime?: string;
|
|
123
196
|
/**
|
|
124
|
-
* Unix timestamp -
|
|
197
|
+
* Unix timestamp - return mentions before this time
|
|
125
198
|
*/
|
|
126
199
|
untilTime?: string;
|
|
127
200
|
}
|
|
128
201
|
export interface UserRetrieveSearchParams {
|
|
129
202
|
/**
|
|
130
|
-
*
|
|
203
|
+
* User search query
|
|
131
204
|
*/
|
|
132
205
|
q: string;
|
|
133
206
|
/**
|
|
134
|
-
* Pagination cursor
|
|
207
|
+
* Pagination cursor for user search
|
|
135
208
|
*/
|
|
136
209
|
cursor?: string;
|
|
137
210
|
}
|
|
138
211
|
export interface UserRetrieveTweetsParams {
|
|
139
212
|
/**
|
|
140
|
-
* Pagination cursor
|
|
213
|
+
* Pagination cursor for user tweets
|
|
141
214
|
*/
|
|
142
215
|
cursor?: string;
|
|
143
216
|
/**
|
|
@@ -151,7 +224,7 @@ export interface UserRetrieveTweetsParams {
|
|
|
151
224
|
}
|
|
152
225
|
export interface UserRetrieveVerifiedFollowersParams {
|
|
153
226
|
/**
|
|
154
|
-
* Pagination cursor
|
|
227
|
+
* Pagination cursor for verified followers
|
|
155
228
|
*/
|
|
156
229
|
cursor?: string;
|
|
157
230
|
}
|