rettiwt-api 3.1.1 → 4.1.0-alpha.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/.github/FUNDING.yml +4 -0
- package/.github/workflows/documentation.yml +5 -0
- package/.github/workflows/publish-alpha.yml +29 -0
- package/.github/workflows/publish.yml +3 -0
- package/.yarnrc.yml +1 -0
- package/README.md +50 -10
- package/dist/collections/Extractors.d.ts +6 -2
- package/dist/collections/Extractors.js +6 -3
- package/dist/collections/Extractors.js.map +1 -1
- package/dist/collections/Groups.js +4 -1
- package/dist/collections/Groups.js.map +1 -1
- package/dist/collections/Requests.js +4 -1
- package/dist/collections/Requests.js.map +1 -1
- package/dist/commands/Tweet.js +73 -41
- package/dist/commands/Tweet.js.map +1 -1
- package/dist/commands/User.js +42 -19
- package/dist/commands/User.js.map +1 -1
- package/dist/enums/Data.d.ts +1 -0
- package/dist/enums/Data.js +1 -0
- package/dist/enums/Data.js.map +1 -1
- package/dist/enums/Resource.d.ts +4 -1
- package/dist/enums/Resource.js +4 -1
- package/dist/enums/Resource.js.map +1 -1
- package/dist/helper/CliUtils.d.ts +2 -0
- package/dist/helper/CliUtils.js +2 -0
- package/dist/helper/CliUtils.js.map +1 -1
- package/dist/helper/JsonUtils.d.ts +2 -0
- package/dist/helper/JsonUtils.js +3 -1
- package/dist/helper/JsonUtils.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/models/args/FetchArgs.d.ts +0 -2
- package/dist/models/args/FetchArgs.js +138 -10
- package/dist/models/args/FetchArgs.js.map +1 -1
- package/dist/models/args/PostArgs.d.ts +3 -1
- package/dist/models/args/PostArgs.js +62 -24
- package/dist/models/args/PostArgs.js.map +1 -1
- package/dist/models/data/CursoredData.d.ts +3 -3
- package/dist/models/data/CursoredData.js +5 -1
- package/dist/models/data/CursoredData.js.map +1 -1
- package/dist/models/data/Notification.d.ts +46 -0
- package/dist/models/data/Notification.js +69 -0
- package/dist/models/data/Notification.js.map +1 -0
- package/dist/models/data/Tweet.d.ts +6 -6
- package/dist/models/data/Tweet.js +1 -1
- package/dist/models/data/Tweet.js.map +1 -1
- package/dist/models/data/User.d.ts +3 -3
- package/dist/models/data/User.js.map +1 -1
- package/dist/services/public/AuthService.d.ts +21 -0
- package/dist/services/public/AuthService.js +44 -1
- package/dist/services/public/AuthService.js.map +1 -1
- package/dist/services/public/FetcherService.d.ts +2 -2
- package/dist/services/public/FetcherService.js +5 -6
- package/dist/services/public/FetcherService.js.map +1 -1
- package/dist/services/public/TweetService.d.ts +55 -32
- package/dist/services/public/TweetService.js +96 -55
- package/dist/services/public/TweetService.js.map +1 -1
- package/dist/services/public/UserService.d.ts +32 -6
- package/dist/services/public/UserService.js +52 -7
- package/dist/services/public/UserService.js.map +1 -1
- package/package.json +3 -2
- package/src/collections/Extractors.ts +10 -3
- package/src/collections/Groups.ts +4 -1
- package/src/collections/Requests.ts +4 -1
- package/src/commands/Tweet.ts +43 -18
- package/src/commands/User.ts +17 -4
- package/src/enums/Data.ts +1 -0
- package/src/enums/Resource.ts +4 -1
- package/src/helper/CliUtils.ts +2 -0
- package/src/helper/JsonUtils.ts +3 -1
- package/src/index.ts +5 -1
- package/src/models/args/FetchArgs.ts +140 -11
- package/src/models/args/PostArgs.ts +65 -24
- package/src/models/data/CursoredData.ts +7 -4
- package/src/models/data/Notification.ts +91 -0
- package/src/models/data/Tweet.ts +6 -7
- package/src/models/data/User.ts +3 -3
- package/src/services/public/AuthService.ts +51 -1
- package/src/services/public/FetcherService.ts +9 -8
- package/src/services/public/TweetService.ts +103 -60
- package/src/services/public/UserService.ts +51 -7
|
@@ -63,6 +63,7 @@ var FetchArgs_1 = require("../../models/args/FetchArgs");
|
|
|
63
63
|
var PostArgs_1 = require("../../models/args/PostArgs");
|
|
64
64
|
var ErrorService_1 = require("../internal/ErrorService");
|
|
65
65
|
var LogService_1 = require("../internal/LogService");
|
|
66
|
+
var AuthService_1 = require("./AuthService");
|
|
66
67
|
/**
|
|
67
68
|
* The base service that handles all HTTP requests.
|
|
68
69
|
*
|
|
@@ -77,7 +78,7 @@ var FetcherService = /** @class */ (function () {
|
|
|
77
78
|
LogService_1.LogService.enabled = (_a = config === null || config === void 0 ? void 0 : config.logging) !== null && _a !== void 0 ? _a : false;
|
|
78
79
|
this.apiKey = config === null || config === void 0 ? void 0 : config.apiKey;
|
|
79
80
|
this.guestKey = config === null || config === void 0 ? void 0 : config.guestKey;
|
|
80
|
-
this.
|
|
81
|
+
this.userId = (config === null || config === void 0 ? void 0 : config.apiKey) ? AuthService_1.AuthService.getUserId(config.apiKey) : undefined;
|
|
81
82
|
this.authProxyUrl = (_b = config === null || config === void 0 ? void 0 : config.authProxyUrl) !== null && _b !== void 0 ? _b : config === null || config === void 0 ? void 0 : config.proxyUrl;
|
|
82
83
|
this.proxyUrl = config === null || config === void 0 ? void 0 : config.proxyUrl;
|
|
83
84
|
this.timeout = (_c = config === null || config === void 0 ? void 0 : config.timeout) !== null && _c !== void 0 ? _c : 0;
|
|
@@ -92,9 +93,9 @@ var FetcherService = /** @class */ (function () {
|
|
|
92
93
|
*/
|
|
93
94
|
FetcherService.prototype.checkAuthorization = function (resource) {
|
|
94
95
|
// Logging
|
|
95
|
-
LogService_1.LogService.log(Logging_1.ELogActions.AUTHORIZATION, { authenticated: this.
|
|
96
|
+
LogService_1.LogService.log(Logging_1.ELogActions.AUTHORIZATION, { authenticated: this.userId != undefined });
|
|
96
97
|
// Checking authorization status
|
|
97
|
-
if (!Groups_1.allowGuestAuthentication.includes(resource) && this.
|
|
98
|
+
if (!Groups_1.allowGuestAuthentication.includes(resource) && this.userId == undefined) {
|
|
98
99
|
throw new Error(Api_1.EApiErrors.RESOURCE_NOT_ALLOWED);
|
|
99
100
|
}
|
|
100
101
|
};
|
|
@@ -105,15 +106,13 @@ var FetcherService = /** @class */ (function () {
|
|
|
105
106
|
*/
|
|
106
107
|
FetcherService.prototype.getCredential = function () {
|
|
107
108
|
return __awaiter(this, void 0, void 0, function () {
|
|
108
|
-
var cookies;
|
|
109
109
|
return __generator(this, function (_a) {
|
|
110
110
|
switch (_a.label) {
|
|
111
111
|
case 0:
|
|
112
112
|
if (!this.apiKey) return [3 /*break*/, 1];
|
|
113
113
|
// Logging
|
|
114
114
|
LogService_1.LogService.log(Logging_1.ELogActions.GET, { target: 'USER_CREDENTIAL' });
|
|
115
|
-
|
|
116
|
-
return [2 /*return*/, new rettiwt_auth_1.AuthCredential(cookies)];
|
|
115
|
+
return [2 /*return*/, new rettiwt_auth_1.AuthCredential(AuthService_1.AuthService.decodeCookie(this.apiKey).split(';'))];
|
|
117
116
|
case 1:
|
|
118
117
|
if (!this.guestKey) return [3 /*break*/, 2];
|
|
119
118
|
// Logging
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetcherService.js","sourceRoot":"","sources":["../../../src/services/public/FetcherService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAqC;AAErC,gDAA0B;AAC1B,uDAAoD;AACpD,6CAAoD;AAEpD,mDAAmG;AACnG,uDAAsD;AACtD,uCAA6C;AAC7C,+CAAkD;AAElD,yDAAwD;AACxD,uDAAsD;AAItD,yDAAwD;AACxD,qDAAoD;AAEpD;;;;GAIG;AACH;IAsBC;;OAEG;IACH,wBAAmB,MAAuB;;QACzC,uBAAU,CAAC,OAAO,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,mCAAI,KAAK,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAC;QACjC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"FetcherService.js","sourceRoot":"","sources":["../../../src/services/public/FetcherService.ts"],"names":[],"mappings":";;;;;;;;;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AG,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAE,CAAC;wBAGpC,UAAU,GAAU,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;wBAG/B,qBAAM,IAAI,CAAC,aAAa,EAAE,EAAA;;wBAAjD,IAAI,GAAmB,SAA0B;wBAGjD,MAAM,GAAG,mBAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC;wBAExC,wCAAwC;wBACxC,MAAM,CAAC,OAAO,yBAAQ,MAAM,CAAC,OAAO,GAAK,IAAI,CAAC,QAAQ,EAAE,CAAE,CAAC;wBAC3D,MAAM,CAAC,SAAS,GAAG,UAAU,CAAC;wBAC9B,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;wBAC/B,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;;;;wBAKrB,qBAAM,IAAA,eAAK,EAAI,MAAM,CAAC,EAAA;;oBAD9B,6BAA6B;oBAC7B,sBAAO,CAAC,SAAsB,CAAC,CAAC,IAAI,EAAC;;;wBAErC,+CAA+C;wBAC/C,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAK,CAAC,CAAC;wBAChC,MAAM,OAAK,CAAC;;;;;KAEb;IACF,qBAAC;AAAD,CAAC,AAvLD,IAuLC;AAvLY,wCAAc"}
|
|
@@ -69,37 +69,6 @@ export declare class TweetService extends FetcherService {
|
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
71
|
like(id: string): Promise<boolean>;
|
|
72
|
-
/**
|
|
73
|
-
* @deprecated
|
|
74
|
-
* The method will be removed in the next release following the removal of the ability to see tweet likers by Twitter.
|
|
75
|
-
* Currently, the method does not work.
|
|
76
|
-
*
|
|
77
|
-
* Get the list of users who liked a tweet.
|
|
78
|
-
*
|
|
79
|
-
* @param id - The id of the target tweet.
|
|
80
|
-
* @param count - The number of likers to fetch, must be \<= 100.
|
|
81
|
-
* @param cursor - The cursor to the batch of likers to fetch.
|
|
82
|
-
*
|
|
83
|
-
* @returns The list of users who liked the given tweet.
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* ```
|
|
87
|
-
* import { Rettiwt } from 'rettiwt-api';
|
|
88
|
-
*
|
|
89
|
-
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
90
|
-
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
91
|
-
*
|
|
92
|
-
* // Fetching the most recent 100 likers of the Tweet with id '1234567890'
|
|
93
|
-
* rettiwt.tweet.likers('1234567890')
|
|
94
|
-
* .then(res => {
|
|
95
|
-
* console.log(res);
|
|
96
|
-
* })
|
|
97
|
-
* .catch(err => {
|
|
98
|
-
* console.log(err);
|
|
99
|
-
* });
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
likers(id: string, count?: number, cursor?: string): Promise<CursoredData<User>>;
|
|
103
72
|
/**
|
|
104
73
|
* Get the list of tweets from a tweet list.
|
|
105
74
|
*
|
|
@@ -134,7 +103,7 @@ export declare class TweetService extends FetcherService {
|
|
|
134
103
|
*
|
|
135
104
|
* @param options - The options describing the tweet to be posted. Check {@link TweetArgs} for available options.
|
|
136
105
|
*
|
|
137
|
-
* @returns
|
|
106
|
+
* @returns The id of the posted tweet.
|
|
138
107
|
*
|
|
139
108
|
* @example
|
|
140
109
|
* Posting a simple text
|
|
@@ -261,6 +230,35 @@ export declare class TweetService extends FetcherService {
|
|
|
261
230
|
* ```
|
|
262
231
|
*/
|
|
263
232
|
retweeters(id: string, count?: number, cursor?: string): Promise<CursoredData<User>>;
|
|
233
|
+
/**
|
|
234
|
+
* Schedule a tweet.
|
|
235
|
+
*
|
|
236
|
+
* @param options - The options describing the tweet to be posted. Check {@link TweetArgs} for available options.
|
|
237
|
+
*
|
|
238
|
+
* @returns The id of the schedule.
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* Scheduling a simple text
|
|
242
|
+
* ```
|
|
243
|
+
* import { Rettiwt } from 'rettiwt-api';
|
|
244
|
+
*
|
|
245
|
+
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
246
|
+
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
247
|
+
*
|
|
248
|
+
* // Scheduling a tweet to posted at 19th of August, 2024, at 11:59:00 AM, in local time
|
|
249
|
+
* rettiwt.tweet.schedule({ text: 'Hello World!', scheduleFor: new Date('2024-08-19 23:59:00') })
|
|
250
|
+
* .then(res => {
|
|
251
|
+
* console.log(res);
|
|
252
|
+
* })
|
|
253
|
+
* .catch(err => {
|
|
254
|
+
* console.log(err);
|
|
255
|
+
* });
|
|
256
|
+
* ```
|
|
257
|
+
*
|
|
258
|
+
* @remarks
|
|
259
|
+
* Scheduling a tweet is similar to {@link post}ing, except that an extra parameter called `scheduleFor` is used.
|
|
260
|
+
*/
|
|
261
|
+
schedule(options: TweetArgs): Promise<string | undefined>;
|
|
264
262
|
/**
|
|
265
263
|
* Search for tweets using a filter.
|
|
266
264
|
*
|
|
@@ -394,6 +392,31 @@ export declare class TweetService extends FetcherService {
|
|
|
394
392
|
* ```
|
|
395
393
|
*/
|
|
396
394
|
unretweet(id: string): Promise<boolean>;
|
|
395
|
+
/**
|
|
396
|
+
* Unschedule a tweet.
|
|
397
|
+
*
|
|
398
|
+
* @param id - The id of the scheduled tweet.
|
|
399
|
+
*
|
|
400
|
+
* @returns Whether unscheduling was successful or not.
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* ```
|
|
404
|
+
* import { Rettiwt } from 'rettiwt-api';
|
|
405
|
+
*
|
|
406
|
+
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
407
|
+
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
408
|
+
*
|
|
409
|
+
* // Unscheduling the Tweet with id '1234567890'
|
|
410
|
+
* rettiwt.tweet.unschedule('1234567890')
|
|
411
|
+
* .then(res => {
|
|
412
|
+
* console.log(res);
|
|
413
|
+
* })
|
|
414
|
+
* .catch(err => {
|
|
415
|
+
* console.log(err);
|
|
416
|
+
* });
|
|
417
|
+
* ```
|
|
418
|
+
*/
|
|
419
|
+
unschedule(id: string): Promise<boolean>;
|
|
397
420
|
/**
|
|
398
421
|
* Upload a media file to Twitter.
|
|
399
422
|
*
|
|
@@ -122,16 +122,24 @@ var TweetService = /** @class */ (function (_super) {
|
|
|
122
122
|
*/
|
|
123
123
|
TweetService.prototype.details = function (id) {
|
|
124
124
|
return __awaiter(this, void 0, void 0, function () {
|
|
125
|
-
var resource, response, data;
|
|
125
|
+
var resource, response, data, response, data;
|
|
126
126
|
return __generator(this, function (_a) {
|
|
127
127
|
switch (_a.label) {
|
|
128
128
|
case 0:
|
|
129
|
-
|
|
129
|
+
if (!(this.userId != undefined)) return [3 /*break*/, 2];
|
|
130
|
+
resource = Resource_1.EResourceType.TWEET_DETAILS_ALT;
|
|
130
131
|
return [4 /*yield*/, this.request(resource, { id: id })];
|
|
131
132
|
case 1:
|
|
132
133
|
response = _a.sent();
|
|
133
134
|
data = Extractors_1.extractors[resource](response, id);
|
|
134
135
|
return [2 /*return*/, data];
|
|
136
|
+
case 2:
|
|
137
|
+
resource = Resource_1.EResourceType.TWEET_DETAILS;
|
|
138
|
+
return [4 /*yield*/, this.request(resource, { id: id })];
|
|
139
|
+
case 3:
|
|
140
|
+
response = _a.sent();
|
|
141
|
+
data = Extractors_1.extractors[resource](response, id);
|
|
142
|
+
return [2 /*return*/, data];
|
|
135
143
|
}
|
|
136
144
|
});
|
|
137
145
|
});
|
|
@@ -179,58 +187,6 @@ var TweetService = /** @class */ (function (_super) {
|
|
|
179
187
|
});
|
|
180
188
|
});
|
|
181
189
|
};
|
|
182
|
-
/**
|
|
183
|
-
* @deprecated
|
|
184
|
-
* The method will be removed in the next release following the removal of the ability to see tweet likers by Twitter.
|
|
185
|
-
* Currently, the method does not work.
|
|
186
|
-
*
|
|
187
|
-
* Get the list of users who liked a tweet.
|
|
188
|
-
*
|
|
189
|
-
* @param id - The id of the target tweet.
|
|
190
|
-
* @param count - The number of likers to fetch, must be \<= 100.
|
|
191
|
-
* @param cursor - The cursor to the batch of likers to fetch.
|
|
192
|
-
*
|
|
193
|
-
* @returns The list of users who liked the given tweet.
|
|
194
|
-
*
|
|
195
|
-
* @example
|
|
196
|
-
* ```
|
|
197
|
-
* import { Rettiwt } from 'rettiwt-api';
|
|
198
|
-
*
|
|
199
|
-
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
200
|
-
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
201
|
-
*
|
|
202
|
-
* // Fetching the most recent 100 likers of the Tweet with id '1234567890'
|
|
203
|
-
* rettiwt.tweet.likers('1234567890')
|
|
204
|
-
* .then(res => {
|
|
205
|
-
* console.log(res);
|
|
206
|
-
* })
|
|
207
|
-
* .catch(err => {
|
|
208
|
-
* console.log(err);
|
|
209
|
-
* });
|
|
210
|
-
* ```
|
|
211
|
-
*/
|
|
212
|
-
TweetService.prototype.likers = function (id, count, cursor) {
|
|
213
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
214
|
-
var resource, response, data;
|
|
215
|
-
return __generator(this, function (_a) {
|
|
216
|
-
switch (_a.label) {
|
|
217
|
-
case 0:
|
|
218
|
-
// Deprecation warning
|
|
219
|
-
console.log("\n\t\t\tThis method has been deprecated following the removal of the ability to see tweet liksers by Twitter.\n\t\t\tCurrently, the method does not work.\n\t\t");
|
|
220
|
-
resource = Resource_1.EResourceType.TWEET_LIKERS;
|
|
221
|
-
return [4 /*yield*/, this.request(resource, {
|
|
222
|
-
id: id,
|
|
223
|
-
count: count,
|
|
224
|
-
cursor: cursor,
|
|
225
|
-
})];
|
|
226
|
-
case 1:
|
|
227
|
-
response = _a.sent();
|
|
228
|
-
data = Extractors_1.extractors[resource](response);
|
|
229
|
-
return [2 /*return*/, data];
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
};
|
|
234
190
|
/**
|
|
235
191
|
* Get the list of tweets from a tweet list.
|
|
236
192
|
*
|
|
@@ -286,7 +242,7 @@ var TweetService = /** @class */ (function (_super) {
|
|
|
286
242
|
*
|
|
287
243
|
* @param options - The options describing the tweet to be posted. Check {@link TweetArgs} for available options.
|
|
288
244
|
*
|
|
289
|
-
* @returns
|
|
245
|
+
* @returns The id of the posted tweet.
|
|
290
246
|
*
|
|
291
247
|
* @example
|
|
292
248
|
* Posting a simple text
|
|
@@ -463,6 +419,50 @@ var TweetService = /** @class */ (function (_super) {
|
|
|
463
419
|
});
|
|
464
420
|
});
|
|
465
421
|
};
|
|
422
|
+
/**
|
|
423
|
+
* Schedule a tweet.
|
|
424
|
+
*
|
|
425
|
+
* @param options - The options describing the tweet to be posted. Check {@link TweetArgs} for available options.
|
|
426
|
+
*
|
|
427
|
+
* @returns The id of the schedule.
|
|
428
|
+
*
|
|
429
|
+
* @example
|
|
430
|
+
* Scheduling a simple text
|
|
431
|
+
* ```
|
|
432
|
+
* import { Rettiwt } from 'rettiwt-api';
|
|
433
|
+
*
|
|
434
|
+
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
435
|
+
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
436
|
+
*
|
|
437
|
+
* // Scheduling a tweet to posted at 19th of August, 2024, at 11:59:00 AM, in local time
|
|
438
|
+
* rettiwt.tweet.schedule({ text: 'Hello World!', scheduleFor: new Date('2024-08-19 23:59:00') })
|
|
439
|
+
* .then(res => {
|
|
440
|
+
* console.log(res);
|
|
441
|
+
* })
|
|
442
|
+
* .catch(err => {
|
|
443
|
+
* console.log(err);
|
|
444
|
+
* });
|
|
445
|
+
* ```
|
|
446
|
+
*
|
|
447
|
+
* @remarks
|
|
448
|
+
* Scheduling a tweet is similar to {@link post}ing, except that an extra parameter called `scheduleFor` is used.
|
|
449
|
+
*/
|
|
450
|
+
TweetService.prototype.schedule = function (options) {
|
|
451
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
452
|
+
var resource, response, data;
|
|
453
|
+
return __generator(this, function (_a) {
|
|
454
|
+
switch (_a.label) {
|
|
455
|
+
case 0:
|
|
456
|
+
resource = Resource_1.EResourceType.TWEET_SCHEDULE;
|
|
457
|
+
return [4 /*yield*/, this.request(resource, { tweet: options })];
|
|
458
|
+
case 1:
|
|
459
|
+
response = _a.sent();
|
|
460
|
+
data = Extractors_1.extractors[resource](response);
|
|
461
|
+
return [2 /*return*/, data];
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
};
|
|
466
466
|
/**
|
|
467
467
|
* Search for tweets using a filter.
|
|
468
468
|
*
|
|
@@ -719,6 +719,47 @@ var TweetService = /** @class */ (function (_super) {
|
|
|
719
719
|
});
|
|
720
720
|
});
|
|
721
721
|
};
|
|
722
|
+
/**
|
|
723
|
+
* Unschedule a tweet.
|
|
724
|
+
*
|
|
725
|
+
* @param id - The id of the scheduled tweet.
|
|
726
|
+
*
|
|
727
|
+
* @returns Whether unscheduling was successful or not.
|
|
728
|
+
*
|
|
729
|
+
* @example
|
|
730
|
+
* ```
|
|
731
|
+
* import { Rettiwt } from 'rettiwt-api';
|
|
732
|
+
*
|
|
733
|
+
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
734
|
+
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
735
|
+
*
|
|
736
|
+
* // Unscheduling the Tweet with id '1234567890'
|
|
737
|
+
* rettiwt.tweet.unschedule('1234567890')
|
|
738
|
+
* .then(res => {
|
|
739
|
+
* console.log(res);
|
|
740
|
+
* })
|
|
741
|
+
* .catch(err => {
|
|
742
|
+
* console.log(err);
|
|
743
|
+
* });
|
|
744
|
+
* ```
|
|
745
|
+
*/
|
|
746
|
+
TweetService.prototype.unschedule = function (id) {
|
|
747
|
+
var _a;
|
|
748
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
749
|
+
var resource, response, data;
|
|
750
|
+
return __generator(this, function (_b) {
|
|
751
|
+
switch (_b.label) {
|
|
752
|
+
case 0:
|
|
753
|
+
resource = Resource_1.EResourceType.TWEET_UNSCHEDULE;
|
|
754
|
+
return [4 /*yield*/, this.request(resource, { id: id })];
|
|
755
|
+
case 1:
|
|
756
|
+
response = _b.sent();
|
|
757
|
+
data = (_a = Extractors_1.extractors[resource](response)) !== null && _a !== void 0 ? _a : false;
|
|
758
|
+
return [2 /*return*/, data];
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
});
|
|
762
|
+
};
|
|
722
763
|
/**
|
|
723
764
|
* Upload a media file to Twitter.
|
|
724
765
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TweetService.js","sourceRoot":"","sources":["../../../src/services/public/TweetService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yBAA8B;
|
|
1
|
+
{"version":3,"file":"TweetService.js","sourceRoot":"","sources":["../../../src/services/public/TweetService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yBAA8B;AAoB9B,2DAA0D;AAC1D,iDAAqD;AAOrD,mDAAkD;AAElD;;;;GAIG;AACH;IAAkC,gCAAc;IAC/C;;;;OAIG;IACH,sBAAmB,MAAuB;eACzC,kBAAM,MAAM,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACU,8BAAO,GAApB,UAAqB,EAAU;;;;;;6BAI1B,CAAA,IAAI,CAAC,MAAM,IAAI,SAAS,CAAA,EAAxB,wBAAwB;wBAC3B,QAAQ,GAAG,wBAAa,CAAC,iBAAiB,CAAC;wBAG1B,qBAAM,IAAI,CAAC,OAAO,CAAwB,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAA;;wBAA1E,QAAQ,GAAG,SAA+D;wBAG1E,IAAI,GAAG,uBAAU,CAAC,QAAQ,CAA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oredData } from '../../models/data/CursoredData';
|
|
2
|
+
import { Notification } from '../../models/data/Notification';
|
|
2
3
|
import { Tweet } from '../../models/data/Tweet';
|
|
3
4
|
import { User } from '../../models/data/User';
|
|
4
5
|
import { IRettiwtConfig } from '../../types/RettiwtConfig';
|
|
@@ -197,9 +198,8 @@ export declare class UserService extends FetcherService {
|
|
|
197
198
|
*/
|
|
198
199
|
highlights(id: string, count?: number, cursor?: string): Promise<CursoredData<Tweet>>;
|
|
199
200
|
/**
|
|
200
|
-
* Get the list of tweets liked by
|
|
201
|
+
* Get the list of tweets liked by the logged in user.
|
|
201
202
|
*
|
|
202
|
-
* @param id - The id of the target user.
|
|
203
203
|
* @param count - The number of likes to fetch, must be \<= 100.
|
|
204
204
|
* @param cursor - The cursor to the batch of likes to fetch.
|
|
205
205
|
*
|
|
@@ -212,8 +212,8 @@ export declare class UserService extends FetcherService {
|
|
|
212
212
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
213
213
|
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
214
214
|
*
|
|
215
|
-
* // Fetching the most recent 100 liked Tweets of the
|
|
216
|
-
* rettiwt.user.likes(
|
|
215
|
+
* // Fetching the most recent 100 liked Tweets of the logged in User
|
|
216
|
+
* rettiwt.user.likes()
|
|
217
217
|
* .then(res => {
|
|
218
218
|
* console.log(res);
|
|
219
219
|
* })
|
|
@@ -222,9 +222,9 @@ export declare class UserService extends FetcherService {
|
|
|
222
222
|
* });
|
|
223
223
|
* ```
|
|
224
224
|
*/
|
|
225
|
-
likes(
|
|
225
|
+
likes(count?: number, cursor?: string): Promise<CursoredData<Tweet>>;
|
|
226
226
|
/**
|
|
227
|
-
* Get the media timeline of a user
|
|
227
|
+
* Get the media timeline of a user.
|
|
228
228
|
*
|
|
229
229
|
* @param id - The id of the target user.
|
|
230
230
|
* @param count - The number of media to fetch, must be \<= 100.
|
|
@@ -250,6 +250,32 @@ export declare class UserService extends FetcherService {
|
|
|
250
250
|
* ```
|
|
251
251
|
*/
|
|
252
252
|
media(id: string, count?: number, cursor?: string): Promise<CursoredData<Tweet>>;
|
|
253
|
+
/**
|
|
254
|
+
* Get the list of notifications of the logged in user.
|
|
255
|
+
*
|
|
256
|
+
* @param count - The number of notifications to fetch, must be \<= 40.
|
|
257
|
+
* @param cursor - The cursor to the batch of notifications to fetch
|
|
258
|
+
*
|
|
259
|
+
* @returns The list of notifications of the target user.
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* ```
|
|
263
|
+
* import { Rettiwt } from 'rettiwt-api';
|
|
264
|
+
*
|
|
265
|
+
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
266
|
+
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
267
|
+
*
|
|
268
|
+
* // Fetching the recent 40 Notifications of the logged in user
|
|
269
|
+
* rettiwt.user.notifications(40)
|
|
270
|
+
* .then(res => {
|
|
271
|
+
* console.log(res);
|
|
272
|
+
* })
|
|
273
|
+
* .catch(err => {
|
|
274
|
+
* console.log(err);
|
|
275
|
+
* });
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
278
|
+
notifications(count?: number, cursor?: string): Promise<CursoredData<Notification>>;
|
|
253
279
|
/**
|
|
254
280
|
* Get the recommended feed of the logged in user.
|
|
255
281
|
*
|
|
@@ -364,9 +364,8 @@ var UserService = /** @class */ (function (_super) {
|
|
|
364
364
|
});
|
|
365
365
|
};
|
|
366
366
|
/**
|
|
367
|
-
* Get the list of tweets liked by
|
|
367
|
+
* Get the list of tweets liked by the logged in user.
|
|
368
368
|
*
|
|
369
|
-
* @param id - The id of the target user.
|
|
370
369
|
* @param count - The number of likes to fetch, must be \<= 100.
|
|
371
370
|
* @param cursor - The cursor to the batch of likes to fetch.
|
|
372
371
|
*
|
|
@@ -379,8 +378,8 @@ var UserService = /** @class */ (function (_super) {
|
|
|
379
378
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
380
379
|
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
381
380
|
*
|
|
382
|
-
* // Fetching the most recent 100 liked Tweets of the
|
|
383
|
-
* rettiwt.user.likes(
|
|
381
|
+
* // Fetching the most recent 100 liked Tweets of the logged in User
|
|
382
|
+
* rettiwt.user.likes()
|
|
384
383
|
* .then(res => {
|
|
385
384
|
* console.log(res);
|
|
386
385
|
* })
|
|
@@ -389,7 +388,7 @@ var UserService = /** @class */ (function (_super) {
|
|
|
389
388
|
* });
|
|
390
389
|
* ```
|
|
391
390
|
*/
|
|
392
|
-
UserService.prototype.likes = function (
|
|
391
|
+
UserService.prototype.likes = function (count, cursor) {
|
|
393
392
|
return __awaiter(this, void 0, void 0, function () {
|
|
394
393
|
var resource, response, data;
|
|
395
394
|
return __generator(this, function (_a) {
|
|
@@ -397,7 +396,7 @@ var UserService = /** @class */ (function (_super) {
|
|
|
397
396
|
case 0:
|
|
398
397
|
resource = Resource_1.EResourceType.USER_LIKES;
|
|
399
398
|
return [4 /*yield*/, this.request(resource, {
|
|
400
|
-
id:
|
|
399
|
+
id: this.userId,
|
|
401
400
|
count: count,
|
|
402
401
|
cursor: cursor,
|
|
403
402
|
})];
|
|
@@ -410,7 +409,7 @@ var UserService = /** @class */ (function (_super) {
|
|
|
410
409
|
});
|
|
411
410
|
};
|
|
412
411
|
/**
|
|
413
|
-
* Get the media timeline of a user
|
|
412
|
+
* Get the media timeline of a user.
|
|
414
413
|
*
|
|
415
414
|
* @param id - The id of the target user.
|
|
416
415
|
* @param count - The number of media to fetch, must be \<= 100.
|
|
@@ -455,6 +454,52 @@ var UserService = /** @class */ (function (_super) {
|
|
|
455
454
|
});
|
|
456
455
|
});
|
|
457
456
|
};
|
|
457
|
+
/**
|
|
458
|
+
* Get the list of notifications of the logged in user.
|
|
459
|
+
*
|
|
460
|
+
* @param count - The number of notifications to fetch, must be \<= 40.
|
|
461
|
+
* @param cursor - The cursor to the batch of notifications to fetch
|
|
462
|
+
*
|
|
463
|
+
* @returns The list of notifications of the target user.
|
|
464
|
+
*
|
|
465
|
+
* @example
|
|
466
|
+
* ```
|
|
467
|
+
* import { Rettiwt } from 'rettiwt-api';
|
|
468
|
+
*
|
|
469
|
+
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
470
|
+
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
471
|
+
*
|
|
472
|
+
* // Fetching the recent 40 Notifications of the logged in user
|
|
473
|
+
* rettiwt.user.notifications(40)
|
|
474
|
+
* .then(res => {
|
|
475
|
+
* console.log(res);
|
|
476
|
+
* })
|
|
477
|
+
* .catch(err => {
|
|
478
|
+
* console.log(err);
|
|
479
|
+
* });
|
|
480
|
+
* ```
|
|
481
|
+
*/
|
|
482
|
+
UserService.prototype.notifications = function (count, cursor) {
|
|
483
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
484
|
+
var resource, response, data;
|
|
485
|
+
return __generator(this, function (_a) {
|
|
486
|
+
switch (_a.label) {
|
|
487
|
+
case 0:
|
|
488
|
+
resource = Resource_1.EResourceType.USER_NOTIFICATIONS;
|
|
489
|
+
return [4 /*yield*/, this.request(resource, {
|
|
490
|
+
count: count,
|
|
491
|
+
cursor: cursor,
|
|
492
|
+
})];
|
|
493
|
+
case 1:
|
|
494
|
+
response = _a.sent();
|
|
495
|
+
data = Extractors_1.extractors[resource](response);
|
|
496
|
+
// Sorting the notifications by time, from recent to oldest
|
|
497
|
+
data.list.sort(function (a, b) { return new Date(b.receivedAt).valueOf() - new Date(a.receivedAt).valueOf(); });
|
|
498
|
+
return [2 /*return*/, data];
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
};
|
|
458
503
|
/**
|
|
459
504
|
* Get the recommended feed of the logged in user.
|
|
460
505
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserService.js","sourceRoot":"","sources":["../../../src/services/public/UserService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;wBACzB,QAAQ,GAAG,wBAAa,CAAC,aAAa,CAAC;wBAG5B,qBAAM,IAAI,CAAC,OAAO,CAAwB,wBAAa,CAAC,aAAa,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAA;;wBAA7F,QAAQ,GAAG,SAAkF;wBAG7F,IAAI,GAAG,MAAA,uBAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,mCAAI,KAAK,CAAC;wBAErD,sBAAO,IAAI,EAAC;;;;KACZ;IACF,kBAAC;AAAD,CAAC,AAvmBD,CAAiC,+BAAc,GAumB9C;AAvmBY,kCAAW"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rettiwt-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0-alpha.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"description": "An API for fetching data from TwitterAPI, without any rate limits!",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"url": "https://github.com/Rishikant181/Rettiwt-API/issues"
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://rishikant181.github.io/Rettiwt-API/",
|
|
31
|
+
"packageManager": "yarn@4.4.0",
|
|
31
32
|
"dependencies": {
|
|
32
33
|
"axios": "1.6.3",
|
|
33
34
|
"chalk": "4.1.2",
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
"commander": "11.1.0",
|
|
36
37
|
"https-proxy-agent": "7.0.2",
|
|
37
38
|
"rettiwt-auth": "2.1.0",
|
|
38
|
-
"rettiwt-core": "4.
|
|
39
|
+
"rettiwt-core": "4.3.0-alpha.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@types/node": "20.4.1",
|