rettiwt-api 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-docs.yml +27 -0
- package/README.md +3 -1
- package/dist/Test.d.ts +0 -0
- package/dist/Test.js +2 -0
- package/dist/Test.js.map +1 -0
- package/dist/index.d.ts +16 -5
- package/dist/index.js +22 -8
- package/dist/index.js.map +1 -1
- package/dist/models/graphql/Global.d.ts +4 -0
- package/dist/models/graphql/Global.js +13 -0
- package/dist/models/graphql/Global.js.map +1 -0
- package/dist/models/graphql/TweetTypes.d.ts +6 -0
- package/dist/models/graphql/TweetTypes.js +156 -0
- package/dist/models/graphql/TweetTypes.js.map +1 -0
- package/dist/models/graphql/UserTypes.d.ts +3 -0
- package/dist/models/graphql/UserTypes.js +139 -0
- package/dist/models/graphql/UserTypes.js.map +1 -0
- package/dist/queries/RootQuery.d.ts +4 -0
- package/dist/queries/RootQuery.js +70 -0
- package/dist/queries/RootQuery.js.map +1 -0
- package/dist/resolvers/AccountResolver.d.ts +12 -0
- package/dist/resolvers/AccountResolver.js +84 -0
- package/dist/resolvers/AccountResolver.js.map +1 -0
- package/dist/resolvers/ResolverBase.d.ts +5 -0
- package/dist/resolvers/ResolverBase.js +11 -0
- package/dist/resolvers/ResolverBase.js.map +1 -0
- package/dist/resolvers/TweetResolver.d.ts +54 -0
- package/dist/resolvers/TweetResolver.js +332 -0
- package/dist/resolvers/TweetResolver.js.map +1 -0
- package/dist/resolvers/UserResolver.d.ts +38 -0
- package/dist/resolvers/UserResolver.js +253 -0
- package/dist/resolvers/UserResolver.js.map +1 -0
- package/dist/services/AuthService.d.ts +6 -2
- package/dist/services/AuthService.js +4 -3
- package/dist/services/AuthService.js.map +1 -1
- package/dist/services/CacheService.d.ts +12 -7
- package/dist/services/CacheService.js +12 -7
- package/dist/services/CacheService.js.map +1 -1
- package/dist/services/FetcherService.d.ts +32 -12
- package/dist/services/FetcherService.js +45 -14
- package/dist/services/FetcherService.js.map +1 -1
- package/dist/services/accounts/AccountService.d.ts +23 -6
- package/dist/services/accounts/AccountService.js +34 -9
- package/dist/services/accounts/AccountService.js.map +1 -1
- package/dist/services/data/TrendService.d.ts +17 -0
- package/dist/services/data/TrendService.js +116 -0
- package/dist/services/data/TrendService.js.map +1 -0
- package/dist/services/data/TweetService.d.ts +22 -15
- package/dist/services/data/TweetService.js +22 -15
- package/dist/services/data/TweetService.js.map +1 -1
- package/dist/services/data/UserAccountService.d.ts +42 -0
- package/dist/services/data/UserAccountService.js +239 -0
- package/dist/services/data/UserAccountService.js.map +1 -0
- package/dist/services/data/UserService.d.ts +21 -15
- package/dist/services/data/UserService.js +21 -15
- package/dist/services/data/UserService.js.map +1 -1
- package/dist/services/helper/Deserializers.d.ts +19 -0
- package/dist/services/helper/Deserializers.js +115 -0
- package/dist/services/helper/Deserializers.js.map +1 -0
- package/dist/services/helper/Extractors.d.ts +104 -0
- package/dist/services/helper/Extractors.js +432 -0
- package/dist/services/helper/Extractors.js.map +1 -0
- package/dist/services/helper/Urls.d.ts +85 -0
- package/dist/services/helper/Urls.js +130 -0
- package/dist/services/helper/Urls.js.map +1 -0
- package/dist/services/helper/extractors/Trends.d.ts +3 -0
- package/dist/services/helper/extractors/Trends.js +51 -0
- package/dist/services/helper/extractors/Trends.js.map +1 -0
- package/dist/services/helper/urls/Trends.d.ts +7 -0
- package/dist/services/helper/urls/Trends.js +13 -0
- package/dist/services/helper/urls/Trends.js.map +1 -0
- package/dist/types/Authentication.d.ts +27 -2
- package/dist/types/Authentication.js.map +1 -1
- package/dist/types/HTTP.d.ts +3 -1
- package/dist/types/HTTP.js +3 -1
- package/dist/types/HTTP.js.map +1 -1
- package/dist/types/Resolvers.d.ts +6 -1
- package/dist/types/Service.d.ts +30 -0
- package/dist/types/Service.js +19 -0
- package/dist/types/Service.js.map +1 -0
- package/dist/types/Trends.d.ts +50 -0
- package/dist/types/Trends.js +3 -0
- package/dist/types/Trends.js.map +1 -0
- package/dist/types/Tweet.d.ts +40 -0
- package/dist/types/Tweet.js +5 -0
- package/dist/types/Tweet.js.map +1 -0
- package/dist/types/UserAccount.d.ts +19 -0
- package/dist/types/UserAccount.js +4 -0
- package/dist/types/UserAccount.js.map +1 -0
- package/dist/types/data/Errors.d.ts +9 -3
- package/dist/types/data/Errors.js +9 -3
- package/dist/types/data/Errors.js.map +1 -1
- package/dist/types/data/Service.d.ts +19 -5
- package/dist/types/data/Service.js +6 -3
- package/dist/types/data/Service.js.map +1 -1
- package/dist/types/data/Tweet.d.ts +60 -3
- package/dist/types/data/Tweet.js +0 -1
- package/dist/types/data/Tweet.js.map +1 -1
- package/dist/types/data/User.d.ts +20 -1
- package/dist/types/data/User.js +0 -1
- package/dist/types/data/User.js.map +1 -1
- package/dist/types/graphql/Errors.d.ts +15 -0
- package/dist/types/graphql/Errors.js +23 -0
- package/dist/types/graphql/Errors.js.map +1 -0
- package/dist/types/raw/general/Trends.d.ts +324 -0
- package/dist/types/raw/general/Trends.js +3 -0
- package/dist/types/raw/general/Trends.js.map +1 -0
- package/dist/types/raw/user/Tweets.d.ts +2428 -0
- package/dist/types/raw/user/Tweets.js +3 -0
- package/dist/types/raw/user/Tweets.js.map +1 -0
- package/package.json +5 -4
- package/src/index.ts +19 -6
- package/src/services/AuthService.ts +13 -7
- package/src/services/CacheService.ts +12 -7
- package/src/services/FetcherService.ts +62 -21
- package/src/services/accounts/AccountService.ts +38 -12
- package/src/services/data/TweetService.ts +25 -18
- package/src/services/data/UserService.ts +21 -15
- package/src/types/Authentication.ts +27 -2
- package/src/types/HTTP.ts +4 -2
- package/src/types/Resolvers.ts +14 -6
- package/src/types/data/Errors.ts +10 -4
- package/src/types/data/Service.ts +28 -11
- package/src/types/data/Tweet.ts +109 -31
- package/src/types/data/User.ts +47 -17
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import RawUser from '../../types/raw/user/User';
|
|
2
|
+
import RawUserFollowers from '../../types/raw/user/Followers';
|
|
3
|
+
import RawUserFollowing from '../../types/raw/user/Following';
|
|
4
|
+
import RawUserLikes from '../../types/raw/user/Likes';
|
|
5
|
+
import RawUserTweets from '../../types/raw/user/Tweets';
|
|
6
|
+
import RawTweet from '../../types/raw/tweet/Tweet';
|
|
7
|
+
import RawTweets from '../../types/raw/tweet/Tweets';
|
|
8
|
+
import RawLikers from '../../types/raw/tweet/Favouriters';
|
|
9
|
+
import RawRetweeters from '../../types/raw/tweet/Retweeters';
|
|
10
|
+
import RawTrends from '../../types/raw/general/Trends';
|
|
11
|
+
import Trends from '../../types/Trends';
|
|
12
|
+
/**
|
|
13
|
+
* @returns The raw user account data formatted and sorted into required and additional data
|
|
14
|
+
* @param res The raw response received from Twitter
|
|
15
|
+
*/
|
|
16
|
+
export declare function extractUserAccountDetails(res: RawUser): {
|
|
17
|
+
required: any[];
|
|
18
|
+
cursor: string;
|
|
19
|
+
users: any[];
|
|
20
|
+
tweets: any[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @returns The raw user following/followers data formatted and sorted into required and additional data
|
|
24
|
+
* @param res The raw response received from TwitterAPI
|
|
25
|
+
*/
|
|
26
|
+
export declare function extractUserFollow(res: RawUserFollowers | RawUserFollowing): {
|
|
27
|
+
required: any[];
|
|
28
|
+
cursor: string;
|
|
29
|
+
users: any[];
|
|
30
|
+
tweets: any[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @returns The raw user likes data formatted and sorted into required and additional data
|
|
34
|
+
* @param res The raw response received from TwitterAPI
|
|
35
|
+
*/
|
|
36
|
+
export declare function extractUserLikes(res: RawUserLikes): {
|
|
37
|
+
required: any[];
|
|
38
|
+
cursor: string;
|
|
39
|
+
users: any[];
|
|
40
|
+
tweets: any[];
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @returns The raw tweets data formatted and sorted into required and additional data
|
|
44
|
+
* @param res The raw response received from TwitterAPI
|
|
45
|
+
*/
|
|
46
|
+
export declare function extractUserTweets(res: RawUserTweets): {
|
|
47
|
+
required: any[];
|
|
48
|
+
cursor: string;
|
|
49
|
+
users: any[];
|
|
50
|
+
tweets: any[];
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @returns The raw tweets data formatted and sorted into required and additional data
|
|
54
|
+
* @param res The raw response received from TwitterAPI
|
|
55
|
+
*/
|
|
56
|
+
export declare function extractTweets(res: RawTweets): {
|
|
57
|
+
required: any[];
|
|
58
|
+
cursor: string;
|
|
59
|
+
users: any[];
|
|
60
|
+
tweets: any[];
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* @returns The raw tweet data formatted and sorted into required and additional data
|
|
64
|
+
* @param res The raw response received from TwitterAPI
|
|
65
|
+
* @param tweetId The rest id of the tweet to fetch
|
|
66
|
+
*/
|
|
67
|
+
export declare function extractTweet(res: RawTweet, tweetId: string): {
|
|
68
|
+
required: any[];
|
|
69
|
+
cursor: string;
|
|
70
|
+
users: any[];
|
|
71
|
+
tweets: any[];
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* @returns The raw tweet likers data formatted and sorted into required and additional data
|
|
75
|
+
* @param res The raw response received from TwitterAPI
|
|
76
|
+
*/
|
|
77
|
+
export declare function extractTweetLikers(res: RawLikers): {
|
|
78
|
+
required: any[];
|
|
79
|
+
cursor: string;
|
|
80
|
+
users: any[];
|
|
81
|
+
tweets: any[];
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* @returns The raw tweet retweeters data formatted and sorted into required and additional data
|
|
85
|
+
* @param res The raw response received from TwitterAPI
|
|
86
|
+
*/
|
|
87
|
+
export declare function extractTweetRetweeters(res: RawRetweeters): {
|
|
88
|
+
required: any[];
|
|
89
|
+
cursor: string;
|
|
90
|
+
users: any[];
|
|
91
|
+
tweets: any[];
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* @returns The raw tweet replies data formatted and sorted into required and additional data
|
|
95
|
+
* @param res The raw response received from TwitterAPI
|
|
96
|
+
* @param tweetId The id of the tweet whose replies must be extracted
|
|
97
|
+
*/
|
|
98
|
+
export declare function extractTweetReplies(res: RawTweet, tweetId: string): {
|
|
99
|
+
required: any[];
|
|
100
|
+
cursor: string;
|
|
101
|
+
users: any[];
|
|
102
|
+
tweets: any[];
|
|
103
|
+
};
|
|
104
|
+
export declare function extractTrendData(res: RawTrends): Trends;
|
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
exports.__esModule = true;
|
|
26
|
+
exports.extractTrendData = exports.extractTweetReplies = exports.extractTweetRetweeters = exports.extractTweetLikers = exports.extractTweet = exports.extractTweets = exports.extractUserTweets = exports.extractUserLikes = exports.extractUserFollow = exports.extractUserAccountDetails = void 0;
|
|
27
|
+
// TYPES
|
|
28
|
+
var Errors_1 = require("../../types/graphql/Errors");
|
|
29
|
+
// PARSERS
|
|
30
|
+
var Parsers = __importStar(require("./Parser"));
|
|
31
|
+
/* USERS */
|
|
32
|
+
/**
|
|
33
|
+
* @returns The raw user account data formatted and sorted into required and additional data
|
|
34
|
+
* @param res The raw response received from Twitter
|
|
35
|
+
*/
|
|
36
|
+
function extractUserAccountDetails(res) {
|
|
37
|
+
var required = []; // To store the reqruied raw data
|
|
38
|
+
var cursor = ''; // To store the cursor to next batch
|
|
39
|
+
var users = []; // To store additional user data
|
|
40
|
+
var tweets = []; // To store additional tweet data
|
|
41
|
+
// If user not found or account suspended
|
|
42
|
+
if (Parsers.isJSONEmpty(res.data) || Parsers.isJSONEmpty(res.data.user) || res.data.user.result.__typename !== 'User') {
|
|
43
|
+
throw new Error(Errors_1.DataErrors.UserNotFound);
|
|
44
|
+
}
|
|
45
|
+
// Destructuring user account data
|
|
46
|
+
required.push(res.data.user.result);
|
|
47
|
+
users.push(res.data.user.result);
|
|
48
|
+
// Returning the data
|
|
49
|
+
return {
|
|
50
|
+
required: required,
|
|
51
|
+
cursor: cursor,
|
|
52
|
+
users: users,
|
|
53
|
+
tweets: tweets
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
exports.extractUserAccountDetails = extractUserAccountDetails;
|
|
57
|
+
/**
|
|
58
|
+
* @returns The raw user following/followers data formatted and sorted into required and additional data
|
|
59
|
+
* @param res The raw response received from TwitterAPI
|
|
60
|
+
*/
|
|
61
|
+
function extractUserFollow(res) {
|
|
62
|
+
var required = []; // To store the reqruied raw data
|
|
63
|
+
var cursor = ''; // To store the cursor to next batch
|
|
64
|
+
var users = []; // To store additional user data
|
|
65
|
+
var tweets = []; // To store additional tweet data
|
|
66
|
+
// If user does not exist
|
|
67
|
+
if (Parsers.isJSONEmpty(res.data.user)) {
|
|
68
|
+
throw new Error(Errors_1.DataErrors.UserNotFound);
|
|
69
|
+
}
|
|
70
|
+
// Extracting the raw list
|
|
71
|
+
res.data.user.result.timeline.timeline.instructions.forEach(function (item) {
|
|
72
|
+
var _a;
|
|
73
|
+
if (item.type === 'TimelineAddEntries') {
|
|
74
|
+
// Destructuring data
|
|
75
|
+
(_a = item.entries) === null || _a === void 0 ? void 0 : _a.forEach(function (entry) {
|
|
76
|
+
var _a, _b;
|
|
77
|
+
// If entry is of type user and user account exists
|
|
78
|
+
if (entry.entryId.indexOf('user') != -1 && ((_a = entry.content.itemContent) === null || _a === void 0 ? void 0 : _a.user_results.result.__typename) === 'User') {
|
|
79
|
+
required.push(entry.content.itemContent.user_results.result);
|
|
80
|
+
users.push(entry.content.itemContent.user_results.result);
|
|
81
|
+
}
|
|
82
|
+
// If entry is of type cursor
|
|
83
|
+
else if (entry.entryId.indexOf('cursor-bottom') != -1) {
|
|
84
|
+
cursor = (_b = entry.content.value) !== null && _b !== void 0 ? _b : '';
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
// Returning the data
|
|
90
|
+
return {
|
|
91
|
+
required: required,
|
|
92
|
+
cursor: cursor,
|
|
93
|
+
users: users,
|
|
94
|
+
tweets: tweets
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
exports.extractUserFollow = extractUserFollow;
|
|
98
|
+
/**
|
|
99
|
+
* @returns The raw user likes data formatted and sorted into required and additional data
|
|
100
|
+
* @param res The raw response received from TwitterAPI
|
|
101
|
+
*/
|
|
102
|
+
function extractUserLikes(res) {
|
|
103
|
+
var required = []; // To store the reqruied raw data
|
|
104
|
+
var cursor = ''; // To store the cursor to next batch
|
|
105
|
+
var users = []; // To store additional user data
|
|
106
|
+
var tweets = []; // To store additional tweet data
|
|
107
|
+
// If user does not exist
|
|
108
|
+
if (Parsers.isJSONEmpty(res.data.user)) {
|
|
109
|
+
throw new Error(Errors_1.DataErrors.UserNotFound);
|
|
110
|
+
}
|
|
111
|
+
// Extracting the raw list
|
|
112
|
+
res.data.user.result.timeline_v2.timeline.instructions.forEach(function (item) {
|
|
113
|
+
if (item.type === 'TimelineAddEntries') {
|
|
114
|
+
// Destructuring data
|
|
115
|
+
item.entries.forEach(function (entry) {
|
|
116
|
+
var _a, _b;
|
|
117
|
+
// If entry is of type tweet and tweet exists
|
|
118
|
+
if (entry.entryId.indexOf('tweet') != -1 && ((_a = entry.content.itemContent) === null || _a === void 0 ? void 0 : _a.tweet_results.result.__typename) === 'Tweet') {
|
|
119
|
+
required.push(entry.content.itemContent.tweet_results.result);
|
|
120
|
+
users.push(entry.content.itemContent.tweet_results.result.core.user_results.result);
|
|
121
|
+
tweets.push(entry.content.itemContent.tweet_results.result);
|
|
122
|
+
}
|
|
123
|
+
// If entry is of type cursor
|
|
124
|
+
else if (entry.entryId.indexOf('cursor-bottom') != -1) {
|
|
125
|
+
cursor = (_b = entry.content.value) !== null && _b !== void 0 ? _b : '';
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
// Returning the data
|
|
131
|
+
return {
|
|
132
|
+
required: required,
|
|
133
|
+
cursor: cursor,
|
|
134
|
+
users: users,
|
|
135
|
+
tweets: tweets
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
exports.extractUserLikes = extractUserLikes;
|
|
139
|
+
/**
|
|
140
|
+
* @returns The raw tweets data formatted and sorted into required and additional data
|
|
141
|
+
* @param res The raw response received from TwitterAPI
|
|
142
|
+
*/
|
|
143
|
+
function extractUserTweets(res) {
|
|
144
|
+
var _a, _b, _c;
|
|
145
|
+
var required = []; // To store the reqruied raw data
|
|
146
|
+
var cursor = ''; // To store the cursor to next batch
|
|
147
|
+
var users = []; // To store additional user data
|
|
148
|
+
var tweets = []; // To store additional tweet data
|
|
149
|
+
// Getting the raw tweet list
|
|
150
|
+
var dataTweets = res.data.user.result.timeline_v2.timeline.instructions.filter(function (item) { return item.type === 'TimelineAddEntries'; })[0].entries;
|
|
151
|
+
// Destructuring tweets, if not empty
|
|
152
|
+
if (!Parsers.isJSONEmpty(dataTweets)) {
|
|
153
|
+
// Iterating through the json array of tweets
|
|
154
|
+
for (var _i = 0, dataTweets_1 = dataTweets; _i < dataTweets_1.length; _i++) {
|
|
155
|
+
var entry = dataTweets_1[_i];
|
|
156
|
+
// If the entry is a tweet
|
|
157
|
+
if (entry.entryId.indexOf('tweet') != -1) {
|
|
158
|
+
required.push((_a = entry.content.itemContent) === null || _a === void 0 ? void 0 : _a.tweet_results.result);
|
|
159
|
+
tweets.push((_b = entry.content.itemContent) === null || _b === void 0 ? void 0 : _b.tweet_results.result);
|
|
160
|
+
users.push((_c = entry.content.itemContent) === null || _c === void 0 ? void 0 : _c.tweet_results.result.core.user_results.result);
|
|
161
|
+
}
|
|
162
|
+
// If the entry is a cursor
|
|
163
|
+
else if (entry.entryId.indexOf('cursor-bottom') != -1) {
|
|
164
|
+
cursor = entry.content.value;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
required: required,
|
|
170
|
+
cursor: cursor,
|
|
171
|
+
users: users,
|
|
172
|
+
tweets: tweets
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
exports.extractUserTweets = extractUserTweets;
|
|
176
|
+
/* TWEETS */
|
|
177
|
+
/**
|
|
178
|
+
* @returns The raw tweets data formatted and sorted into required and additional data
|
|
179
|
+
* @param res The raw response received from TwitterAPI
|
|
180
|
+
*/
|
|
181
|
+
function extractTweets(res) {
|
|
182
|
+
var _a, _b, _c, _d, _e, _f;
|
|
183
|
+
var required = []; // To store the reqruied raw data
|
|
184
|
+
var cursor = ''; // To store the cursor to next batch
|
|
185
|
+
var users = []; // To store additional user data
|
|
186
|
+
var tweets = []; // To store additional tweet data
|
|
187
|
+
// Getting raw tweet list
|
|
188
|
+
var dataTweets = res.globalObjects.tweets;
|
|
189
|
+
// Getting raw users list
|
|
190
|
+
var dataUsers = res.globalObjects.users;
|
|
191
|
+
// Destructuring tweets, if not empty
|
|
192
|
+
if (!Parsers.isJSONEmpty(dataTweets)) {
|
|
193
|
+
// Iterating through the json array of tweets
|
|
194
|
+
for (var _i = 0, _g = Object.keys(dataTweets); _i < _g.length; _i++) {
|
|
195
|
+
var key = _g[_i];
|
|
196
|
+
required.push({ rest_id: dataTweets[key].id_str, legacy: dataTweets[key] });
|
|
197
|
+
tweets.push({ rest_id: dataTweets[key].id_str, legacy: dataTweets[key] });
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
// Destructuring users, if not empty
|
|
201
|
+
if (!Parsers.isJSONEmpty(dataUsers)) {
|
|
202
|
+
// Iterating through the json array of users
|
|
203
|
+
for (var _h = 0, _j = Object.keys(dataUsers); _h < _j.length; _h++) {
|
|
204
|
+
var key = _j[_h];
|
|
205
|
+
users.push({ rest_id: dataUsers[key].id_str, legacy: dataUsers[key] });
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
// Getting the cursor to next batch
|
|
209
|
+
// If not first batch
|
|
210
|
+
if (res.timeline.instructions.length > 2) {
|
|
211
|
+
cursor = (_c = (_b = (_a = res.timeline.instructions[2]) === null || _a === void 0 ? void 0 : _a.replaceEntry.entry.content.operation) === null || _b === void 0 ? void 0 : _b.cursor.value) !== null && _c !== void 0 ? _c : '';
|
|
212
|
+
}
|
|
213
|
+
// If first batch
|
|
214
|
+
else {
|
|
215
|
+
cursor = (_f = (_e = (_d = res.timeline.instructions[0].addEntries) === null || _d === void 0 ? void 0 : _d.entries.filter(function (item) { return item.entryId.indexOf('cursor-bottom') != -1; })[0].content.operation) === null || _e === void 0 ? void 0 : _e.cursor.value) !== null && _f !== void 0 ? _f : '';
|
|
216
|
+
}
|
|
217
|
+
// Returning the data
|
|
218
|
+
return {
|
|
219
|
+
required: required,
|
|
220
|
+
cursor: cursor,
|
|
221
|
+
users: users,
|
|
222
|
+
tweets: tweets
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
exports.extractTweets = extractTweets;
|
|
226
|
+
/**
|
|
227
|
+
* @returns The raw tweet data formatted and sorted into required and additional data
|
|
228
|
+
* @param res The raw response received from TwitterAPI
|
|
229
|
+
* @param tweetId The rest id of the tweet to fetch
|
|
230
|
+
*/
|
|
231
|
+
function extractTweet(res, tweetId) {
|
|
232
|
+
var _a;
|
|
233
|
+
var required = []; // To store the reqruied raw data
|
|
234
|
+
var cursor = ''; // To store the cursor to next batch
|
|
235
|
+
var users = []; // To store additional user data
|
|
236
|
+
var tweets = []; // To store additional tweet data
|
|
237
|
+
// If tweet does not exist
|
|
238
|
+
if (Parsers.isJSONEmpty(res.data)) {
|
|
239
|
+
throw new Error(Errors_1.DataErrors.TweetNotFound);
|
|
240
|
+
}
|
|
241
|
+
// Destructuring the received raw data
|
|
242
|
+
(_a = res.data.threaded_conversation_with_injections_v2.instructions.filter(function (item) { return item['type'] === 'TimelineAddEntries'; })[0].entries) === null || _a === void 0 ? void 0 : _a.forEach(function (entry) {
|
|
243
|
+
var _a, _b, _c;
|
|
244
|
+
// If entry is of type tweet and tweet exists
|
|
245
|
+
if (entry.entryId.indexOf('tweet') != -1 && ((_b = (_a = entry.content.itemContent) === null || _a === void 0 ? void 0 : _a.tweet_results) === null || _b === void 0 ? void 0 : _b.result.__typename) === 'Tweet') {
|
|
246
|
+
// If this is the required tweet
|
|
247
|
+
if (entry.entryId.indexOf(tweetId) != -1) {
|
|
248
|
+
required.push(entry.content.itemContent.tweet_results.result);
|
|
249
|
+
}
|
|
250
|
+
tweets.push(entry.content.itemContent.tweet_results.result);
|
|
251
|
+
users.push(entry.content.itemContent.tweet_results.result.core.user_results.result);
|
|
252
|
+
}
|
|
253
|
+
// If entry if of type conversation
|
|
254
|
+
else if (entry.entryId.indexOf('conversationthread') != -1) {
|
|
255
|
+
// Iterating over the conversation
|
|
256
|
+
(_c = entry.content.items) === null || _c === void 0 ? void 0 : _c.forEach(function (item) {
|
|
257
|
+
var _a;
|
|
258
|
+
// If item is of type tweet and tweet exists
|
|
259
|
+
if (item.entryId.indexOf('tweet') != -1 && ((_a = item.item.itemContent.tweet_results) === null || _a === void 0 ? void 0 : _a.result.__typename) === 'Tweet') {
|
|
260
|
+
required.push(item.item.itemContent.tweet_results.result);
|
|
261
|
+
tweets.push(item.item.itemContent.tweet_results.result);
|
|
262
|
+
users.push(item.item.itemContent.tweet_results.result.core.user_results.result);
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
// Returning the data
|
|
268
|
+
return {
|
|
269
|
+
required: required,
|
|
270
|
+
cursor: cursor,
|
|
271
|
+
users: users,
|
|
272
|
+
tweets: tweets
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
exports.extractTweet = extractTweet;
|
|
276
|
+
/**
|
|
277
|
+
* @returns The raw tweet likers data formatted and sorted into required and additional data
|
|
278
|
+
* @param res The raw response received from TwitterAPI
|
|
279
|
+
*/
|
|
280
|
+
function extractTweetLikers(res) {
|
|
281
|
+
var required = []; // To store the reqruied raw data
|
|
282
|
+
var cursor = ''; // To store the cursor to next batch
|
|
283
|
+
var users = []; // To store additional user data
|
|
284
|
+
var tweets = []; // To store additional tweet data
|
|
285
|
+
// If tweet does not exist
|
|
286
|
+
if (Parsers.isJSONEmpty(res.data.favoriters_timeline)) {
|
|
287
|
+
throw new Error(Errors_1.DataErrors.TweetNotFound);
|
|
288
|
+
}
|
|
289
|
+
// Destructuring raw list of likers
|
|
290
|
+
res.data.favoriters_timeline.timeline.instructions.filter(function (item) { return item.type === 'TimelineAddEntries'; })[0].entries.forEach(function (entry) {
|
|
291
|
+
var _a, _b;
|
|
292
|
+
// If entry is of type user and user exists
|
|
293
|
+
if (entry.entryId.indexOf('user') != -1 && ((_a = entry.content.itemContent) === null || _a === void 0 ? void 0 : _a.user_results.result.__typename) === 'User') {
|
|
294
|
+
required.push(entry.content.itemContent.user_results.result);
|
|
295
|
+
users.push(entry.content.itemContent.user_results.result);
|
|
296
|
+
}
|
|
297
|
+
// If entry is of type cursor
|
|
298
|
+
else if (entry.entryId.indexOf('cursor-bottom') != -1) {
|
|
299
|
+
cursor = (_b = entry.content.value) !== null && _b !== void 0 ? _b : '';
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
// Returning the data
|
|
303
|
+
return {
|
|
304
|
+
required: required,
|
|
305
|
+
cursor: cursor,
|
|
306
|
+
users: users,
|
|
307
|
+
tweets: tweets
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
exports.extractTweetLikers = extractTweetLikers;
|
|
311
|
+
/**
|
|
312
|
+
* @returns The raw tweet retweeters data formatted and sorted into required and additional data
|
|
313
|
+
* @param res The raw response received from TwitterAPI
|
|
314
|
+
*/
|
|
315
|
+
function extractTweetRetweeters(res) {
|
|
316
|
+
var required = []; // To store the reqruied raw data
|
|
317
|
+
var cursor = ''; // To store the cursor to next batch
|
|
318
|
+
var users = []; // To store additional user data
|
|
319
|
+
var tweets = []; // To store additional tweet data
|
|
320
|
+
// If tweet does not exist
|
|
321
|
+
if (Parsers.isJSONEmpty(res.data.retweeters_timeline)) {
|
|
322
|
+
throw new Error(Errors_1.DataErrors.TweetNotFound);
|
|
323
|
+
}
|
|
324
|
+
// Destructuring raw list of retweeters
|
|
325
|
+
res.data.retweeters_timeline.timeline.instructions.filter(function (item) { return item.type === 'TimelineAddEntries'; })[0].entries.forEach(function (entry) {
|
|
326
|
+
var _a, _b;
|
|
327
|
+
// If entry is of type user and user exists
|
|
328
|
+
if (entry.entryId.indexOf('user') != -1 && ((_a = entry.content.itemContent) === null || _a === void 0 ? void 0 : _a.user_results.result.__typename) === 'User') {
|
|
329
|
+
required.push(entry.content.itemContent.user_results.result);
|
|
330
|
+
users.push(entry.content.itemContent.user_results.result);
|
|
331
|
+
}
|
|
332
|
+
// If entry is of type cursor
|
|
333
|
+
else if (entry.entryId.indexOf('cursor-bottom') != -1) {
|
|
334
|
+
cursor = (_b = entry.content.value) !== null && _b !== void 0 ? _b : '';
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
// Returning the data
|
|
338
|
+
return {
|
|
339
|
+
required: required,
|
|
340
|
+
cursor: cursor,
|
|
341
|
+
users: users,
|
|
342
|
+
tweets: tweets
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
exports.extractTweetRetweeters = extractTweetRetweeters;
|
|
346
|
+
/**
|
|
347
|
+
* @returns The raw tweet replies data formatted and sorted into required and additional data
|
|
348
|
+
* @param res The raw response received from TwitterAPI
|
|
349
|
+
* @param tweetId The id of the tweet whose replies must be extracted
|
|
350
|
+
*/
|
|
351
|
+
function extractTweetReplies(res, tweetId) {
|
|
352
|
+
var required = []; // To store the reqruied raw data
|
|
353
|
+
var cursor = ''; // To store the cursor to next batch
|
|
354
|
+
var users = []; // To store additional user data
|
|
355
|
+
var tweets = []; // To store additional tweet data
|
|
356
|
+
// If tweet does not exist
|
|
357
|
+
if (Parsers.isJSONEmpty(res.data)) {
|
|
358
|
+
throw new Error(Errors_1.DataErrors.TweetNotFound);
|
|
359
|
+
}
|
|
360
|
+
// Destructuring the received raw data
|
|
361
|
+
//@ts-ignore
|
|
362
|
+
res.data.threaded_conversation_with_injections.instructions.filter(function (item) { return item.type === 'TimelineAddEntries'; })[0].entries.map(function (entry) {
|
|
363
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
364
|
+
// If entry is of type tweet
|
|
365
|
+
if (entry.entryId.indexOf('tweet') != -1) {
|
|
366
|
+
// If tweet exists
|
|
367
|
+
if (((_b = (_a = entry.content.itemContent) === null || _a === void 0 ? void 0 : _a.tweet_results) === null || _b === void 0 ? void 0 : _b.result.__typename) === 'Tweet') {
|
|
368
|
+
tweets.push(entry.content.itemContent.tweet_results.result);
|
|
369
|
+
users.push(entry.content.itemContent.tweet_results.result.core.user_results.result);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
// If entry if of type conversation/reply
|
|
373
|
+
else if (entry.entryId.indexOf('conversationthread') != -1) {
|
|
374
|
+
// If tweet exists
|
|
375
|
+
if (((_e = (_d = (_c = entry.content.items) === null || _c === void 0 ? void 0 : _c.at(0)) === null || _d === void 0 ? void 0 : _d.item.itemContent.tweet_results) === null || _e === void 0 ? void 0 : _e.result.__typename) === 'Tweet') {
|
|
376
|
+
// Adding the 1st entry, which is a reply, to required list
|
|
377
|
+
required.push((_f = entry.content.items[0].item.itemContent.tweet_results) === null || _f === void 0 ? void 0 : _f.result);
|
|
378
|
+
tweets.push((_g = entry.content.items[0].item.itemContent.tweet_results) === null || _g === void 0 ? void 0 : _g.result);
|
|
379
|
+
users.push((_h = entry.content.items[0].item.itemContent.tweet_results) === null || _h === void 0 ? void 0 : _h.result.core.user_results.result);
|
|
380
|
+
}
|
|
381
|
+
// Iterating over the rest of the conversation
|
|
382
|
+
//@ts-ignore
|
|
383
|
+
entry.content.items.forEach(function (item) {
|
|
384
|
+
var _a;
|
|
385
|
+
// If item is of type tweet
|
|
386
|
+
if (item.entryId.indexOf('tweet') != -1) {
|
|
387
|
+
// If tweet exists
|
|
388
|
+
if (((_a = item.item.itemContent.tweet_results) === null || _a === void 0 ? void 0 : _a.result.__typename) === 'Tweet') {
|
|
389
|
+
tweets.push(item.item.itemContent.tweet_results.result);
|
|
390
|
+
users.push(item.item.itemContent.tweet_results.result.core.user_results.result);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
// If entry is of type bottom cursor
|
|
396
|
+
else if (entry.entryId.indexOf('cursor-bottom') != -1) {
|
|
397
|
+
cursor = (_k = (_j = entry.content.itemContent) === null || _j === void 0 ? void 0 : _j.value) !== null && _k !== void 0 ? _k : '';
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
// Returning the data
|
|
401
|
+
return {
|
|
402
|
+
required: required,
|
|
403
|
+
cursor: cursor,
|
|
404
|
+
users: users,
|
|
405
|
+
tweets: tweets
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
exports.extractTweetReplies = extractTweetReplies;
|
|
409
|
+
function extractTrendData(res) {
|
|
410
|
+
var _a, _b;
|
|
411
|
+
// Setting Initial values
|
|
412
|
+
var currentTrends = {
|
|
413
|
+
trendingNow: [],
|
|
414
|
+
trendCategory: res.pageConfiguration.tabs.initialTabId
|
|
415
|
+
};
|
|
416
|
+
// Fetching each Trend and its data and push it to currentTrends.trendingNow
|
|
417
|
+
(_b = (_a = res.timeline.instructions[1].addEntries) === null || _a === void 0 ? void 0 : _a.entries[1].content.timelineModule) === null || _b === void 0 ? void 0 : _b.items.forEach(function (entry) {
|
|
418
|
+
var _a;
|
|
419
|
+
var trend = {
|
|
420
|
+
name: entry.item.content.trend.name,
|
|
421
|
+
rank: Number(entry.item.content.trend.rank),
|
|
422
|
+
//Getting approx amount of tweets done if it exists in the metaData
|
|
423
|
+
approxtweetCount: Parsers.convertToNumber((_a = entry.item.content.trend.trendMetadata.metaDescription) !== null && _a !== void 0 ? _a : ''),
|
|
424
|
+
relatedTopics: entry.item.clientEventInfo.details.guideDetails.transparentGuideDetails.trendMetadata.associatedCuratedTweetIds,
|
|
425
|
+
domainContext: entry.item.content.trend.trendMetadata.domainContext
|
|
426
|
+
};
|
|
427
|
+
currentTrends.trendingNow.push(trend);
|
|
428
|
+
});
|
|
429
|
+
return currentTrends;
|
|
430
|
+
}
|
|
431
|
+
exports.extractTrendData = extractTrendData;
|
|
432
|
+
//# sourceMappingURL=Extractors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Extractors.js","sourceRoot":"","sources":["../../../src/services/helper/Extractors.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,qDAAwD;AAgBxD,UAAU;AACV,gDAAoC;AAEpC,WAAW;AAEX;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,GAAY;IAMlD,IAAI,QAAQ,GAAU,EAAE,CAAC,CAA+C,iCAAiC;IACzG,IAAI,MAAM,GAAW,EAAE,CAAC,CAAgD,o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,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,eAAe,mCAAE,EAAE,CAAC;YAEtG,aAAa,EAAG,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,YAAY,CAAC,uBAAuB,CAAC,aAAa,CAAC,yBAAyB;YAC/H,aAAa,EAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa;SAEvE,CAAA;QACD,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;IAEF,OAAO,aAAa,CAAA;AACxB,CAAC;AAzBD,4CAyBC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { trendOn } from "../../types/Trends";
|
|
2
|
+
/**
|
|
3
|
+
* @returns The url for fetching a guest token
|
|
4
|
+
*/
|
|
5
|
+
export declare function guestTokenUrl(): string;
|
|
6
|
+
/**
|
|
7
|
+
* @returns The url for fetching user account details.
|
|
8
|
+
* @param screenName The screen name of the target user
|
|
9
|
+
*/
|
|
10
|
+
export declare function userAccountUrl(screenName: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* @returns The url for fetching user account details.
|
|
13
|
+
* @param restid The restId of the target user
|
|
14
|
+
*/
|
|
15
|
+
export declare function userAccountByIdUrl(restId: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* @returns The url for fetching the list of users followed bu target user.
|
|
18
|
+
* @param userId The rest id of the target user
|
|
19
|
+
* @param count The batch size of the list of following
|
|
20
|
+
* @param cursor The cursor to next batch
|
|
21
|
+
*/
|
|
22
|
+
export declare function userFollowingUrl(userId: string, count: number, cursor: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* @return The url for fetching the list of followers of the target user
|
|
25
|
+
* @param userId The rest id of the target user
|
|
26
|
+
* @param count The batch size for the list of followers
|
|
27
|
+
* @param cursor The cusor to next batch
|
|
28
|
+
*/
|
|
29
|
+
export declare function userFollowersUrl(userId: string, count: number, cursor: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* @returns The url for fetching the list of tweets liked by the target user
|
|
32
|
+
* @param userId The rest id of the target user
|
|
33
|
+
* @param count The batch size for the list of tweets
|
|
34
|
+
* @param cursor The cusor to next batch
|
|
35
|
+
*/
|
|
36
|
+
export declare function userLikesUrl(userId: string, count: number, cursor: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* @returns The url for fetching the list of tweets made by the target user
|
|
39
|
+
* @param userId The rest id of the target user
|
|
40
|
+
* @param count The batch size for the list of tweets
|
|
41
|
+
* @param cursor The cursor to next batch
|
|
42
|
+
*/
|
|
43
|
+
export declare function userTweetsUrl(userId: string, count: number, cursor: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* @returns The url for fetching the list of tweets matching the given filter
|
|
46
|
+
* @param query The query to be used for searching tweets
|
|
47
|
+
* @param count The number of tweets to fetch
|
|
48
|
+
* @param cursor The cusor to next batch *
|
|
49
|
+
*/
|
|
50
|
+
export declare function tweetsUrl(query: string, count: number, cursor: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* @returns The url for fetching the details of a given tweet
|
|
53
|
+
* @param tweetId The rest id of the target tweet
|
|
54
|
+
*/
|
|
55
|
+
export declare function tweetDetailsUrl(tweetId: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* @returns The url for fetching the list of replies to a given tweet
|
|
58
|
+
* @param tweetId The rest of the target tweet
|
|
59
|
+
* @param cursor The curor to next batch
|
|
60
|
+
*/
|
|
61
|
+
export declare function tweetRepliesUrl(tweetId: string, cursor: string): string;
|
|
62
|
+
/**
|
|
63
|
+
* @returns The url for fetching the list of users who liked a given tweet
|
|
64
|
+
* @param tweetId The rest id of the target tweet
|
|
65
|
+
* @param count The batch size of the list of users
|
|
66
|
+
* @param cursor The curor to next batch
|
|
67
|
+
*/
|
|
68
|
+
export declare function tweetLikesUrl(tweetId: string, count: number, cursor: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* @returns The url for fetching the list of user who retweeted the given tweet
|
|
71
|
+
* @param tweetId The rest id of the target tweet
|
|
72
|
+
* @param count The batch size of the list of users
|
|
73
|
+
* @param cursor The curor to next batch
|
|
74
|
+
*/
|
|
75
|
+
export declare function tweetRetweetUrl(tweetId: string, count: number, cursor: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* @returns The url for adding new Tweet
|
|
78
|
+
*/
|
|
79
|
+
export declare function AddTweet(): string;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @param type selection for trending by generic topics availed to us by Twitter. e.g. news, sports, entertainment, overall, etc.
|
|
83
|
+
* @returns url to fetch trends from
|
|
84
|
+
*/
|
|
85
|
+
export declare function trendsUrl(type: trendOn): string;
|