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
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
FollowDeleteAllResponse,
|
|
12
12
|
} from './follow';
|
|
13
13
|
import { APIPromise } from '../../../core/api-promise';
|
|
14
|
-
import { buildHeaders } from '../../../internal/headers';
|
|
15
14
|
import { RequestOptions } from '../../../internal/request-options';
|
|
16
15
|
import { path } from '../../../internal/utils/path';
|
|
17
16
|
|
|
@@ -23,39 +22,55 @@ export class Users extends APIResource {
|
|
|
23
22
|
|
|
24
23
|
/**
|
|
25
24
|
* Look up X user
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const userProfile = await client.x.users.retrieve('id');
|
|
29
|
+
* ```
|
|
26
30
|
*/
|
|
27
|
-
retrieve(
|
|
28
|
-
return this._client.get(path`/x/users/${
|
|
31
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<UserProfile> {
|
|
32
|
+
return this._client.get(path`/x/users/${id}`, options);
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
/**
|
|
32
36
|
* Get multiple users by IDs
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const paginatedUsers = await client.x.users.retrieveBatch({
|
|
41
|
+
* ids: 'ids',
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
33
44
|
*/
|
|
34
|
-
retrieveBatch(query: UserRetrieveBatchParams, options?: RequestOptions): APIPromise<
|
|
35
|
-
return this._client.get('/x/users/batch', {
|
|
36
|
-
query,
|
|
37
|
-
...options,
|
|
38
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
39
|
-
});
|
|
45
|
+
retrieveBatch(query: UserRetrieveBatchParams, options?: RequestOptions): APIPromise<Shared.PaginatedUsers> {
|
|
46
|
+
return this._client.get('/x/users/batch', { query, ...options });
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
/**
|
|
43
50
|
* Get user followers
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const paginatedUsers =
|
|
55
|
+
* await client.x.users.retrieveFollowers('id');
|
|
56
|
+
* ```
|
|
44
57
|
*/
|
|
45
58
|
retrieveFollowers(
|
|
46
59
|
id: string,
|
|
47
60
|
query: UserRetrieveFollowersParams | null | undefined = {},
|
|
48
61
|
options?: RequestOptions,
|
|
49
|
-
): APIPromise<
|
|
50
|
-
return this._client.get(path`/x/users/${id}/followers`, {
|
|
51
|
-
query,
|
|
52
|
-
...options,
|
|
53
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
54
|
-
});
|
|
62
|
+
): APIPromise<Shared.PaginatedUsers> {
|
|
63
|
+
return this._client.get(path`/x/users/${id}/followers`, { query, ...options });
|
|
55
64
|
}
|
|
56
65
|
|
|
57
66
|
/**
|
|
58
67
|
* Get followers you know for a user
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const paginatedUsers =
|
|
72
|
+
* await client.x.users.retrieveFollowersYouKnow('id');
|
|
73
|
+
* ```
|
|
59
74
|
*/
|
|
60
75
|
retrieveFollowersYouKnow(
|
|
61
76
|
id: string,
|
|
@@ -67,21 +82,30 @@ export class Users extends APIResource {
|
|
|
67
82
|
|
|
68
83
|
/**
|
|
69
84
|
* Get users this user follows
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* const paginatedUsers =
|
|
89
|
+
* await client.x.users.retrieveFollowing('id');
|
|
90
|
+
* ```
|
|
70
91
|
*/
|
|
71
92
|
retrieveFollowing(
|
|
72
93
|
id: string,
|
|
73
94
|
query: UserRetrieveFollowingParams | null | undefined = {},
|
|
74
95
|
options?: RequestOptions,
|
|
75
|
-
): APIPromise<
|
|
76
|
-
return this._client.get(path`/x/users/${id}/following`, {
|
|
77
|
-
query,
|
|
78
|
-
...options,
|
|
79
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
80
|
-
});
|
|
96
|
+
): APIPromise<Shared.PaginatedUsers> {
|
|
97
|
+
return this._client.get(path`/x/users/${id}/following`, { query, ...options });
|
|
81
98
|
}
|
|
82
99
|
|
|
83
100
|
/**
|
|
84
101
|
* Get tweets liked by a user
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* const paginatedTweets = await client.x.users.retrieveLikes(
|
|
106
|
+
* 'id',
|
|
107
|
+
* );
|
|
108
|
+
* ```
|
|
85
109
|
*/
|
|
86
110
|
retrieveLikes(
|
|
87
111
|
id: string,
|
|
@@ -93,6 +117,13 @@ export class Users extends APIResource {
|
|
|
93
117
|
|
|
94
118
|
/**
|
|
95
119
|
* Get media tweets by a user
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* const paginatedTweets = await client.x.users.retrieveMedia(
|
|
124
|
+
* 'id',
|
|
125
|
+
* );
|
|
126
|
+
* ```
|
|
96
127
|
*/
|
|
97
128
|
retrieveMedia(
|
|
98
129
|
id: string,
|
|
@@ -104,32 +135,47 @@ export class Users extends APIResource {
|
|
|
104
135
|
|
|
105
136
|
/**
|
|
106
137
|
* Get tweets mentioning a user
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* const paginatedTweets =
|
|
142
|
+
* await client.x.users.retrieveMentions('id');
|
|
143
|
+
* ```
|
|
107
144
|
*/
|
|
108
145
|
retrieveMentions(
|
|
109
146
|
id: string,
|
|
110
147
|
query: UserRetrieveMentionsParams | null | undefined = {},
|
|
111
148
|
options?: RequestOptions,
|
|
112
|
-
): APIPromise<
|
|
113
|
-
return this._client.get(path`/x/users/${id}/mentions`, {
|
|
114
|
-
query,
|
|
115
|
-
...options,
|
|
116
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
117
|
-
});
|
|
149
|
+
): APIPromise<Shared.PaginatedTweets> {
|
|
150
|
+
return this._client.get(path`/x/users/${id}/mentions`, { query, ...options });
|
|
118
151
|
}
|
|
119
152
|
|
|
120
153
|
/**
|
|
121
154
|
* Search users by name or username
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```ts
|
|
158
|
+
* const paginatedUsers = await client.x.users.retrieveSearch({
|
|
159
|
+
* q: 'q',
|
|
160
|
+
* });
|
|
161
|
+
* ```
|
|
122
162
|
*/
|
|
123
|
-
retrieveSearch(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
});
|
|
163
|
+
retrieveSearch(
|
|
164
|
+
query: UserRetrieveSearchParams,
|
|
165
|
+
options?: RequestOptions,
|
|
166
|
+
): APIPromise<Shared.PaginatedUsers> {
|
|
167
|
+
return this._client.get('/x/users/search', { query, ...options });
|
|
129
168
|
}
|
|
130
169
|
|
|
131
170
|
/**
|
|
132
171
|
* Get recent tweets by a user
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```ts
|
|
175
|
+
* const paginatedTweets = await client.x.users.retrieveTweets(
|
|
176
|
+
* 'id',
|
|
177
|
+
* );
|
|
178
|
+
* ```
|
|
133
179
|
*/
|
|
134
180
|
retrieveTweets(
|
|
135
181
|
id: string,
|
|
@@ -141,20 +187,25 @@ export class Users extends APIResource {
|
|
|
141
187
|
|
|
142
188
|
/**
|
|
143
189
|
* Get verified followers
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```ts
|
|
193
|
+
* const paginatedUsers =
|
|
194
|
+
* await client.x.users.retrieveVerifiedFollowers('id');
|
|
195
|
+
* ```
|
|
144
196
|
*/
|
|
145
197
|
retrieveVerifiedFollowers(
|
|
146
198
|
id: string,
|
|
147
199
|
query: UserRetrieveVerifiedFollowersParams | null | undefined = {},
|
|
148
200
|
options?: RequestOptions,
|
|
149
|
-
): APIPromise<
|
|
150
|
-
return this._client.get(path`/x/users/${id}/verified-followers`, {
|
|
151
|
-
query,
|
|
152
|
-
...options,
|
|
153
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
154
|
-
});
|
|
201
|
+
): APIPromise<Shared.PaginatedUsers> {
|
|
202
|
+
return this._client.get(path`/x/users/${id}/verified-followers`, { query, ...options });
|
|
155
203
|
}
|
|
156
204
|
}
|
|
157
205
|
|
|
206
|
+
/**
|
|
207
|
+
* X user profile with bio, follower counts, and verification status.
|
|
208
|
+
*/
|
|
158
209
|
export interface UserProfile {
|
|
159
210
|
id: string;
|
|
160
211
|
|
|
@@ -188,7 +239,7 @@ export interface UserRetrieveBatchParams {
|
|
|
188
239
|
|
|
189
240
|
export interface UserRetrieveFollowersParams {
|
|
190
241
|
/**
|
|
191
|
-
* Pagination cursor
|
|
242
|
+
* Pagination cursor for followers list
|
|
192
243
|
*/
|
|
193
244
|
cursor?: string;
|
|
194
245
|
|
|
@@ -200,69 +251,69 @@ export interface UserRetrieveFollowersParams {
|
|
|
200
251
|
|
|
201
252
|
export interface UserRetrieveFollowersYouKnowParams {
|
|
202
253
|
/**
|
|
203
|
-
* Pagination cursor
|
|
254
|
+
* Pagination cursor for followers-you-know
|
|
204
255
|
*/
|
|
205
256
|
cursor?: string;
|
|
206
257
|
}
|
|
207
258
|
|
|
208
259
|
export interface UserRetrieveFollowingParams {
|
|
209
260
|
/**
|
|
210
|
-
* Pagination cursor
|
|
261
|
+
* Pagination cursor for following list
|
|
211
262
|
*/
|
|
212
263
|
cursor?: string;
|
|
213
264
|
|
|
214
265
|
/**
|
|
215
|
-
*
|
|
266
|
+
* Results per page (20-200, default 200)
|
|
216
267
|
*/
|
|
217
268
|
pageSize?: number;
|
|
218
269
|
}
|
|
219
270
|
|
|
220
271
|
export interface UserRetrieveLikesParams {
|
|
221
272
|
/**
|
|
222
|
-
* Pagination cursor
|
|
273
|
+
* Pagination cursor for liked tweets
|
|
223
274
|
*/
|
|
224
275
|
cursor?: string;
|
|
225
276
|
}
|
|
226
277
|
|
|
227
278
|
export interface UserRetrieveMediaParams {
|
|
228
279
|
/**
|
|
229
|
-
* Pagination cursor
|
|
280
|
+
* Pagination cursor for media tweets
|
|
230
281
|
*/
|
|
231
282
|
cursor?: string;
|
|
232
283
|
}
|
|
233
284
|
|
|
234
285
|
export interface UserRetrieveMentionsParams {
|
|
235
286
|
/**
|
|
236
|
-
* Pagination cursor
|
|
287
|
+
* Pagination cursor for mentions
|
|
237
288
|
*/
|
|
238
289
|
cursor?: string;
|
|
239
290
|
|
|
240
291
|
/**
|
|
241
|
-
* Unix timestamp -
|
|
292
|
+
* Unix timestamp - return mentions after this time
|
|
242
293
|
*/
|
|
243
294
|
sinceTime?: string;
|
|
244
295
|
|
|
245
296
|
/**
|
|
246
|
-
* Unix timestamp -
|
|
297
|
+
* Unix timestamp - return mentions before this time
|
|
247
298
|
*/
|
|
248
299
|
untilTime?: string;
|
|
249
300
|
}
|
|
250
301
|
|
|
251
302
|
export interface UserRetrieveSearchParams {
|
|
252
303
|
/**
|
|
253
|
-
*
|
|
304
|
+
* User search query
|
|
254
305
|
*/
|
|
255
306
|
q: string;
|
|
256
307
|
|
|
257
308
|
/**
|
|
258
|
-
* Pagination cursor
|
|
309
|
+
* Pagination cursor for user search
|
|
259
310
|
*/
|
|
260
311
|
cursor?: string;
|
|
261
312
|
}
|
|
262
313
|
|
|
263
314
|
export interface UserRetrieveTweetsParams {
|
|
264
315
|
/**
|
|
265
|
-
* Pagination cursor
|
|
316
|
+
* Pagination cursor for user tweets
|
|
266
317
|
*/
|
|
267
318
|
cursor?: string;
|
|
268
319
|
|
|
@@ -279,7 +330,7 @@ export interface UserRetrieveTweetsParams {
|
|
|
279
330
|
|
|
280
331
|
export interface UserRetrieveVerifiedFollowersParams {
|
|
281
332
|
/**
|
|
282
|
-
* Pagination cursor
|
|
333
|
+
* Pagination cursor for verified followers
|
|
283
334
|
*/
|
|
284
335
|
cursor?: string;
|
|
285
336
|
}
|
package/src/resources/x/x.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
import * as Shared from '../shared';
|
|
5
5
|
import * as AccountsAPI from './accounts';
|
|
6
6
|
import {
|
|
7
|
+
AccountBulkRetryResponse,
|
|
7
8
|
AccountCreateParams,
|
|
8
9
|
AccountCreateResponse,
|
|
9
10
|
AccountDeleteResponse,
|
|
@@ -93,7 +94,6 @@ import {
|
|
|
93
94
|
Users,
|
|
94
95
|
} from './users/users';
|
|
95
96
|
import { APIPromise } from '../../core/api-promise';
|
|
96
|
-
import { buildHeaders } from '../../internal/headers';
|
|
97
97
|
import { RequestOptions } from '../../internal/request-options';
|
|
98
98
|
import { path } from '../../internal/utils/path';
|
|
99
99
|
|
|
@@ -114,6 +114,11 @@ export class X extends APIResource {
|
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
116
|
* Retrieve the full content of an X Article (long-form post) by tweet ID.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```ts
|
|
120
|
+
* const response = await client.x.getArticle('tweetId');
|
|
121
|
+
* ```
|
|
117
122
|
*/
|
|
118
123
|
getArticle(tweetID: string, options?: RequestOptions): APIPromise<XGetArticleResponse> {
|
|
119
124
|
return this._client.get(path`/x/articles/${tweetID}`, options);
|
|
@@ -121,6 +126,11 @@ export class X extends APIResource {
|
|
|
121
126
|
|
|
122
127
|
/**
|
|
123
128
|
* Get home timeline
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```ts
|
|
132
|
+
* const paginatedTweets = await client.x.getHomeTimeline();
|
|
133
|
+
* ```
|
|
124
134
|
*/
|
|
125
135
|
getHomeTimeline(
|
|
126
136
|
query: XGetHomeTimelineParams | null | undefined = {},
|
|
@@ -131,6 +141,11 @@ export class X extends APIResource {
|
|
|
131
141
|
|
|
132
142
|
/**
|
|
133
143
|
* Get notifications
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* const response = await client.x.getNotifications();
|
|
148
|
+
* ```
|
|
134
149
|
*/
|
|
135
150
|
getNotifications(
|
|
136
151
|
query: XGetNotificationsParams | null | undefined = {},
|
|
@@ -141,18 +156,23 @@ export class X extends APIResource {
|
|
|
141
156
|
|
|
142
157
|
/**
|
|
143
158
|
* Get trending topics
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* const response = await client.x.getTrends();
|
|
163
|
+
* ```
|
|
144
164
|
*/
|
|
145
|
-
getTrends(options?: RequestOptions): APIPromise<
|
|
146
|
-
return this._client.get('/x/trends',
|
|
147
|
-
...options,
|
|
148
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
149
|
-
});
|
|
165
|
+
getTrends(options?: RequestOptions): APIPromise<XGetTrendsResponse> {
|
|
166
|
+
return this._client.get('/x/trends', options);
|
|
150
167
|
}
|
|
151
168
|
}
|
|
152
169
|
|
|
153
170
|
export interface XGetArticleResponse {
|
|
154
171
|
article: XGetArticleResponse.Article;
|
|
155
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Author of a tweet with follower count and verification status.
|
|
175
|
+
*/
|
|
156
176
|
author?: TweetsAPI.TweetAuthor;
|
|
157
177
|
}
|
|
158
178
|
|
|
@@ -219,9 +239,29 @@ export namespace XGetNotificationsResponse {
|
|
|
219
239
|
}
|
|
220
240
|
}
|
|
221
241
|
|
|
242
|
+
export interface XGetTrendsResponse {
|
|
243
|
+
count: number;
|
|
244
|
+
|
|
245
|
+
trends: Array<XGetTrendsResponse.Trend>;
|
|
246
|
+
|
|
247
|
+
woeid: number;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export namespace XGetTrendsResponse {
|
|
251
|
+
export interface Trend {
|
|
252
|
+
name: string;
|
|
253
|
+
|
|
254
|
+
description?: string;
|
|
255
|
+
|
|
256
|
+
query?: string;
|
|
257
|
+
|
|
258
|
+
rank?: number;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
222
262
|
export interface XGetHomeTimelineParams {
|
|
223
263
|
/**
|
|
224
|
-
* Pagination cursor
|
|
264
|
+
* Pagination cursor for timeline
|
|
225
265
|
*/
|
|
226
266
|
cursor?: string;
|
|
227
267
|
|
|
@@ -233,7 +273,7 @@ export interface XGetHomeTimelineParams {
|
|
|
233
273
|
|
|
234
274
|
export interface XGetNotificationsParams {
|
|
235
275
|
/**
|
|
236
|
-
* Pagination cursor
|
|
276
|
+
* Pagination cursor for notifications
|
|
237
277
|
*/
|
|
238
278
|
cursor?: string;
|
|
239
279
|
|
|
@@ -258,6 +298,7 @@ export declare namespace X {
|
|
|
258
298
|
export {
|
|
259
299
|
type XGetArticleResponse as XGetArticleResponse,
|
|
260
300
|
type XGetNotificationsResponse as XGetNotificationsResponse,
|
|
301
|
+
type XGetTrendsResponse as XGetTrendsResponse,
|
|
261
302
|
type XGetHomeTimelineParams as XGetHomeTimelineParams,
|
|
262
303
|
type XGetNotificationsParams as XGetNotificationsParams,
|
|
263
304
|
};
|
|
@@ -348,6 +389,7 @@ export declare namespace X {
|
|
|
348
389
|
type AccountCreateResponse as AccountCreateResponse,
|
|
349
390
|
type AccountListResponse as AccountListResponse,
|
|
350
391
|
type AccountDeleteResponse as AccountDeleteResponse,
|
|
392
|
+
type AccountBulkRetryResponse as AccountBulkRetryResponse,
|
|
351
393
|
type AccountReauthResponse as AccountReauthResponse,
|
|
352
394
|
type AccountCreateParams as AccountCreateParams,
|
|
353
395
|
type AccountReauthParams as AccountReauthParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1
|
|
1
|
+
export const VERSION = '0.2.1'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1
|
|
1
|
+
export declare const VERSION = "0.2.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1
|
|
1
|
+
export declare const VERSION = "0.2.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1
|
|
1
|
+
export const VERSION = '0.2.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|