rettiwt-api 3.1.1 → 4.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/.github/FUNDING.yml +4 -0
- package/.github/workflows/documentation.yml +5 -0
- package/.github/workflows/publish.yml +3 -0
- package/.yarnrc.yml +1 -0
- package/README.md +50 -10
- package/dist/collections/Extractors.d.ts +4 -2
- package/dist/collections/Extractors.js +3 -3
- package/dist/collections/Extractors.js.map +1 -1
- package/dist/collections/Groups.js +3 -1
- package/dist/collections/Groups.js.map +1 -1
- package/dist/collections/Requests.js +3 -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 +3 -4
- package/dist/commands/User.js.map +1 -1
- package/dist/enums/Resource.d.ts +3 -1
- package/dist/enums/Resource.js +3 -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 +2 -0
- 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 +126 -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/Tweet.d.ts +3 -3
- package/dist/models/data/Tweet.js +1 -1
- package/dist/models/data/Tweet.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 +4 -5
- package/dist/services/public/UserService.js +5 -6
- package/dist/services/public/UserService.js.map +1 -1
- package/package.json +3 -2
- package/src/collections/Extractors.ts +6 -3
- package/src/collections/Groups.ts +3 -1
- package/src/collections/Requests.ts +3 -1
- package/src/commands/Tweet.ts +43 -18
- package/src/commands/User.ts +3 -4
- package/src/enums/Resource.ts +3 -1
- package/src/helper/CliUtils.ts +2 -0
- package/src/helper/JsonUtils.ts +2 -0
- package/src/index.ts +5 -1
- package/src/models/args/FetchArgs.ts +128 -11
- package/src/models/args/PostArgs.ts +65 -24
- package/src/models/data/Tweet.ts +4 -4
- 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 +5 -6
|
@@ -53,6 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
54
|
exports.AuthService = void 0;
|
|
55
55
|
var rettiwt_auth_1 = require("rettiwt-auth");
|
|
56
|
+
var Api_1 = require("../../enums/Api");
|
|
56
57
|
var FetcherService_1 = require("./FetcherService");
|
|
57
58
|
/**
|
|
58
59
|
* The services that handles authentication.
|
|
@@ -69,6 +70,48 @@ var AuthService = /** @class */ (function (_super) {
|
|
|
69
70
|
function AuthService(config) {
|
|
70
71
|
return _super.call(this, config) || this;
|
|
71
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Decodes the encoded cookie string.
|
|
75
|
+
*
|
|
76
|
+
* @param encodedCookies - The encoded cookie string to decode.
|
|
77
|
+
* @returns The decoded cookie string.
|
|
78
|
+
*/
|
|
79
|
+
AuthService.decodeCookie = function (encodedCookies) {
|
|
80
|
+
// Decoding the encoded cookie string
|
|
81
|
+
var decodedCookies = Buffer.from(encodedCookies, 'base64').toString('ascii');
|
|
82
|
+
return decodedCookies;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Encodes the given cookie string.
|
|
86
|
+
*
|
|
87
|
+
* @param cookieString - The cookie string to encode.
|
|
88
|
+
* @returns The encoded cookie string.
|
|
89
|
+
*/
|
|
90
|
+
AuthService.encodeCookie = function (cookieString) {
|
|
91
|
+
// Encoding the cookie string to base64
|
|
92
|
+
var encodedCookies = Buffer.from(cookieString).toString('base64');
|
|
93
|
+
return encodedCookies;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Gets the user's id from the given API key.
|
|
97
|
+
*
|
|
98
|
+
* @param apiKey - The API key.
|
|
99
|
+
* @returns The user id associated with the API key.
|
|
100
|
+
*/
|
|
101
|
+
AuthService.getUserId = function (apiKey) {
|
|
102
|
+
// Getting the cookie string from the API key
|
|
103
|
+
var cookieString = AuthService.decodeCookie(apiKey);
|
|
104
|
+
// Searching for the user id in the cookie string
|
|
105
|
+
var searchResults = cookieString.match(/((?<=twid="u=)(.*)(?="))|((?<=twid=u%3D)(.*)(?=;))/);
|
|
106
|
+
// If user id was found
|
|
107
|
+
if (searchResults) {
|
|
108
|
+
return searchResults[0];
|
|
109
|
+
}
|
|
110
|
+
// If user id was not found
|
|
111
|
+
else {
|
|
112
|
+
throw new Error(Api_1.EApiErrors.BAD_AUTHENTICATION);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
72
115
|
/**
|
|
73
116
|
* Login to twitter as guest.
|
|
74
117
|
*
|
|
@@ -150,7 +193,7 @@ var AuthService = /** @class */ (function (_super) {
|
|
|
150
193
|
case 1:
|
|
151
194
|
apiKey = (_a = (_b.sent()).toHeader().cookie) !== null && _a !== void 0 ? _a : '';
|
|
152
195
|
// Converting the credentials to base64 string
|
|
153
|
-
apiKey =
|
|
196
|
+
apiKey = AuthService.encodeCookie(apiKey);
|
|
154
197
|
return [2 /*return*/, apiKey];
|
|
155
198
|
}
|
|
156
199
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthService.js","sourceRoot":"","sources":["../../../src/services/public/AuthService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAoC;
|
|
1
|
+
{"version":3,"file":"AuthService.js","sourceRoot":"","sources":["../../../src/services/public/AuthService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAoC;AAEpC,uCAA6C;AAG7C,mDAAkD;AAElD;;;;GAIG;AACH;IAAiC,+BAAc;IAC9C;;;;OAIG;IACH,qBAAmB,MAAuB;eACzC,kBAAM,MAAM,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACW,wBAAY,GAA1B,UAA2B,cAAsB;QAChD,qCAAqC;QACrC,IAAM,cAAc,GAAW,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAEvF,OAAO,cAAc,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACW,wBAAY,GAA1B,UAA2B,YAAoB;QAC9C,uCAAuC;QACvC,IAAM,cAAc,GAAW,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAE5E,OAAO,cAAc,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACW,qBAAS,GAAvB,UAAwB,MAAc;QACrC,6CAA6C;QAC7C,IAAM,YAAY,GAAW,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAE9D,iDAAiD;QACjD,IAAM,aAAa,GAAoB,YAAY,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;QAEhH,uBAAuB;QACvB,IAAI,aAAa,EAAE;YAClB,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC;SACxB;QACD,2BAA2B;aACtB;YACJ,MAAM,IAAI,KAAK,CAAC,gBAAU,CAAC,kBAAkB,CAAC,CAAC;SAC/C;IACF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACU,2BAAK,GAAlB;;;;;;4BAE2B,qBAAM,IAAI,mBAAI,EAAE,CAAC,kBAAkB,EAAE,EAAA;;wBAAzD,QAAQ,GAAW,MAAA,CAAC,SAAqC,CAAC,CAAC,UAAU,mCAAI,EAAE;wBAEjF,sBAAO,QAAQ,EAAC;;;;KAChB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACU,2BAAK,GAAlB,UAAmB,KAAa,EAAE,QAAgB,EAAE,QAAgB;;;;;;4BAIjE,qBAAM,IAAI,mBAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,iBAAiB,CAAC;4BACjE,KAAK,EAAE,KAAK;4BACZ,QAAQ,EAAE,QAAQ;4BAClB,QAAQ,EAAE,QAAQ;yBAClB,CAAC,EAAA;;wBANA,MAAM,GACT,MAAC,CACA,SAIE,CACF,CAAC,QAAQ,EAAE,CAAC,MAAiB,mCAAI,EAAE;wBAErC,8CAA8C;wBAC9C,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;wBAE1C,sBAAO,MAAM,EAAC;;;;KACd;IACF,kBAAC;AAAD,CAAC,AAvID,CAAiC,+BAAc,GAuI9C;AAvIY,kCAAW"}
|
|
@@ -14,14 +14,14 @@ export declare class FetcherService {
|
|
|
14
14
|
private readonly errorHandler;
|
|
15
15
|
/** The guest key to use for authenticating against Twitter API as guest. */
|
|
16
16
|
private readonly guestKey?;
|
|
17
|
-
/** Whether the instance is authenticated or not. */
|
|
18
|
-
private readonly isAuthenticated;
|
|
19
17
|
/** The URL To the proxy server to use for all others. */
|
|
20
18
|
private readonly proxyUrl?;
|
|
21
19
|
/** The max wait time for a response. */
|
|
22
20
|
private readonly timeout;
|
|
23
21
|
/** The URL to the proxy server to use only for authentication. */
|
|
24
22
|
protected readonly authProxyUrl?: URL;
|
|
23
|
+
/** The id of the authenticated user (if any). */
|
|
24
|
+
protected readonly userId?: string;
|
|
25
25
|
/**
|
|
26
26
|
* @param config - The config object for configuring the Rettiwt instance.
|
|
27
27
|
*/
|
|
@@ -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;;QACz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@@ 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;I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CAAC,EAAA;;wBADpG,SAAS;wBACT,SAAoG,CAAC;wBAErG,WAAW;wBACX,qBAAM,IAAI,CAAC,OAAO,CAAU,wBAAa,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAA;;wBADxF,WAAW;wBACX,SAAwF,CAAC;wBAEzF,sBAAO,EAAE,EAAC;;;;KACV;IACF,mBAAC;AAAD,CAAC,AAppBD,CAAkC,+BAAc,GAopB/C;AAppBY,oCAAY"}
|
|
@@ -197,9 +197,8 @@ export declare class UserService extends FetcherService {
|
|
|
197
197
|
*/
|
|
198
198
|
highlights(id: string, count?: number, cursor?: string): Promise<CursoredData<Tweet>>;
|
|
199
199
|
/**
|
|
200
|
-
* Get the list of tweets liked by
|
|
200
|
+
* Get the list of tweets liked by the logged in user.
|
|
201
201
|
*
|
|
202
|
-
* @param id - The id of the target user.
|
|
203
202
|
* @param count - The number of likes to fetch, must be \<= 100.
|
|
204
203
|
* @param cursor - The cursor to the batch of likes to fetch.
|
|
205
204
|
*
|
|
@@ -212,8 +211,8 @@ export declare class UserService extends FetcherService {
|
|
|
212
211
|
* // Creating a new Rettiwt instance using the given 'API_KEY'
|
|
213
212
|
* const rettiwt = new Rettiwt({ apiKey: API_KEY });
|
|
214
213
|
*
|
|
215
|
-
* // Fetching the most recent 100 liked Tweets of the
|
|
216
|
-
* rettiwt.user.likes(
|
|
214
|
+
* // Fetching the most recent 100 liked Tweets of the logged in User
|
|
215
|
+
* rettiwt.user.likes()
|
|
217
216
|
* .then(res => {
|
|
218
217
|
* console.log(res);
|
|
219
218
|
* })
|
|
@@ -222,7 +221,7 @@ export declare class UserService extends FetcherService {
|
|
|
222
221
|
* });
|
|
223
222
|
* ```
|
|
224
223
|
*/
|
|
225
|
-
likes(
|
|
224
|
+
likes(count?: number, cursor?: string): Promise<CursoredData<Tweet>>;
|
|
226
225
|
/**
|
|
227
226
|
* Get the media timeline of a user
|
|
228
227
|
*
|
|
@@ -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
|
})];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserService.js","sourceRoot":"","sources":["../../../src/services/public/UserService.ts"],"names":[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AC;wBAErD,sBAAO,IAAI,EAAC;;;;KACZ;IACF,kBAAC;AAAD,CAAC,AA5jBD,CAAiC,+BAAc,GA4jB9C;AA5jBY,kCAAW"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rettiwt-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.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.2.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@types/node": "20.4.1",
|