rettiwt-api 5.0.0-alpha.3 → 5.0.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/README.md +160 -87
- package/dist/collections/Extractors.d.ts +6 -2
- package/dist/collections/Extractors.js +1 -0
- package/dist/collections/Extractors.js.map +1 -1
- package/dist/collections/Groups.js +1 -0
- package/dist/collections/Groups.js.map +1 -1
- package/dist/collections/Requests.d.ts +1 -1
- package/dist/collections/Requests.js +4 -2
- package/dist/collections/Requests.js.map +1 -1
- package/dist/collections/Tweet.d.ts +10 -0
- package/dist/collections/Tweet.js +17 -0
- package/dist/collections/Tweet.js.map +1 -0
- package/dist/commands/Tweet.js +0 -16
- package/dist/commands/Tweet.js.map +1 -1
- package/dist/commands/User.js +15 -15
- package/dist/commands/User.js.map +1 -1
- package/dist/enums/Api.d.ts +1 -51
- package/dist/enums/Api.js +1 -52
- package/dist/enums/Api.js.map +1 -1
- package/dist/enums/Resource.d.ts +1 -0
- package/dist/enums/Resource.js +1 -0
- package/dist/enums/Resource.js.map +1 -1
- package/dist/enums/Tweet.d.ts +8 -0
- package/dist/enums/Tweet.js +13 -0
- package/dist/enums/Tweet.js.map +1 -0
- package/dist/enums/raw/Tweet.d.ts +11 -1
- package/dist/enums/raw/Tweet.js +13 -2
- package/dist/enums/raw/Tweet.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/models/RettiwtConfig.d.ts +27 -3
- package/dist/models/RettiwtConfig.js +37 -4
- package/dist/models/RettiwtConfig.js.map +1 -1
- package/dist/models/args/FetchArgs.d.ts +3 -3
- package/dist/models/args/FetchArgs.js +3 -2
- package/dist/models/args/FetchArgs.js.map +1 -1
- package/dist/models/args/PostArgs.d.ts +2 -3
- package/dist/models/args/PostArgs.js +3 -3
- package/dist/models/args/PostArgs.js.map +1 -1
- package/dist/models/auth/AuthCookie.d.ts +1 -1
- package/dist/models/auth/AuthCookie.js +1 -1
- package/dist/models/auth/AuthCredential.d.ts +1 -1
- package/dist/models/auth/AuthCredential.js +1 -1
- package/dist/models/data/List.d.ts +4 -0
- package/dist/models/data/List.js +7 -0
- package/dist/models/data/List.js.map +1 -1
- package/dist/models/data/Notification.d.ts +4 -0
- package/dist/models/data/Notification.js +7 -0
- package/dist/models/data/Notification.js.map +1 -1
- package/dist/models/data/Tweet.d.ts +4 -0
- package/dist/models/data/Tweet.js +7 -0
- package/dist/models/data/Tweet.js.map +1 -1
- package/dist/models/data/User.d.ts +4 -0
- package/dist/models/data/User.js +7 -0
- package/dist/models/data/User.js.map +1 -1
- package/dist/models/errors/TwitterError.d.ts +37 -0
- package/dist/models/errors/TwitterError.js +60 -0
- package/dist/models/errors/TwitterError.js.map +1 -0
- package/dist/requests/List.js +28 -9
- package/dist/requests/List.js.map +1 -1
- package/dist/requests/Tweet.d.ts +2 -1
- package/dist/requests/Tweet.js +94 -38
- package/dist/requests/Tweet.js.map +1 -1
- package/dist/requests/User.js +231 -111
- package/dist/requests/User.js.map +1 -1
- package/dist/services/internal/AuthService.d.ts +6 -6
- package/dist/services/internal/AuthService.js +7 -8
- package/dist/services/internal/AuthService.js.map +1 -1
- package/dist/services/internal/ErrorService.d.ts +5 -76
- package/dist/services/internal/ErrorService.js +13 -116
- package/dist/services/internal/ErrorService.js.map +1 -1
- package/dist/services/internal/TidService.d.ts +4 -5
- package/dist/services/internal/TidService.js +18 -24
- package/dist/services/internal/TidService.js.map +1 -1
- package/dist/services/public/FetcherService.d.ts +4 -3
- package/dist/services/public/FetcherService.js +8 -7
- package/dist/services/public/FetcherService.js.map +1 -1
- package/dist/services/public/ListService.d.ts +6 -4
- package/dist/services/public/ListService.js +6 -4
- package/dist/services/public/ListService.js.map +1 -1
- package/dist/services/public/TweetService.d.ts +96 -74
- package/dist/services/public/TweetService.js +97 -87
- package/dist/services/public/TweetService.js.map +1 -1
- package/dist/services/public/UserService.d.ts +106 -38
- package/dist/services/public/UserService.js +126 -43
- package/dist/services/public/UserService.js.map +1 -1
- package/dist/types/args/FetchArgs.d.ts +8 -0
- package/dist/types/errors/TwitterError.d.ts +30 -0
- package/dist/types/{raw/generic/Error.js → errors/TwitterError.js} +1 -1
- package/dist/types/errors/TwitterError.js.map +1 -0
- package/dist/types/raw/base/Error.d.ts +32 -0
- package/dist/types/raw/base/Error.js +4 -0
- package/dist/types/raw/base/Error.js.map +1 -0
- package/dist/types/raw/generic/Response.d.ts +0 -2
- package/dist/types/raw/tweet/DetailsBulk.d.ts +288 -0
- package/dist/types/raw/tweet/DetailsBulk.js +4 -0
- package/dist/types/raw/tweet/DetailsBulk.js.map +1 -0
- package/dist/types/raw/user/DetailsBulk.d.ts +91 -0
- package/dist/types/raw/user/DetailsBulk.js +4 -0
- package/dist/types/raw/user/DetailsBulk.js.map +1 -0
- package/package.json +1 -1
- package/src/collections/Extractors.ts +8 -2
- package/src/collections/Groups.ts +1 -0
- package/src/collections/Requests.ts +6 -2
- package/src/collections/Tweet.ts +17 -0
- package/src/commands/Tweet.ts +0 -16
- package/src/commands/User.ts +15 -15
- package/src/enums/Api.ts +0 -51
- package/src/enums/Resource.ts +1 -0
- package/src/enums/Tweet.ts +8 -0
- package/src/enums/raw/Tweet.ts +12 -1
- package/src/index.ts +6 -6
- package/src/models/RettiwtConfig.ts +43 -4
- package/src/models/args/FetchArgs.ts +4 -3
- package/src/models/args/PostArgs.ts +3 -4
- package/src/models/auth/AuthCookie.ts +1 -1
- package/src/models/auth/AuthCredential.ts +1 -1
- package/src/models/data/List.ts +9 -0
- package/src/models/data/Notification.ts +10 -0
- package/src/models/data/Tweet.ts +9 -0
- package/src/models/data/User.ts +9 -0
- package/src/models/errors/TwitterError.ts +65 -0
- package/src/requests/List.ts +28 -9
- package/src/requests/Tweet.ts +95 -39
- package/src/requests/User.ts +231 -111
- package/src/services/internal/AuthService.ts +8 -9
- package/src/services/internal/ErrorService.ts +14 -132
- package/src/services/internal/TidService.ts +21 -28
- package/src/services/public/FetcherService.ts +8 -7
- package/src/services/public/ListService.ts +6 -4
- package/src/services/public/TweetService.ts +104 -95
- package/src/services/public/UserService.ts +143 -51
- package/src/types/args/FetchArgs.ts +10 -0
- package/src/types/errors/TwitterError.ts +37 -0
- package/src/types/raw/base/Error.ts +37 -0
- package/src/types/raw/generic/Response.ts +0 -3
- package/src/types/raw/tweet/DetailsBulk.ts +338 -0
- package/src/types/raw/user/DetailsBulk.ts +104 -0
- package/dist/enums/Http.d.ts +0 -68
- package/dist/enums/Http.js +0 -73
- package/dist/enums/Http.js.map +0 -1
- package/dist/models/errors/ApiError.d.ts +0 -15
- package/dist/models/errors/ApiError.js +0 -23
- package/dist/models/errors/ApiError.js.map +0 -1
- package/dist/models/errors/HttpError.d.ts +0 -15
- package/dist/models/errors/HttpError.js +0 -23
- package/dist/models/errors/HttpError.js.map +0 -1
- package/dist/models/errors/RettiwtError.d.ts +0 -9
- package/dist/models/errors/RettiwtError.js +0 -17
- package/dist/models/errors/RettiwtError.js.map +0 -1
- package/dist/models/errors/TimeoutError.d.ts +0 -12
- package/dist/models/errors/TimeoutError.js +0 -19
- package/dist/models/errors/TimeoutError.js.map +0 -1
- package/dist/types/raw/generic/Error.d.ts +0 -30
- package/dist/types/raw/generic/Error.js.map +0 -1
- package/src/enums/Http.ts +0 -68
- package/src/models/errors/ApiError.ts +0 -21
- package/src/models/errors/HttpError.ts +0 -21
- package/src/models/errors/RettiwtError.ts +0 -13
- package/src/models/errors/TimeoutError.ts +0 -15
- package/src/types/raw/generic/Error.ts +0 -35
|
@@ -16,6 +16,34 @@ export declare class UserService extends FetcherService {
|
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
18
|
constructor(config: RettiwtConfig);
|
|
19
|
+
/**
|
|
20
|
+
* Get the list affiliates of a user.
|
|
21
|
+
*
|
|
22
|
+
* @param id - The ID of the target user. If no id is provided, the logged-in user's id is used.
|
|
23
|
+
* @param count - The number of affiliates to fetch, must be \<= 100.
|
|
24
|
+
* @param cursor - The cursor to the batch of affiliates to fetch.
|
|
25
|
+
*
|
|
26
|
+
* @returns The list of users affiliated to the target user.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* import { Rettiwt } from 'rettiwt-api';
|
|
32
|
+
*
|
|
33
|
+
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
34
|
+
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
35
|
+
*
|
|
36
|
+
* // Fetching the first 100 affiliates of the User with id '1234567890'
|
|
37
|
+
* rettiwt.user.affiliates('1234567890')
|
|
38
|
+
* .then(res => {
|
|
39
|
+
* console.log(res);
|
|
40
|
+
* })
|
|
41
|
+
* .catch(err => {
|
|
42
|
+
* console.log(err);
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
affiliates(id?: string, count?: number, cursor?: string): Promise<CursoredData<User>>;
|
|
19
47
|
/**
|
|
20
48
|
* Get the list of bookmarks of the logged in user.
|
|
21
49
|
*
|
|
@@ -25,7 +53,8 @@ export declare class UserService extends FetcherService {
|
|
|
25
53
|
* @returns The list of tweets bookmarked by the target user.
|
|
26
54
|
*
|
|
27
55
|
* @example
|
|
28
|
-
*
|
|
56
|
+
*
|
|
57
|
+
* ```ts
|
|
29
58
|
* import { Rettiwt } from 'rettiwt-api';
|
|
30
59
|
*
|
|
31
60
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -45,15 +74,19 @@ export declare class UserService extends FetcherService {
|
|
|
45
74
|
/**
|
|
46
75
|
* Get the details of a user.
|
|
47
76
|
*
|
|
48
|
-
* @param id - The username/
|
|
77
|
+
* @param id - The username/ID/IDs of the target user/users. If no ID is provided, the logged-in user's ID is used.
|
|
49
78
|
*
|
|
50
79
|
* @returns
|
|
51
80
|
* The details of the given user.
|
|
81
|
+
*
|
|
82
|
+
* If more than one ID is provided, returns a list.
|
|
83
|
+
*
|
|
52
84
|
* If no user matches the given id, returns `undefined`.
|
|
53
85
|
*
|
|
54
86
|
* @example
|
|
55
|
-
*
|
|
56
|
-
*
|
|
87
|
+
*
|
|
88
|
+
* #### Fetching the details of a single user using username
|
|
89
|
+
* ```ts
|
|
57
90
|
* import { Rettiwt } from 'rettiwt-api';
|
|
58
91
|
*
|
|
59
92
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -70,8 +103,9 @@ export declare class UserService extends FetcherService {
|
|
|
70
103
|
* ```
|
|
71
104
|
*
|
|
72
105
|
* @example
|
|
73
|
-
*
|
|
74
|
-
*
|
|
106
|
+
*
|
|
107
|
+
* #### Fetching the details of a single user using ID
|
|
108
|
+
* ```ts
|
|
75
109
|
* import { Rettiwt } from 'rettiwt-api';
|
|
76
110
|
*
|
|
77
111
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -80,25 +114,44 @@ export declare class UserService extends FetcherService {
|
|
|
80
114
|
* // Fetching the details of the User with id '1234567890'
|
|
81
115
|
* rettiwt.user.details('1234567890')
|
|
82
116
|
* .then(res => {
|
|
83
|
-
* console.log(res);
|
|
117
|
+
* console.log(res); # 'res' is a single tweet
|
|
118
|
+
* })
|
|
119
|
+
* .catch(err => {
|
|
120
|
+
* console.log(err);
|
|
121
|
+
* });
|
|
122
|
+
* ```
|
|
123
|
+
* * @example
|
|
124
|
+
*
|
|
125
|
+
* #### Fetching the details of multiple users
|
|
126
|
+
* ```ts
|
|
127
|
+
* import { Rettiwt } from 'rettiwt-api';
|
|
128
|
+
*
|
|
129
|
+
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
130
|
+
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
131
|
+
*
|
|
132
|
+
* // Fetching the details of the users with IDs '123', '456', '789'
|
|
133
|
+
* rettiwt.user.details(['123', '456', '789'])
|
|
134
|
+
* .then(res => {
|
|
135
|
+
* console.log(res); # 'res' is an array of users
|
|
84
136
|
* })
|
|
85
137
|
* .catch(err => {
|
|
86
138
|
* console.log(err);
|
|
87
139
|
* });
|
|
88
140
|
* ```
|
|
89
141
|
*/
|
|
90
|
-
details<T extends string | string[]>(id: T): Promise<T extends string ? User | undefined : User[]>;
|
|
142
|
+
details<T extends string | string[] | undefined>(id: T): Promise<T extends string | undefined ? User | undefined : User[]>;
|
|
91
143
|
/**
|
|
92
144
|
* Follow a user.
|
|
93
145
|
*
|
|
94
|
-
* @param id - The
|
|
146
|
+
* @param id - The ID the user to be followed.
|
|
95
147
|
*
|
|
96
148
|
* @returns Whether following was successful or not.
|
|
97
149
|
*
|
|
98
150
|
* @throws Code 108 if given user id is invalid.
|
|
99
151
|
*
|
|
100
152
|
* @example
|
|
101
|
-
*
|
|
153
|
+
*
|
|
154
|
+
* ```ts
|
|
102
155
|
* import { Rettiwt } from 'rettiwt-api';
|
|
103
156
|
*
|
|
104
157
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -123,7 +176,8 @@ export declare class UserService extends FetcherService {
|
|
|
123
176
|
* @returns - The followed feed of the logged-in user.
|
|
124
177
|
*
|
|
125
178
|
* @example
|
|
126
|
-
*
|
|
179
|
+
*
|
|
180
|
+
* ```ts
|
|
127
181
|
* import { Rettiwt } from 'rettiwt-api';
|
|
128
182
|
*
|
|
129
183
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -145,14 +199,15 @@ export declare class UserService extends FetcherService {
|
|
|
145
199
|
/**
|
|
146
200
|
* Get the list followers of a user.
|
|
147
201
|
*
|
|
148
|
-
* @param id - The
|
|
202
|
+
* @param id - The ID of the target user. If no ID is provided, the logged-in user's ID is used.
|
|
149
203
|
* @param count - The number of followers to fetch, must be \<= 100.
|
|
150
204
|
* @param cursor - The cursor to the batch of followers to fetch.
|
|
151
205
|
*
|
|
152
206
|
* @returns The list of users following the target user.
|
|
153
207
|
*
|
|
154
208
|
* @example
|
|
155
|
-
*
|
|
209
|
+
*
|
|
210
|
+
* ```ts
|
|
156
211
|
* import { Rettiwt } from 'rettiwt-api';
|
|
157
212
|
*
|
|
158
213
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -168,18 +223,19 @@ export declare class UserService extends FetcherService {
|
|
|
168
223
|
* });
|
|
169
224
|
* ```
|
|
170
225
|
*/
|
|
171
|
-
followers(id
|
|
226
|
+
followers(id?: string, count?: number, cursor?: string): Promise<CursoredData<User>>;
|
|
172
227
|
/**
|
|
173
228
|
* Get the list of users who are followed by a user.
|
|
174
229
|
*
|
|
175
|
-
* @param id - The
|
|
230
|
+
* @param id - The ID of the target user. If no ID is provided, the logged-in user's ID is used.
|
|
176
231
|
* @param count - The number of following to fetch, must be \<= 100.
|
|
177
232
|
* @param cursor - The cursor to the batch of following to fetch.
|
|
178
233
|
*
|
|
179
234
|
* @returns The list of users followed by the target user.
|
|
180
235
|
*
|
|
181
236
|
* @example
|
|
182
|
-
*
|
|
237
|
+
*
|
|
238
|
+
* ```ts
|
|
183
239
|
* import { Rettiwt } from 'rettiwt-api';
|
|
184
240
|
*
|
|
185
241
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -195,18 +251,19 @@ export declare class UserService extends FetcherService {
|
|
|
195
251
|
* });
|
|
196
252
|
* ```
|
|
197
253
|
*/
|
|
198
|
-
following(id
|
|
254
|
+
following(id?: string, count?: number, cursor?: string): Promise<CursoredData<User>>;
|
|
199
255
|
/**
|
|
200
256
|
* Get the highlighted tweets of a user.
|
|
201
257
|
*
|
|
202
|
-
* @param id - The
|
|
258
|
+
* @param id - The ID of the target user. If no ID is provided, the logged-in user's ID is used.
|
|
203
259
|
* @param count - The number of followers to fetch, must be \<= 100.
|
|
204
260
|
* @param cursor - The cursor to the batch of followers to fetch.
|
|
205
261
|
*
|
|
206
262
|
* @returns The list of highlighted tweets of the target user.
|
|
207
263
|
*
|
|
208
264
|
* @example
|
|
209
|
-
*
|
|
265
|
+
*
|
|
266
|
+
* ```ts
|
|
210
267
|
* import { Rettiwt } from 'rettiwt-api';
|
|
211
268
|
*
|
|
212
269
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -232,7 +289,8 @@ export declare class UserService extends FetcherService {
|
|
|
232
289
|
* @returns The list of tweets liked by the target user.
|
|
233
290
|
*
|
|
234
291
|
* @example
|
|
235
|
-
*
|
|
292
|
+
*
|
|
293
|
+
* ```ts
|
|
236
294
|
* import { Rettiwt } from 'rettiwt-api';
|
|
237
295
|
*
|
|
238
296
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -252,14 +310,15 @@ export declare class UserService extends FetcherService {
|
|
|
252
310
|
/**
|
|
253
311
|
* Get the media timeline of a user.
|
|
254
312
|
*
|
|
255
|
-
* @param id - The
|
|
313
|
+
* @param id - The ID of the target user. If no ID is provided, the logged-in user's ID is used.
|
|
256
314
|
* @param count - The number of media to fetch, must be \<= 100.
|
|
257
315
|
* @param cursor - The cursor to the batch of media to fetch
|
|
258
316
|
*
|
|
259
317
|
* @returns The media timeline of the target user.
|
|
260
318
|
*
|
|
261
319
|
* @example
|
|
262
|
-
*
|
|
320
|
+
*
|
|
321
|
+
* ```ts
|
|
263
322
|
* import { Rettiwt } from 'rettiwt-api';
|
|
264
323
|
*
|
|
265
324
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -275,7 +334,7 @@ export declare class UserService extends FetcherService {
|
|
|
275
334
|
* });
|
|
276
335
|
* ```
|
|
277
336
|
*/
|
|
278
|
-
media(id
|
|
337
|
+
media(id?: string, count?: number, cursor?: string): Promise<CursoredData<Tweet>>;
|
|
279
338
|
/**
|
|
280
339
|
* Stream notifications of the logged in user in pseudo real-time.
|
|
281
340
|
*
|
|
@@ -284,7 +343,8 @@ export declare class UserService extends FetcherService {
|
|
|
284
343
|
* @returns An async generator that yields new notifications as they are received.
|
|
285
344
|
*
|
|
286
345
|
* @example
|
|
287
|
-
*
|
|
346
|
+
*
|
|
347
|
+
* ```ts
|
|
288
348
|
* import { Rettiwt } from 'rettiwt-api';
|
|
289
349
|
*
|
|
290
350
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -294,7 +354,7 @@ export declare class UserService extends FetcherService {
|
|
|
294
354
|
* async function streamNotifications() {
|
|
295
355
|
* try {
|
|
296
356
|
* // Awaiting for the notifications returned by the AsyncGenerator returned by the method
|
|
297
|
-
* for await (const notification of rettiwt.user.notifications(
|
|
357
|
+
* for await (const notification of rettiwt.user.notifications(5000)) {
|
|
298
358
|
* console.log(notification.message);
|
|
299
359
|
* }
|
|
300
360
|
* }
|
|
@@ -316,7 +376,8 @@ export declare class UserService extends FetcherService {
|
|
|
316
376
|
* @returns - The recommended feed of the logged-in user.
|
|
317
377
|
*
|
|
318
378
|
* @example
|
|
319
|
-
*
|
|
379
|
+
*
|
|
380
|
+
* ```ts
|
|
320
381
|
* import { Rettiwt } from 'rettiwt-api';
|
|
321
382
|
*
|
|
322
383
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -338,14 +399,15 @@ export declare class UserService extends FetcherService {
|
|
|
338
399
|
/**
|
|
339
400
|
* Get the reply timeline of a user.
|
|
340
401
|
*
|
|
341
|
-
* @param id - The
|
|
402
|
+
* @param id - The ID of the target user. If no ID is provided, the logged-in user's ID is used.
|
|
342
403
|
* @param count - The number of replies to fetch, must be \<= 20.
|
|
343
404
|
* @param cursor - The cursor to the batch of replies to fetch.
|
|
344
405
|
*
|
|
345
406
|
* @returns The reply timeline of the target user.
|
|
346
407
|
*
|
|
347
408
|
* @example
|
|
348
|
-
*
|
|
409
|
+
*
|
|
410
|
+
* ```ts
|
|
349
411
|
* import { Rettiwt } from 'rettiwt-api';
|
|
350
412
|
*
|
|
351
413
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -361,20 +423,25 @@ export declare class UserService extends FetcherService {
|
|
|
361
423
|
* });
|
|
362
424
|
* ```
|
|
363
425
|
*
|
|
364
|
-
* @remarks
|
|
426
|
+
* @remarks
|
|
427
|
+
*
|
|
428
|
+
* If the target user has a pinned tweet, the returned reply timeline has one item extra and this is always the pinned tweet.
|
|
365
429
|
*/
|
|
366
|
-
replies(id
|
|
430
|
+
replies(id?: string, count?: number, cursor?: string): Promise<CursoredData<Tweet>>;
|
|
367
431
|
/**
|
|
368
432
|
* Get the list of subscriptions of a user.
|
|
369
433
|
*
|
|
370
|
-
* @
|
|
434
|
+
* @deprecated Currently not working.
|
|
435
|
+
*
|
|
436
|
+
* @param id - The ID of the target user. If no ID is provided, the logged-in user's ID is used.
|
|
371
437
|
* @param count - The number of subscriptions to fetch, must be \<= 100.
|
|
372
438
|
* @param cursor - The cursor to the batch of subscriptions to fetch.
|
|
373
439
|
*
|
|
374
440
|
* @returns The list of subscriptions by the target user.
|
|
375
441
|
*
|
|
376
442
|
* @example
|
|
377
|
-
*
|
|
443
|
+
*
|
|
444
|
+
* ```ts
|
|
378
445
|
* import { Rettiwt } from 'rettiwt-api';
|
|
379
446
|
*
|
|
380
447
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -394,14 +461,15 @@ export declare class UserService extends FetcherService {
|
|
|
394
461
|
/**
|
|
395
462
|
* Get the tweet timeline of a user.
|
|
396
463
|
*
|
|
397
|
-
* @param id - The
|
|
464
|
+
* @param id - The ID of the target user. If no ID is provided, the logged-in user's ID is used.
|
|
398
465
|
* @param count - The number of timeline items to fetch, must be \<= 20.
|
|
399
466
|
* @param cursor - The cursor to the batch of timeline items to fetch.
|
|
400
467
|
*
|
|
401
468
|
* @returns The timeline of the target user.
|
|
402
469
|
*
|
|
403
470
|
* @example
|
|
404
|
-
*
|
|
471
|
+
*
|
|
472
|
+
* ```ts
|
|
405
473
|
* import { Rettiwt } from 'rettiwt-api';
|
|
406
474
|
*
|
|
407
475
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
@@ -418,6 +486,7 @@ export declare class UserService extends FetcherService {
|
|
|
418
486
|
* ```
|
|
419
487
|
*
|
|
420
488
|
* @remarks
|
|
489
|
+
*
|
|
421
490
|
* - If the target user has a pinned tweet, the returned timeline has one item extra and this is always the pinned tweet.
|
|
422
491
|
* - If timeline is fetched without authenticating, then the most popular tweets of the target user are returned instead.
|
|
423
492
|
*/
|
|
@@ -425,14 +494,13 @@ export declare class UserService extends FetcherService {
|
|
|
425
494
|
/**
|
|
426
495
|
* Unfollow a user.
|
|
427
496
|
*
|
|
428
|
-
* @param id - The
|
|
497
|
+
* @param id - The ID the user to be unfollowed.
|
|
429
498
|
*
|
|
430
499
|
* @returns Whether unfollowing was successful or not.
|
|
431
500
|
*
|
|
432
|
-
* @throws Code 34 if given user id is invalid.
|
|
433
|
-
*
|
|
434
501
|
* @example
|
|
435
|
-
*
|
|
502
|
+
*
|
|
503
|
+
* ```ts
|
|
436
504
|
* import { Rettiwt } from 'rettiwt-api';
|
|
437
505
|
*
|
|
438
506
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|