rettiwt-api 1.1.5 → 1.1.8
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/dist/graphql/enums/Errors.d.ts +1 -0
- package/dist/graphql/enums/Errors.js +1 -0
- package/dist/graphql/enums/Errors.js.map +1 -1
- package/dist/graphql/resolvers/UserResolver.d.ts +9 -0
- package/dist/graphql/resolvers/UserResolver.js +61 -0
- package/dist/graphql/resolvers/UserResolver.js.map +1 -1
- package/dist/graphql/types/UserTypes.js +1 -1
- package/dist/graphql/types/UserTypes.js.map +1 -1
- package/dist/requests/payloads/Variables.d.ts +23 -0
- package/dist/requests/payloads/Variables.js +24 -0
- package/dist/requests/payloads/Variables.js.map +1 -0
- package/dist/services/auth/AccountService.d.ts +6 -11
- package/dist/services/auth/AccountService.js +91 -71
- package/dist/services/auth/AccountService.js.map +1 -1
- package/dist/services/data/TweetService.d.ts +1 -1
- package/dist/services/data/TweetService.js +1 -1
- package/dist/services/data/TweetService.js.map +1 -1
- package/dist/services/data/UserService.d.ts +15 -0
- package/dist/services/data/UserService.js +33 -0
- package/dist/services/data/UserService.js.map +1 -1
- package/dist/services/helper/extractors/Users.d.ts +6 -0
- package/dist/services/helper/extractors/Users.js +53 -1
- package/dist/services/helper/extractors/Users.js.map +1 -1
- package/dist/services/helper/urls/Users.d.ts +8 -1
- package/dist/services/helper/urls/Users.js +12 -2
- package/dist/services/helper/urls/Users.js.map +1 -1
- package/dist/types/Query.d.ts +80 -0
- package/dist/types/Query.js +3 -0
- package/dist/types/Query.js.map +1 -0
- package/dist/types/raw/data/tweet/Favouriters.d.ts +164 -0
- package/dist/types/raw/data/tweet/Favouriters.js +3 -0
- package/dist/types/raw/data/tweet/Favouriters.js.map +1 -0
- package/dist/types/raw/data/tweet/Retweeters.d.ts +171 -0
- package/dist/types/raw/data/tweet/Retweeters.js +3 -0
- package/dist/types/raw/data/tweet/Retweeters.js.map +1 -0
- package/dist/types/raw/data/tweet/Tweet.d.ts +746 -0
- package/dist/types/raw/data/tweet/Tweet.js +3 -0
- package/dist/types/raw/data/tweet/Tweet.js.map +1 -0
- package/dist/types/raw/data/tweet/Tweets.d.ts +386 -0
- package/dist/types/raw/data/tweet/Tweets.js +3 -0
- package/dist/types/raw/data/tweet/Tweets.js.map +1 -0
- package/dist/types/raw/data/user/Followers.d.ts +176 -0
- package/dist/types/raw/data/user/Followers.js +3 -0
- package/dist/types/raw/data/user/Followers.js.map +1 -0
- package/dist/types/raw/data/user/Following.d.ts +176 -0
- package/dist/types/raw/data/user/Following.js +3 -0
- package/dist/types/raw/data/user/Following.js.map +1 -0
- package/dist/types/raw/data/user/Likes.d.ts +1059 -0
- package/dist/types/raw/data/user/Likes.js +3 -0
- package/dist/types/raw/data/user/Likes.js.map +1 -0
- package/dist/types/raw/data/user/User.d.ts +117 -0
- package/dist/types/raw/data/user/User.js +3 -0
- package/dist/types/raw/data/user/User.js.map +1 -0
- package/dist/types/raw/query/tweet/Details.d.ts +80 -0
- package/dist/types/raw/query/tweet/Details.js +5 -0
- package/dist/types/raw/query/tweet/Details.js.map +1 -0
- package/dist/types/raw/query/tweet/Engagements.d.ts +29 -0
- package/dist/types/raw/query/tweet/Engagements.js +3 -0
- package/dist/types/raw/query/tweet/Engagements.js.map +1 -0
- package/dist/types/raw/query/tweet/Likes.d.ts +29 -0
- package/dist/types/raw/query/tweet/Likes.js +3 -0
- package/dist/types/raw/query/tweet/Likes.js.map +1 -0
- package/dist/types/raw/query/tweet/Retweets.d.ts +29 -0
- package/dist/types/raw/query/tweet/Retweets.js +3 -0
- package/dist/types/raw/query/tweet/Retweets.js.map +1 -0
- package/dist/types/raw/query/tweet/Search.d.ts +40 -0
- package/dist/types/raw/query/tweet/Search.js +3 -0
- package/dist/types/raw/query/tweet/Search.js.map +1 -0
- package/dist/types/raw/query/tweet/TweetLike.d.ts +29 -0
- package/dist/types/raw/query/tweet/TweetLike.js +3 -0
- package/dist/types/raw/query/tweet/TweetLike.js.map +1 -0
- package/dist/types/raw/query/tweet/TweetLikes.d.ts +29 -0
- package/dist/types/raw/query/tweet/TweetLikes.js +3 -0
- package/dist/types/raw/query/tweet/TweetLikes.js.map +1 -0
- package/dist/types/raw/query/tweet/TweetRetweets.d.ts +0 -0
- package/dist/types/raw/query/tweet/TweetRetweets.js +2 -0
- package/dist/types/raw/query/tweet/TweetRetweets.js.map +1 -0
- package/dist/types/raw/query/user/Details.d.ts +34 -0
- package/dist/types/raw/query/user/Details.js +3 -0
- package/dist/types/raw/query/user/Details.js.map +1 -0
- package/dist/types/raw/user/Tweets.d.ts +668 -1584
- package/dist/types/raw/user/User.js.map +1 -1
- package/package.json +2 -2
- package/src/graphql/enums/Errors.ts +1 -0
- package/src/graphql/resolvers/UserResolver.ts +58 -1
- package/src/graphql/types/UserTypes.ts +3 -3
- package/src/services/auth/AccountService.ts +79 -53
- package/src/services/data/TweetService.ts +5 -5
- package/src/services/data/UserService.ts +34 -0
- package/src/services/helper/extractors/Users.ts +55 -0
- package/src/services/helper/urls/Users.ts +39 -23
- package/src/types/raw/user/Tweets.ts +1747 -0
- package/docs/.nojekyll +0 -1
- package/docs/assets/highlight.css +0 -64
- package/docs/assets/main.js +0 -58
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1280
- package/docs/classes/AccountService.html +0 -303
- package/docs/classes/AuthCookie.html +0 -146
- package/docs/classes/AuthService.html +0 -147
- package/docs/classes/CacheService.html +0 -157
- package/docs/classes/Cursor.html +0 -102
- package/docs/classes/CursoredData.html +0 -126
- package/docs/classes/DataValidationError.html +0 -119
- package/docs/classes/FetcherService.html +0 -225
- package/docs/classes/Tweet.html +0 -210
- package/docs/classes/TweetEntities.html +0 -128
- package/docs/classes/TweetFilter.html +0 -204
- package/docs/classes/TweetListArgs.html +0 -118
- package/docs/classes/TweetService.html +0 -313
- package/docs/classes/User.html +0 -230
- package/docs/classes/UserListArgs.html +0 -118
- package/docs/classes/UserService.html +0 -315
- package/docs/enums/HttpMethods.html +0 -74
- package/docs/functions/Rettiwt.html +0 -99
- package/docs/index.html +0 -161
- package/docs/interfaces/IAuthCookie.html +0 -104
- package/docs/interfaces/ICursor.html +0 -77
- package/docs/interfaces/ICursoredData.html +0 -93
- package/docs/interfaces/IDataContext.html +0 -91
- package/docs/interfaces/IListArgs.html +0 -87
- package/docs/interfaces/ITweet.html +0 -176
- package/docs/interfaces/ITweetEntities.html +0 -104
- package/docs/interfaces/ITweetFilter.html +0 -158
- package/docs/interfaces/IUser.html +0 -194
- package/docs/modules.html +0 -109
|
@@ -145,6 +145,39 @@ var UserService = /** @class */ (function (_super) {
|
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* @param userId The rest id of the target user.
|
|
150
|
+
* @param count The number of tweets to fetch, must be >= 40 (when no cursor is provided) and <=100.
|
|
151
|
+
* @param cursor The cursor to next batch. If blank, first batch is fetched.
|
|
152
|
+
*
|
|
153
|
+
* @returns The list of tweets nade by the target user.
|
|
154
|
+
*
|
|
155
|
+
* @throws {@link Errors.ValidationErrors.InvalidCount} error, if invalid count has been provided.
|
|
156
|
+
* @throws {@link Errors.DataErrors.UserNotFound} error, if invalid count has been provided.
|
|
157
|
+
*
|
|
158
|
+
* @remarks
|
|
159
|
+
*
|
|
160
|
+
* No cookies are required to use this method.
|
|
161
|
+
*/
|
|
162
|
+
UserService.prototype.getUserTweets = function (userId, count, cursor) {
|
|
163
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
164
|
+
var args, res, data, tweets;
|
|
165
|
+
return __generator(this, function (_a) {
|
|
166
|
+
switch (_a.label) {
|
|
167
|
+
case 0:
|
|
168
|
+
args = new UserListArgs_1.UserListArgs(count, cursor);
|
|
169
|
+
return [4 /*yield*/, this.request(UserUrls.userTweetsUrl(userId, args.count, args.cursor), false).then(function (res) { return res.data; })];
|
|
170
|
+
case 1:
|
|
171
|
+
res = _a.sent();
|
|
172
|
+
data = UserExtractors.extractUserTweets(res);
|
|
173
|
+
// Caching data
|
|
174
|
+
this.cacheData(data);
|
|
175
|
+
tweets = data.required.map(function (item) { return new Tweet_1.Tweet(item); });
|
|
176
|
+
return [2 /*return*/, new CursoredData_1.CursoredData(tweets, data.cursor)];
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
};
|
|
148
181
|
/**
|
|
149
182
|
* @param userId The rest id of the target user.
|
|
150
183
|
* @param count The number of following to fetch, must be >= 40 (when no cursor is provided) and <=100.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserService.js","sourceRoot":"","sources":["../../../src/services/data/UserService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,WAAW;AACX,yDAAwD;AAGxD,SAAS;AACT,+CAA8C;AAC9C,+DAA8D;AAC9D,iDAAgD;AAEhD,QAAQ;AACR,+DAA8D;
|
|
1
|
+
{"version":3,"file":"UserService.js","sourceRoot":"","sources":["../../../src/services/data/UserService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,WAAW;AACX,yDAAwD;AAGxD,SAAS;AACT,+CAA8C;AAC9C,+DAA8D;AAC9D,iDAAgD;AAEhD,QAAQ;AACR,+DAA8D;AAQ9D,QAAQ;AACR,6CAA0D;AAE1D,OAAO;AACP,6DAAiD;AAEjD,aAAa;AACb,yEAA6D;AAE7D;;GAEG;AACH;IAAiC,+BAAc;IAC3C;;OAEG;IACH,qBAAY,IAAiB;eACzB,kBAAM,IAAI,CAAC;IACf,CAAC;IAED;;;;;;;;;;OAUG;IACG,oCAAc,GAApB,UAAqB,EAAU;;;;;;6BAIvB,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAjB,wBAAiB;wBAEX,qBAAM,IAAI,CAAC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BAG/C,qBAAM,IAAI,CAAC,OAAO,CAAe,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,IAAI,EAAR,CAAQ,CAAC,EAAA;;wBAApH,GAAG,GAAG,SAA8G;wBAGpH,IAAI,GAAG,cAAc,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;wBAEhD,eAAe;wBACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;wBAGjB,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,IAAe,IAAK,OAAA,IAAI,aAAK,CAAC,IAAI,CAAC,EAAf,CAAe,CAAC,CAAC;wBAErE,sBAAO,IAAI,2BAAY,CAAQ,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,EAAC;;;;KACvD;IACL,kBAAC;AAAD,CAAC,AAxMD,CAAiC,+BAAc,GAwM9C;AAxMY,kCAAW;AAwMvB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IDataExtract } from '../../../types/Resolvers';
|
|
2
2
|
import RawUser from '../../../types/raw/user/User';
|
|
3
|
+
import RawUserTweets from '../../../types/raw/user/Tweets';
|
|
3
4
|
import RawUserFollowers from '../../../types/raw/user/Followers';
|
|
4
5
|
import RawUserFollowing from '../../../types/raw/user/Following';
|
|
5
6
|
import RawUserLikes from '../../../types/raw/user/Likes';
|
|
@@ -8,6 +9,11 @@ import RawUserLikes from '../../../types/raw/user/Likes';
|
|
|
8
9
|
* @param res The raw response received from Twitter
|
|
9
10
|
*/
|
|
10
11
|
export declare function extractUserDetails(res: RawUser): IDataExtract;
|
|
12
|
+
/**
|
|
13
|
+
* @returns The raw user tweet data formatted and sorted into required and additional data
|
|
14
|
+
* @param res The raw response received from Twitter
|
|
15
|
+
*/
|
|
16
|
+
export declare function extractUserTweets(res: RawUserTweets): IDataExtract;
|
|
11
17
|
/**
|
|
12
18
|
* @returns The raw user following/followers data formatted and sorted into required and additional data
|
|
13
19
|
* @param res The raw response received from TwitterAPI
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
exports.__esModule = true;
|
|
26
|
-
exports.extractUserLikes = exports.extractUserFollow = exports.extractUserDetails = void 0;
|
|
26
|
+
exports.extractUserLikes = exports.extractUserFollow = exports.extractUserTweets = exports.extractUserDetails = void 0;
|
|
27
27
|
var Errors_1 = require("../../../enums/Errors");
|
|
28
28
|
// PARSERS
|
|
29
29
|
var Parsers = __importStar(require("../Parser"));
|
|
@@ -53,6 +53,58 @@ function extractUserDetails(res) {
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
exports.extractUserDetails = extractUserDetails;
|
|
56
|
+
/**
|
|
57
|
+
* @returns The raw user tweet data formatted and sorted into required and additional data
|
|
58
|
+
* @param res The raw response received from Twitter
|
|
59
|
+
*/
|
|
60
|
+
function extractUserTweets(res) {
|
|
61
|
+
var required = []; // To store the reqruied raw data
|
|
62
|
+
var cursor = ''; // To store the cursor to next batch
|
|
63
|
+
var users = []; // To store additional user data
|
|
64
|
+
var tweets = []; // To store additional tweet data
|
|
65
|
+
// If user does not exist
|
|
66
|
+
if (Parsers.isJSONEmpty(res.data.user)) {
|
|
67
|
+
throw new Error(Errors_1.DataErrors.UserNotFound);
|
|
68
|
+
}
|
|
69
|
+
// Extracting the raw list
|
|
70
|
+
res.data.user.result.timeline_v2.timeline.instructions.forEach(function (item) {
|
|
71
|
+
var _a;
|
|
72
|
+
if (item.type === 'TimelineAddEntries') {
|
|
73
|
+
// If no tweets found
|
|
74
|
+
if (((_a = item.entries) === null || _a === void 0 ? void 0 : _a.length) == 2) {
|
|
75
|
+
// Returning the data
|
|
76
|
+
return {
|
|
77
|
+
required: required,
|
|
78
|
+
cursor: cursor,
|
|
79
|
+
users: users,
|
|
80
|
+
tweets: tweets
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
// Destructuring data
|
|
84
|
+
item.entries.forEach(function (entry) {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
// If entry is of type tweet and tweet exists
|
|
87
|
+
if (entry.entryId.indexOf('tweet') != -1 && ((_a = entry.content.itemContent) === null || _a === void 0 ? void 0 : _a.tweet_results.result.__typename) === 'Tweet') {
|
|
88
|
+
required.push(entry.content.itemContent.tweet_results.result);
|
|
89
|
+
users.push(entry.content.itemContent.tweet_results.result.core.user_results.result);
|
|
90
|
+
tweets.push(entry.content.itemContent.tweet_results.result);
|
|
91
|
+
}
|
|
92
|
+
// If entry is of type cursor
|
|
93
|
+
else if (entry.entryId.indexOf('cursor-bottom') != -1) {
|
|
94
|
+
cursor = (_b = entry.content.value) !== null && _b !== void 0 ? _b : '';
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
// Returning the data
|
|
100
|
+
return {
|
|
101
|
+
required: required,
|
|
102
|
+
cursor: cursor,
|
|
103
|
+
users: users,
|
|
104
|
+
tweets: tweets
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
exports.extractUserTweets = extractUserTweets;
|
|
56
108
|
/**
|
|
57
109
|
* @returns The raw user following/followers data formatted and sorted into required and additional data
|
|
58
110
|
* @param res The raw response received from TwitterAPI
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Users.js","sourceRoot":"","sources":["../../../../src/services/helper/extractors/Users.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,gDAAmD;
|
|
1
|
+
{"version":3,"file":"Users.js","sourceRoot":"","sources":["../../../../src/services/helper/extractors/Users.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,gDAAmD;AAOnD,UAAU;AACV,iDAAqC;AAErC;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,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WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,UAAA,IAAI;YAC/D,IAAI,IAAI,CAAC,IAAI,KAAK,oBAAoB,EAAE;gBACpC,qBAAqB;gBACrB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAA,KAAK;;oBACtB,6CAA6C;oBAC7C,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAA,MAAA,KAAK,CAAC,OAAO,CAAC,WAAW,0CAAE,aAAa,CAAC,MAAM,CAAC,UAAU,MAAK,OAAO,EAAE;wBAChH,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;wBAC9D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;wBACpF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;qBAC/D;oBACD,6BAA6B;yBACxB,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,EAAE;wBACnD,MAAM,GAAG,MAAA,KAAK,CAAC,OAAO,CAAC,KAAK,mCAAI,EAAE,CAAC;qBACtC;gBACL,CAAC,CAAC,CAAC;aACN;QACL,CAAC,CAAC,CAAC;KACN;IAED,qBAAqB;IACrB,OAAO;QACH,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,MAAM;KACjB,CAAC;AACN,CAAC;AAxCD,4CAwCC"}
|
|
@@ -9,7 +9,14 @@ export declare function userDetailsUrl(screenName: string): string;
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function userDetailsByIdUrl(restId: string): string;
|
|
11
11
|
/**
|
|
12
|
-
* @returns The url for fetching the list of
|
|
12
|
+
* @returns The url for fetching the list of tweet made by target user.
|
|
13
|
+
* @param userId The rest id of the target user
|
|
14
|
+
* @param count The batch size of the list of tweets, should be >= 40 and <=100
|
|
15
|
+
* @param cursor The cursor to next batch
|
|
16
|
+
*/
|
|
17
|
+
export declare function userTweetsUrl(userId: string, count: number, cursor: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* @returns The url for fetching the list of users followed by target user.
|
|
13
20
|
* @param userId The rest id of the target user
|
|
14
21
|
* @param count The batch size of the list of following, should be >= 40 and <=100
|
|
15
22
|
* @param cursor The cursor to next batch
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.userLikesUrl = exports.userFollowersUrl = exports.userFollowingUrl = exports.userDetailsByIdUrl = exports.userDetailsUrl = void 0;
|
|
3
|
+
exports.userLikesUrl = exports.userFollowersUrl = exports.userFollowingUrl = exports.userTweetsUrl = exports.userDetailsByIdUrl = exports.userDetailsUrl = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* @returns The url for fetching user account details.
|
|
6
6
|
* @param screenName The screen name of the target user
|
|
@@ -18,7 +18,17 @@ function userDetailsByIdUrl(restId) {
|
|
|
18
18
|
}
|
|
19
19
|
exports.userDetailsByIdUrl = userDetailsByIdUrl;
|
|
20
20
|
/**
|
|
21
|
-
* @returns The url for fetching the list of
|
|
21
|
+
* @returns The url for fetching the list of tweet made by target user.
|
|
22
|
+
* @param userId The rest id of the target user
|
|
23
|
+
* @param count The batch size of the list of tweets, should be >= 40 and <=100
|
|
24
|
+
* @param cursor The cursor to next batch
|
|
25
|
+
*/
|
|
26
|
+
function userTweetsUrl(userId, count, cursor) {
|
|
27
|
+
return "https://api.twitter.com/graphql/xxLjoOBBPpYBHbBTI-hevQ/UserTweetsAndReplies?variables=%7B%22userId%22%3A%22".concat(userId, "%22%2C%22count%22%3A").concat(count, "%2C%22cursor%22%3A%22").concat(cursor, "%22%2C%22includePromotedContent%22%3Atrue%2C%22withCommunity%22%3Atrue%2C%22withSuperFollowsUserFields%22%3Atrue%2C%22withDownvotePerspective%22%3Afalse%2C%22withReactionsMetadata%22%3Afalse%2C%22withReactionsPerspective%22%3Afalse%2C%22withSuperFollowsTweetFields%22%3Atrue%2C%22withVoice%22%3Atrue%2C%22withV2Timeline%22%3Atrue%7D&features=%7B%22responsive_web_twitter_blue_verified_badge_is_enabled%22%3Atrue%2C%22verified_phone_label_enabled%22%3Atrue%2C%22responsive_web_graphql_timeline_navigation_enabled%22%3Atrue%2C%22view_counts_public_visibility_enabled%22%3Atrue%2C%22longform_notetweets_consumption_enabled%22%3Afalse%2C%22tweetypie_unmention_optimization_enabled%22%3Atrue%2C%22vibe_api_enabled%22%3Atrue%2C%22responsive_web_edit_tweet_api_enabled%22%3Atrue%2C%22graphql_is_translatable_rweb_tweet_is_translatable_enabled%22%3Atrue%2C%22view_counts_everywhere_api_enabled%22%3Atrue%2C%22standardized_nudges_misinfo%22%3Atrue%2C%22tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled%22%3Afalse%2C%22interactive_text_enabled%22%3Atrue%2C%22responsive_web_text_conversations_enabled%22%3Afalse%2C%22responsive_web_enhance_cards_enabled%22%3Afalse%7D");
|
|
28
|
+
}
|
|
29
|
+
exports.userTweetsUrl = userTweetsUrl;
|
|
30
|
+
/**
|
|
31
|
+
* @returns The url for fetching the list of users followed by target user.
|
|
22
32
|
* @param userId The rest id of the target user
|
|
23
33
|
* @param count The batch size of the list of following, should be >= 40 and <=100
|
|
24
34
|
* @param cursor The cursor to next batch
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Users.js","sourceRoot":"","sources":["../../../../src/services/helper/urls/Users.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAgB,cAAc,CAAC,UAAkB;
|
|
1
|
+
{"version":3,"file":"Users.js","sourceRoot":"","sources":["../../../../src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
|
4
|
+
userId?: string;
|
|
5
|
+
screen_name?: string;
|
|
6
|
+
count?: number;
|
|
7
|
+
cursor?: string;
|
|
8
|
+
referrer: string;
|
|
9
|
+
with_rux_injections: boolean;
|
|
10
|
+
includePromotedContent: boolean;
|
|
11
|
+
withCommunity: boolean;
|
|
12
|
+
withQuickPromoteEligibilityTweetFields: boolean;
|
|
13
|
+
withBirdwatchNotes: boolean;
|
|
14
|
+
withSuperFollowsUserFields: boolean;
|
|
15
|
+
withDownvotePerspective: boolean;
|
|
16
|
+
withReactionsMetadata: boolean;
|
|
17
|
+
withReactionsPerspective: boolean;
|
|
18
|
+
withSuperFollowsTweetFields: boolean;
|
|
19
|
+
withClientEventToken: boolean;
|
|
20
|
+
withVoice: boolean;
|
|
21
|
+
withV2Timeline: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface IFeatures {
|
|
24
|
+
responsive_web_twitter_blue_verified_badge_is_enabled: boolean;
|
|
25
|
+
verified_phone_label_enabled: boolean;
|
|
26
|
+
responsive_web_graphql_timeline_navigation_enabled: boolean;
|
|
27
|
+
view_counts_public_visibility_enabled: boolean;
|
|
28
|
+
longform_notetweets_consumption_enabled: boolean;
|
|
29
|
+
tweetypie_unmention_optimization_enabled: boolean;
|
|
30
|
+
responsive_web_uc_gql_enabled: boolean;
|
|
31
|
+
vibe_api_enabled: boolean;
|
|
32
|
+
responsive_web_edit_tweet_api_enabled: boolean;
|
|
33
|
+
graphql_is_translatable_rweb_tweet_is_translatable_enabled: boolean;
|
|
34
|
+
view_counts_everywhere_api_enabled: boolean;
|
|
35
|
+
standardized_nudges_misinfo: boolean;
|
|
36
|
+
tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled: boolean;
|
|
37
|
+
interactive_text_enabled: boolean;
|
|
38
|
+
responsive_web_text_conversations_enabled: boolean;
|
|
39
|
+
responsive_web_enhance_cards_enabled: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface IParams {
|
|
42
|
+
cards_platform: string;
|
|
43
|
+
count: number;
|
|
44
|
+
cursor: string;
|
|
45
|
+
ext: string;
|
|
46
|
+
include_blocked_by: number;
|
|
47
|
+
include_blocking: number;
|
|
48
|
+
include_can_dm: number;
|
|
49
|
+
include_can_media_tag: number;
|
|
50
|
+
include_cards: number;
|
|
51
|
+
include_entities: boolean;
|
|
52
|
+
include_ext_alt_text: boolean;
|
|
53
|
+
include_ext_collab_control: boolean;
|
|
54
|
+
include_ext_edit_control: boolean;
|
|
55
|
+
include_ext_has_nft_avatar: number;
|
|
56
|
+
include_ext_is_blue_verified: number;
|
|
57
|
+
include_ext_limited_action_results: boolean;
|
|
58
|
+
include_ext_media_availability: boolean;
|
|
59
|
+
include_ext_media_color: boolean;
|
|
60
|
+
include_ext_sensitive_media_warning: boolean;
|
|
61
|
+
include_ext_trusted_friends_metadata: boolean;
|
|
62
|
+
include_ext_verified_type: number;
|
|
63
|
+
include_ext_views: boolean;
|
|
64
|
+
include_followed_by: number;
|
|
65
|
+
include_mute_edge: number;
|
|
66
|
+
include_profile_interstitial_type: number;
|
|
67
|
+
include_quote_count: boolean;
|
|
68
|
+
include_reply_count: number;
|
|
69
|
+
include_user_entities: boolean;
|
|
70
|
+
include_want_retweets: number;
|
|
71
|
+
pc: number;
|
|
72
|
+
q: string;
|
|
73
|
+
query_source: string;
|
|
74
|
+
send_error_codes: boolean;
|
|
75
|
+
simple_quoted_tweet: boolean;
|
|
76
|
+
skip_status: number;
|
|
77
|
+
spelling_corrections: number;
|
|
78
|
+
tweet_mode: string;
|
|
79
|
+
tweet_search_mode: string;
|
|
80
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Query.js","sourceRoot":"","sources":["../../src/types/Query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
export default interface Root {
|
|
2
|
+
data: Data;
|
|
3
|
+
}
|
|
4
|
+
export interface Data {
|
|
5
|
+
favoriters_timeline: FavoritersTimeline;
|
|
6
|
+
}
|
|
7
|
+
export interface FavoritersTimeline {
|
|
8
|
+
timeline: Timeline;
|
|
9
|
+
}
|
|
10
|
+
export interface Timeline {
|
|
11
|
+
instructions: Instruction[];
|
|
12
|
+
responseObjects: ResponseObjects;
|
|
13
|
+
}
|
|
14
|
+
export interface Instruction {
|
|
15
|
+
type: string;
|
|
16
|
+
entries: Entry[];
|
|
17
|
+
}
|
|
18
|
+
export interface Entry {
|
|
19
|
+
entryId: string;
|
|
20
|
+
sortIndex: string;
|
|
21
|
+
content: Content;
|
|
22
|
+
}
|
|
23
|
+
export interface Content {
|
|
24
|
+
entryType: string;
|
|
25
|
+
itemContent?: ItemContent;
|
|
26
|
+
value?: string;
|
|
27
|
+
cursorType?: string;
|
|
28
|
+
stopOnEmptyResponse?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface ItemContent {
|
|
31
|
+
itemType: string;
|
|
32
|
+
user_results: UserResults;
|
|
33
|
+
userDisplayType: string;
|
|
34
|
+
}
|
|
35
|
+
export interface UserResults {
|
|
36
|
+
result: Result;
|
|
37
|
+
}
|
|
38
|
+
export interface Result {
|
|
39
|
+
__typename: string;
|
|
40
|
+
id: string;
|
|
41
|
+
rest_id: string;
|
|
42
|
+
affiliates_highlighted_label: AffiliatesHighlightedLabel;
|
|
43
|
+
has_nft_avatar: boolean;
|
|
44
|
+
legacy: Legacy;
|
|
45
|
+
professional?: Professional;
|
|
46
|
+
super_follow_eligible: boolean;
|
|
47
|
+
super_followed_by: boolean;
|
|
48
|
+
super_following: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface AffiliatesHighlightedLabel {
|
|
51
|
+
}
|
|
52
|
+
export interface Legacy {
|
|
53
|
+
blocked_by: boolean;
|
|
54
|
+
blocking: boolean;
|
|
55
|
+
can_dm: boolean;
|
|
56
|
+
can_media_tag: boolean;
|
|
57
|
+
created_at: string;
|
|
58
|
+
default_profile: boolean;
|
|
59
|
+
default_profile_image: boolean;
|
|
60
|
+
description: string;
|
|
61
|
+
entities: Entities;
|
|
62
|
+
fast_followers_count: number;
|
|
63
|
+
favourites_count: number;
|
|
64
|
+
follow_request_sent: boolean;
|
|
65
|
+
followed_by: boolean;
|
|
66
|
+
followers_count: number;
|
|
67
|
+
following: boolean;
|
|
68
|
+
friends_count: number;
|
|
69
|
+
has_custom_timelines: boolean;
|
|
70
|
+
is_translator: boolean;
|
|
71
|
+
listed_count: number;
|
|
72
|
+
location: string;
|
|
73
|
+
media_count: number;
|
|
74
|
+
muting: boolean;
|
|
75
|
+
name: string;
|
|
76
|
+
normal_followers_count: number;
|
|
77
|
+
notifications: boolean;
|
|
78
|
+
pinned_tweet_ids_str: string[];
|
|
79
|
+
possibly_sensitive: boolean;
|
|
80
|
+
profile_banner_extensions?: ProfileBannerExtensions;
|
|
81
|
+
profile_banner_url?: string;
|
|
82
|
+
profile_image_extensions?: ProfileImageExtensions;
|
|
83
|
+
profile_image_url_https: string;
|
|
84
|
+
profile_interstitial_type: string;
|
|
85
|
+
protected: boolean;
|
|
86
|
+
screen_name: string;
|
|
87
|
+
statuses_count: number;
|
|
88
|
+
translator_type: string;
|
|
89
|
+
url?: string;
|
|
90
|
+
verified: boolean;
|
|
91
|
+
want_retweets: boolean;
|
|
92
|
+
withheld_in_countries: any[];
|
|
93
|
+
}
|
|
94
|
+
export interface Entities {
|
|
95
|
+
description: Description;
|
|
96
|
+
url?: Url;
|
|
97
|
+
}
|
|
98
|
+
export interface Description {
|
|
99
|
+
urls: any[];
|
|
100
|
+
}
|
|
101
|
+
export interface Url {
|
|
102
|
+
urls: Url2[];
|
|
103
|
+
}
|
|
104
|
+
export interface Url2 {
|
|
105
|
+
display_url: string;
|
|
106
|
+
expanded_url: string;
|
|
107
|
+
url: string;
|
|
108
|
+
indices: number[];
|
|
109
|
+
}
|
|
110
|
+
export interface ProfileBannerExtensions {
|
|
111
|
+
mediaColor: MediaColor;
|
|
112
|
+
}
|
|
113
|
+
export interface MediaColor {
|
|
114
|
+
r: R;
|
|
115
|
+
}
|
|
116
|
+
export interface R {
|
|
117
|
+
ok: Ok;
|
|
118
|
+
}
|
|
119
|
+
export interface Ok {
|
|
120
|
+
palette: Palette[];
|
|
121
|
+
}
|
|
122
|
+
export interface Palette {
|
|
123
|
+
percentage: number;
|
|
124
|
+
rgb: Rgb;
|
|
125
|
+
}
|
|
126
|
+
export interface Rgb {
|
|
127
|
+
blue: number;
|
|
128
|
+
green: number;
|
|
129
|
+
red: number;
|
|
130
|
+
}
|
|
131
|
+
export interface ProfileImageExtensions {
|
|
132
|
+
mediaColor: MediaColor2;
|
|
133
|
+
}
|
|
134
|
+
export interface MediaColor2 {
|
|
135
|
+
r: R2;
|
|
136
|
+
}
|
|
137
|
+
export interface R2 {
|
|
138
|
+
ok: Ok2;
|
|
139
|
+
}
|
|
140
|
+
export interface Ok2 {
|
|
141
|
+
palette: Palette2[];
|
|
142
|
+
}
|
|
143
|
+
export interface Palette2 {
|
|
144
|
+
percentage: number;
|
|
145
|
+
rgb: Rgb2;
|
|
146
|
+
}
|
|
147
|
+
export interface Rgb2 {
|
|
148
|
+
blue: number;
|
|
149
|
+
green: number;
|
|
150
|
+
red: number;
|
|
151
|
+
}
|
|
152
|
+
export interface Professional {
|
|
153
|
+
rest_id: string;
|
|
154
|
+
professional_type: string;
|
|
155
|
+
category: Category[];
|
|
156
|
+
}
|
|
157
|
+
export interface Category {
|
|
158
|
+
id: number;
|
|
159
|
+
name: string;
|
|
160
|
+
}
|
|
161
|
+
export interface ResponseObjects {
|
|
162
|
+
feedbackActions: any[];
|
|
163
|
+
immediateReactions: any[];
|
|
164
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Favouriters.js","sourceRoot":"","sources":["../../../../../src/types/raw/data/tweet/Favouriters.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
export default interface Root {
|
|
2
|
+
data: Data;
|
|
3
|
+
}
|
|
4
|
+
export interface Data {
|
|
5
|
+
retweeters_timeline: RetweetersTimeline;
|
|
6
|
+
}
|
|
7
|
+
export interface RetweetersTimeline {
|
|
8
|
+
timeline: Timeline;
|
|
9
|
+
}
|
|
10
|
+
export interface Timeline {
|
|
11
|
+
instructions: Instruction[];
|
|
12
|
+
responseObjects: ResponseObjects;
|
|
13
|
+
}
|
|
14
|
+
export interface Instruction {
|
|
15
|
+
type: string;
|
|
16
|
+
entries: Entry[];
|
|
17
|
+
}
|
|
18
|
+
export interface Entry {
|
|
19
|
+
entryId: string;
|
|
20
|
+
sortIndex: string;
|
|
21
|
+
content: Content;
|
|
22
|
+
}
|
|
23
|
+
export interface Content {
|
|
24
|
+
entryType: string;
|
|
25
|
+
itemContent?: ItemContent;
|
|
26
|
+
value?: string;
|
|
27
|
+
cursorType?: string;
|
|
28
|
+
stopOnEmptyResponse?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface ItemContent {
|
|
31
|
+
itemType: string;
|
|
32
|
+
user_results: UserResults;
|
|
33
|
+
userDisplayType: string;
|
|
34
|
+
}
|
|
35
|
+
export interface UserResults {
|
|
36
|
+
result: Result;
|
|
37
|
+
}
|
|
38
|
+
export interface Result {
|
|
39
|
+
__typename: string;
|
|
40
|
+
id?: string;
|
|
41
|
+
rest_id?: string;
|
|
42
|
+
affiliates_highlighted_label?: AffiliatesHighlightedLabel;
|
|
43
|
+
has_nft_avatar?: boolean;
|
|
44
|
+
legacy?: Legacy;
|
|
45
|
+
super_follow_eligible?: boolean;
|
|
46
|
+
super_followed_by?: boolean;
|
|
47
|
+
super_following?: boolean;
|
|
48
|
+
professional?: Professional;
|
|
49
|
+
reason?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface AffiliatesHighlightedLabel {
|
|
52
|
+
}
|
|
53
|
+
export interface Legacy {
|
|
54
|
+
blocked_by: boolean;
|
|
55
|
+
blocking: boolean;
|
|
56
|
+
can_dm: boolean;
|
|
57
|
+
can_media_tag: boolean;
|
|
58
|
+
created_at: string;
|
|
59
|
+
default_profile: boolean;
|
|
60
|
+
default_profile_image: boolean;
|
|
61
|
+
description: string;
|
|
62
|
+
entities: Entities;
|
|
63
|
+
fast_followers_count: number;
|
|
64
|
+
favourites_count: number;
|
|
65
|
+
follow_request_sent: boolean;
|
|
66
|
+
followed_by: boolean;
|
|
67
|
+
followers_count: number;
|
|
68
|
+
following: boolean;
|
|
69
|
+
friends_count: number;
|
|
70
|
+
has_custom_timelines: boolean;
|
|
71
|
+
is_translator: boolean;
|
|
72
|
+
listed_count: number;
|
|
73
|
+
location: string;
|
|
74
|
+
media_count: number;
|
|
75
|
+
muting: boolean;
|
|
76
|
+
name: string;
|
|
77
|
+
normal_followers_count: number;
|
|
78
|
+
notifications: boolean;
|
|
79
|
+
pinned_tweet_ids_str: string[];
|
|
80
|
+
possibly_sensitive: boolean;
|
|
81
|
+
profile_banner_extensions?: ProfileBannerExtensions;
|
|
82
|
+
profile_banner_url?: string;
|
|
83
|
+
profile_image_extensions: ProfileImageExtensions;
|
|
84
|
+
profile_image_url_https: string;
|
|
85
|
+
profile_interstitial_type: string;
|
|
86
|
+
protected: boolean;
|
|
87
|
+
screen_name: string;
|
|
88
|
+
statuses_count: number;
|
|
89
|
+
translator_type: string;
|
|
90
|
+
verified: boolean;
|
|
91
|
+
want_retweets: boolean;
|
|
92
|
+
withheld_in_countries: any[];
|
|
93
|
+
url?: string;
|
|
94
|
+
}
|
|
95
|
+
export interface Entities {
|
|
96
|
+
description: Description;
|
|
97
|
+
url?: Url2;
|
|
98
|
+
}
|
|
99
|
+
export interface Description {
|
|
100
|
+
urls: Url[];
|
|
101
|
+
}
|
|
102
|
+
export interface Url {
|
|
103
|
+
display_url: string;
|
|
104
|
+
expanded_url: string;
|
|
105
|
+
url: string;
|
|
106
|
+
indices: number[];
|
|
107
|
+
}
|
|
108
|
+
export interface Url2 {
|
|
109
|
+
urls: Url3[];
|
|
110
|
+
}
|
|
111
|
+
export interface Url3 {
|
|
112
|
+
display_url: string;
|
|
113
|
+
expanded_url: string;
|
|
114
|
+
url: string;
|
|
115
|
+
indices: number[];
|
|
116
|
+
}
|
|
117
|
+
export interface ProfileBannerExtensions {
|
|
118
|
+
mediaColor: MediaColor;
|
|
119
|
+
}
|
|
120
|
+
export interface MediaColor {
|
|
121
|
+
r: R;
|
|
122
|
+
}
|
|
123
|
+
export interface R {
|
|
124
|
+
ok: Ok;
|
|
125
|
+
}
|
|
126
|
+
export interface Ok {
|
|
127
|
+
palette: Palette[];
|
|
128
|
+
}
|
|
129
|
+
export interface Palette {
|
|
130
|
+
percentage: number;
|
|
131
|
+
rgb: Rgb;
|
|
132
|
+
}
|
|
133
|
+
export interface Rgb {
|
|
134
|
+
blue: number;
|
|
135
|
+
green: number;
|
|
136
|
+
red: number;
|
|
137
|
+
}
|
|
138
|
+
export interface ProfileImageExtensions {
|
|
139
|
+
mediaColor: MediaColor2;
|
|
140
|
+
}
|
|
141
|
+
export interface MediaColor2 {
|
|
142
|
+
r: R2;
|
|
143
|
+
}
|
|
144
|
+
export interface R2 {
|
|
145
|
+
ok: Ok2;
|
|
146
|
+
}
|
|
147
|
+
export interface Ok2 {
|
|
148
|
+
palette: Palette2[];
|
|
149
|
+
}
|
|
150
|
+
export interface Palette2 {
|
|
151
|
+
percentage: number;
|
|
152
|
+
rgb: Rgb2;
|
|
153
|
+
}
|
|
154
|
+
export interface Rgb2 {
|
|
155
|
+
blue: number;
|
|
156
|
+
green: number;
|
|
157
|
+
red: number;
|
|
158
|
+
}
|
|
159
|
+
export interface Professional {
|
|
160
|
+
rest_id: string;
|
|
161
|
+
professional_type: string;
|
|
162
|
+
category: Category[];
|
|
163
|
+
}
|
|
164
|
+
export interface Category {
|
|
165
|
+
id: number;
|
|
166
|
+
name: string;
|
|
167
|
+
}
|
|
168
|
+
export interface ResponseObjects {
|
|
169
|
+
feedbackActions: any[];
|
|
170
|
+
immediateReactions: any[];
|
|
171
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Retweeters.js","sourceRoot":"","sources":["../../../../../src/types/raw/data/tweet/Retweeters.ts"],"names":[],"mappings":""}
|