rettiwt-api 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -13
- package/dist/Rettiwt.d.ts +37 -1
- package/dist/Rettiwt.js +37 -1
- package/dist/Rettiwt.js.map +1 -1
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +39 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/Auth.d.ts +3 -0
- package/dist/commands/Auth.js +90 -0
- package/dist/commands/Auth.js.map +1 -0
- package/dist/commands/Tweet.d.ts +10 -0
- package/dist/commands/Tweet.js +242 -0
- package/dist/commands/Tweet.js.map +1 -0
- package/dist/commands/User.d.ts +10 -0
- package/dist/commands/User.js +162 -0
- package/dist/commands/User.js.map +1 -0
- package/dist/helper/CliUtils.d.ts +6 -0
- package/dist/helper/CliUtils.js +20 -0
- package/dist/helper/CliUtils.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/models/internal/RettiwtConfig.d.ts +1 -3
- package/dist/models/internal/RettiwtConfig.js +1 -0
- package/dist/models/internal/RettiwtConfig.js.map +1 -1
- package/dist/models/public/CursoredData.d.ts +0 -3
- package/dist/models/public/CursoredData.js +0 -1
- package/dist/models/public/CursoredData.js.map +1 -1
- package/dist/models/public/List.d.ts +0 -7
- package/dist/models/public/List.js.map +1 -1
- package/dist/models/public/Tweet.d.ts +0 -20
- package/dist/models/public/Tweet.js +0 -4
- package/dist/models/public/Tweet.js.map +1 -1
- package/dist/models/public/User.d.ts +0 -14
- package/dist/models/public/User.js.map +1 -1
- package/dist/services/internal/FetcherService.d.ts +7 -0
- package/dist/services/internal/FetcherService.js +25 -1
- package/dist/services/internal/FetcherService.js.map +1 -1
- package/dist/services/public/TweetService.d.ts +138 -0
- package/dist/services/public/TweetService.js +138 -0
- package/dist/services/public/TweetService.js.map +1 -1
- package/dist/services/public/UserService.d.ts +122 -1
- package/dist/services/public/UserService.js +122 -1
- package/dist/services/public/UserService.js.map +1 -1
- package/dist/types/internal/RettiwtConfig.d.ts +2 -0
- package/package.json +6 -2
- package/src/Rettiwt.ts +37 -1
- package/src/cli.ts +40 -0
- package/src/commands/Auth.ts +45 -0
- package/src/commands/Tweet.ts +163 -0
- package/src/commands/User.ts +85 -0
- package/src/helper/CliUtils.ts +15 -0
- package/src/index.ts +2 -0
- package/src/models/internal/RettiwtConfig.ts +2 -5
- package/src/models/public/CursoredData.ts +0 -4
- package/src/models/public/List.ts +0 -13
- package/src/models/public/Tweet.ts +0 -37
- package/src/models/public/User.ts +0 -27
- package/src/services/internal/FetcherService.ts +28 -1
- package/src/services/public/TweetService.ts +138 -0
- package/src/services/public/UserService.ts +122 -1
- package/src/types/internal/RettiwtConfig.ts +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tweet.js","sourceRoot":"","sources":["../../src/commands/Tweet.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,WAAW;AACX,uCAAmD;AAEnD,6CAA2C;AAE3C,UAAU;AACV,+CAA4C;AAE5C;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,OAAgB;IAA5C,iBAsGC;IArGA,+BAA+B;IAC/B,IAAM,KAAK,GAAG,IAAA,yBAAa,EAAC,OAAO,CAAC,CAAC,WAAW,CAAC,qCAAqC,CAAC,CAAC;IAExF,UAAU;IACV,KAAK;SACH,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,8CAA8C,CAAC;SAC3D,QAAQ,CAAC,MAAM,EAAE,qDAAqD,CAAC;SACvE,MAAM,CAAC,UAAO,EAAU;;;;wBACR,qBAAM,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,EAAA;;oBAAzC,OAAO,GAAG,SAA+B;oBAC/C,IAAA,iBAAM,EAAC,OAAO,CAAC,CAAC;;;;SAChB,CAAC,CAAC;IAEJ,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|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { Rettiwt } from '../Rettiwt';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new 'user' command which uses the given Rettiwt instance.
|
|
5
|
+
*
|
|
6
|
+
* @param rettiwt - The Rettiwt instance to use.
|
|
7
|
+
* @returns The created 'user' command.
|
|
8
|
+
*/
|
|
9
|
+
declare function createUserCommand(rettiwt: Rettiwt): Command;
|
|
10
|
+
export default createUserCommand;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
// PACKAGES
|
|
40
|
+
var commander_1 = require("commander");
|
|
41
|
+
// UTILITY
|
|
42
|
+
var CliUtils_1 = require("../helper/CliUtils");
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new 'user' command which uses the given Rettiwt instance.
|
|
45
|
+
*
|
|
46
|
+
* @param rettiwt - The Rettiwt instance to use.
|
|
47
|
+
* @returns The created 'user' command.
|
|
48
|
+
*/
|
|
49
|
+
function createUserCommand(rettiwt) {
|
|
50
|
+
var _this = this;
|
|
51
|
+
// Creating the 'user' command
|
|
52
|
+
var user = (0, commander_1.createCommand)('user').description('Access resources releated to users');
|
|
53
|
+
// Details
|
|
54
|
+
user.command('details')
|
|
55
|
+
.description('Fetch the details of the user with the given id/username')
|
|
56
|
+
.argument('<id>', 'The username/id of the user whose details are to be fetched')
|
|
57
|
+
.action(function (id) { return __awaiter(_this, void 0, void 0, function () {
|
|
58
|
+
var details;
|
|
59
|
+
return __generator(this, function (_a) {
|
|
60
|
+
switch (_a.label) {
|
|
61
|
+
case 0: return [4 /*yield*/, rettiwt.user.details(id)];
|
|
62
|
+
case 1:
|
|
63
|
+
details = _a.sent();
|
|
64
|
+
(0, CliUtils_1.output)(details);
|
|
65
|
+
return [2 /*return*/];
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}); });
|
|
69
|
+
// Following
|
|
70
|
+
user.command('following')
|
|
71
|
+
.description('Fetch the list of users who are followed by the given user')
|
|
72
|
+
.argument('<id>', 'The id of the user')
|
|
73
|
+
.argument('[count]', 'The number of following to fetch')
|
|
74
|
+
.argument('[cursor]', 'The cursor to the batch of following to fetch')
|
|
75
|
+
.action(function (id, count, cursor) { return __awaiter(_this, void 0, void 0, function () {
|
|
76
|
+
var users;
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0: return [4 /*yield*/, rettiwt.user.following(id, count ? parseInt(count) : undefined, cursor)];
|
|
80
|
+
case 1:
|
|
81
|
+
users = _a.sent();
|
|
82
|
+
(0, CliUtils_1.output)(users);
|
|
83
|
+
return [2 /*return*/];
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}); });
|
|
87
|
+
// Followers
|
|
88
|
+
user.command('followers')
|
|
89
|
+
.description('Fetch the list of users who follow the given user')
|
|
90
|
+
.argument('<id>', 'The id of the user')
|
|
91
|
+
.argument('[count]', 'The number of followers to fetch')
|
|
92
|
+
.argument('[cursor]', 'The cursor to the batch of followers to fetch')
|
|
93
|
+
.action(function (id, count, cursor) { return __awaiter(_this, void 0, void 0, function () {
|
|
94
|
+
var users;
|
|
95
|
+
return __generator(this, function (_a) {
|
|
96
|
+
switch (_a.label) {
|
|
97
|
+
case 0: return [4 /*yield*/, rettiwt.user.followers(id, count ? parseInt(count) : undefined, cursor)];
|
|
98
|
+
case 1:
|
|
99
|
+
users = _a.sent();
|
|
100
|
+
(0, CliUtils_1.output)(users);
|
|
101
|
+
return [2 /*return*/];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}); });
|
|
105
|
+
// Likes
|
|
106
|
+
user.command('likes')
|
|
107
|
+
.description('Fetch the list of tweets liked by the given user')
|
|
108
|
+
.argument('<id>', 'The id of the user')
|
|
109
|
+
.argument('[count]', 'The number of liked tweets to fetch')
|
|
110
|
+
.argument('[cursor]', 'The cursor to the batch of liked tweets to fetch')
|
|
111
|
+
.action(function (id, count, cursor) { return __awaiter(_this, void 0, void 0, function () {
|
|
112
|
+
var users;
|
|
113
|
+
return __generator(this, function (_a) {
|
|
114
|
+
switch (_a.label) {
|
|
115
|
+
case 0: return [4 /*yield*/, rettiwt.user.likes(id, count ? parseInt(count) : undefined, cursor)];
|
|
116
|
+
case 1:
|
|
117
|
+
users = _a.sent();
|
|
118
|
+
(0, CliUtils_1.output)(users);
|
|
119
|
+
return [2 /*return*/];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}); });
|
|
123
|
+
// Timeline
|
|
124
|
+
user.command('timeline')
|
|
125
|
+
.description('Fetch the tweets timeline the given user')
|
|
126
|
+
.argument('<id>', 'The id of the user')
|
|
127
|
+
.argument('[count]', 'The number of tweets to fetch')
|
|
128
|
+
.argument('[cursor]', 'The cursor to the batch of tweets to fetch')
|
|
129
|
+
.action(function (id, count, cursor) { return __awaiter(_this, void 0, void 0, function () {
|
|
130
|
+
var users;
|
|
131
|
+
return __generator(this, function (_a) {
|
|
132
|
+
switch (_a.label) {
|
|
133
|
+
case 0: return [4 /*yield*/, rettiwt.user.timeline(id, count ? parseInt(count) : undefined, cursor)];
|
|
134
|
+
case 1:
|
|
135
|
+
users = _a.sent();
|
|
136
|
+
(0, CliUtils_1.output)(users);
|
|
137
|
+
return [2 /*return*/];
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}); });
|
|
141
|
+
// Replies
|
|
142
|
+
user.command('replies')
|
|
143
|
+
.description('Fetch the replies timeline the given user')
|
|
144
|
+
.argument('<id>', 'The id of the user')
|
|
145
|
+
.argument('[count]', 'The number of replies to fetch')
|
|
146
|
+
.argument('[cursor]', 'The cursor to the batch of replies to fetch')
|
|
147
|
+
.action(function (id, count, cursor) { return __awaiter(_this, void 0, void 0, function () {
|
|
148
|
+
var users;
|
|
149
|
+
return __generator(this, function (_a) {
|
|
150
|
+
switch (_a.label) {
|
|
151
|
+
case 0: return [4 /*yield*/, rettiwt.user.replies(id, count ? parseInt(count) : undefined, cursor)];
|
|
152
|
+
case 1:
|
|
153
|
+
users = _a.sent();
|
|
154
|
+
(0, CliUtils_1.output)(users);
|
|
155
|
+
return [2 /*return*/];
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}); });
|
|
159
|
+
return user;
|
|
160
|
+
}
|
|
161
|
+
exports.default = createUserCommand;
|
|
162
|
+
//# sourceMappingURL=User.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../src/commands/User.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,WAAW;AACX,uCAAmD;AAGnD,UAAU;AACV,+CAA4C;AAE5C;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,OAAgB;IAA3C,iBAqEC;IApEA,8BAA8B;IAC9B,IAAM,IAAI,GAAG,IAAA,yBAAa,EAAC,MAAM,CAAC,CAAC,WAAW,CAAC,oCAAoC,CAAC,CAAC;IAErF,UAAU;IACV,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;SACrB,WAAW,CAAC,0DAA0D,CAAC;SACvE,QAAQ,CAAC,MAAM,EAAE,6DAA6D,CAAC;SAC/E,MAAM,CAAC,UAAO,EAAU;;;;wBACR,qBAAM,OAAO,CAA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C,CAAC;SACrD,QAAQ,CAAC,UAAU,EAAE,6CAA6C,CAAC;SACnE,MAAM,CAAC,UAAO,EAAU,EAAE,KAAc,EAAE,MAAe;;;;wBAC3C,qBAAM,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,EAAA;;oBAAnF,KAAK,GAAG,SAA2E;oBACzF,IAAA,iBAAM,EAAC,KAAK,CAAC,CAAC;;;;SACd,CAAC,CAAC;IAEJ,OAAO,IAAI,CAAC;AACb,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.output = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Outputs the given JSON data.
|
|
6
|
+
*
|
|
7
|
+
* @param data - The data to be output.
|
|
8
|
+
*/
|
|
9
|
+
function output(data) {
|
|
10
|
+
// If data is string, output as is
|
|
11
|
+
if (typeof data == 'string') {
|
|
12
|
+
console.log(data);
|
|
13
|
+
}
|
|
14
|
+
// Else, format the output
|
|
15
|
+
else {
|
|
16
|
+
console.log(JSON.stringify(data, null, 4));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.output = output;
|
|
20
|
+
//# sourceMappingURL=CliUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CliUtils.js","sourceRoot":"","sources":["../../src/helper/CliUtils.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,SAAgB,MAAM,CAAC,IAA0B;IAChD,kCAAkC;IAClC,IAAI,OAAO,IAAI,IAAI,QAAQ,EAAE;QAC5B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KAClB;IACD,0BAA0B;SACrB;QACJ,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;KAC3C;AACF,CAAC;AATD,wBASC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './models/public/CursoredData';
|
|
|
7
7
|
export * from './models/public/List';
|
|
8
8
|
export * from './models/public/Tweet';
|
|
9
9
|
export * from './models/public/User';
|
|
10
|
+
export { TweetFilter } from 'rettiwt-core';
|
|
10
11
|
export * from './services/internal/FetcherService';
|
|
11
12
|
export * from './services/internal/LogService';
|
|
12
13
|
export * from './services/public/TweetService';
|
|
@@ -16,3 +17,4 @@ export * from './types/public/CursoredData';
|
|
|
16
17
|
export * from './types/public/List';
|
|
17
18
|
export * from './types/public/Tweet';
|
|
18
19
|
export * from './types/public/User';
|
|
20
|
+
export { ITweetFilter } from 'rettiwt-core';
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.TweetFilter = void 0;
|
|
17
18
|
// MAIN
|
|
18
19
|
__exportStar(require("./Rettiwt"), exports);
|
|
19
20
|
// Exporting enums
|
|
@@ -26,6 +27,8 @@ __exportStar(require("./models/public/CursoredData"), exports);
|
|
|
26
27
|
__exportStar(require("./models/public/List"), exports);
|
|
27
28
|
__exportStar(require("./models/public/Tweet"), exports);
|
|
28
29
|
__exportStar(require("./models/public/User"), exports);
|
|
30
|
+
var rettiwt_core_1 = require("rettiwt-core");
|
|
31
|
+
Object.defineProperty(exports, "TweetFilter", { enumerable: true, get: function () { return rettiwt_core_1.TweetFilter; } });
|
|
29
32
|
// Exporting services
|
|
30
33
|
__exportStar(require("./services/internal/FetcherService"), exports);
|
|
31
34
|
__exportStar(require("./services/internal/LogService"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAO;AACP,4CAA0B;AAE1B,kBAAkB;AAClB,oDAAkC;AAClC,+CAA6B;AAC7B,kDAAgC;AAEhC,mBAAmB;AACnB,kEAAgD;AAChD,+DAA6C;AAC7C,uDAAqC;AACrC,wDAAsC;AACtC,uDAAqC;AACrC,6CAA2C;AAAlC,2GAAA,WAAW,OAAA;AAEpB,qBAAqB;AACrB,qEAAmD;AACnD,iEAA+C;AAC/C,iEAA+C;AAC/C,gEAA8C;AAE9C,kBAAkB;AAClB,iEAA+C;AAC/C,8DAA4C;AAC5C,sDAAoC;AACpC,uDAAqC;AACrC,sDAAoC"}
|
|
@@ -5,11 +5,9 @@ import { IRettiwtConfig } from '../../types/internal/RettiwtConfig';
|
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
7
|
export declare class RettiwtConfig implements IRettiwtConfig {
|
|
8
|
-
/** The apiKey (cookie) to use for authenticating Rettiwt against Twitter API. */
|
|
9
8
|
apiKey?: string;
|
|
10
|
-
|
|
9
|
+
guestKey?: string;
|
|
11
10
|
proxyUrl?: URL;
|
|
12
|
-
/** Whether to write logs to console or not. */
|
|
13
11
|
logging?: boolean;
|
|
14
12
|
/**
|
|
15
13
|
* Initializes a new configuration object from the given config.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RettiwtConfig.js","sourceRoot":"","sources":["../../../src/models/internal/RettiwtConfig.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH;
|
|
1
|
+
{"version":3,"file":"RettiwtConfig.js","sourceRoot":"","sources":["../../../src/models/internal/RettiwtConfig.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH;IAMC;;;;OAIG;IACH,uBAAmB,MAAqB;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAC/B,CAAC;IACF,oBAAC;AAAD,CAAC,AAjBD,IAiBC;AAjBY,sCAAa"}
|
|
@@ -9,9 +9,7 @@ import { ICursor, ICursoredData } from '../../types/public/CursoredData';
|
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
11
|
export declare class CursoredData<T extends Tweet | User> implements ICursoredData<T> {
|
|
12
|
-
/** The list of data of the given type. */
|
|
13
12
|
list: T[];
|
|
14
|
-
/** The cursor to the next batch of data. */
|
|
15
13
|
next: Cursor;
|
|
16
14
|
/**
|
|
17
15
|
* @param list - The list of data item to store.
|
|
@@ -25,7 +23,6 @@ export declare class CursoredData<T extends Tweet | User> implements ICursoredDa
|
|
|
25
23
|
* @public
|
|
26
24
|
*/
|
|
27
25
|
export declare class Cursor implements ICursor {
|
|
28
|
-
/** The cursor string. */
|
|
29
26
|
value: string;
|
|
30
27
|
/**
|
|
31
28
|
* Initializes a new cursor from the given cursor string.
|
|
@@ -16,7 +16,6 @@ var CursoredData = /** @class */ (function () {
|
|
|
16
16
|
function CursoredData(list, next) {
|
|
17
17
|
if (list === void 0) { list = []; }
|
|
18
18
|
if (next === void 0) { next = ''; }
|
|
19
|
-
/** The list of data of the given type. */
|
|
20
19
|
this.list = [];
|
|
21
20
|
this.list = list;
|
|
22
21
|
this.next = new Cursor(next);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CursoredData.js","sourceRoot":"","sources":["../../../src/models/public/CursoredData.ts"],"names":[],"mappings":";;;AAOA;;;;;;GAMG;AACH;
|
|
1
|
+
{"version":3,"file":"CursoredData.js","sourceRoot":"","sources":["../../../src/models/public/CursoredData.ts"],"names":[],"mappings":";;;AAOA;;;;;;GAMG;AACH;IAIC;;;OAGG;IACH,sBAAmB,IAAc,EAAE,IAAiB;QAAjC,qBAAA,EAAA,SAAc;QAAE,qBAAA,EAAA,SAAiB;QAP7C,SAAI,GAAQ,EAAE,CAAC;QAQrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IACF,mBAAC;AAAD,CAAC,AAZD,IAYC;AAZY,oCAAY;AAczB;;;;GAIG;AACH;IAGC;;;;OAIG;IACH,gBAAmB,SAAiB;QACnC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;IACxB,CAAC;IACF,aAAC;AAAD,CAAC,AAXD,IAWC;AAXY,wBAAM"}
|
|
@@ -6,19 +6,12 @@ import { IList } from '../../types/public/List';
|
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
8
|
export declare class List implements IList {
|
|
9
|
-
/** The rest id of the list. */
|
|
10
9
|
id: string;
|
|
11
|
-
/** The name of the list. */
|
|
12
10
|
name: string;
|
|
13
|
-
/** The date and time of creation of the list, int UTC string format. */
|
|
14
11
|
createdAt: string;
|
|
15
|
-
/** The list description. */
|
|
16
12
|
description: string;
|
|
17
|
-
/** The number of memeber of the list. */
|
|
18
13
|
memberCount: number;
|
|
19
|
-
/** The number of subscribers of the list. */
|
|
20
14
|
subscriberCount: number;
|
|
21
|
-
/** The rest id of the user who created the list. */
|
|
22
15
|
createdBy: string;
|
|
23
16
|
/**
|
|
24
17
|
* Initializes a new Tweet List from the given raw list data.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/models/public/List.ts"],"names":[],"mappings":";;;AAMA;;;;GAIG;AACH;
|
|
1
|
+
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/models/public/List.ts"],"names":[],"mappings":";;;AAMA;;;;GAIG;AACH;IASC;;;;OAIG;IACH,cAAmB,IAAc;QAChC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;QACzD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;QACrC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAC7C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;IAC9C,CAAC;IACF,WAAC;AAAD,CAAC,AAvBD,IAuBC;AAvBY,oBAAI"}
|
|
@@ -7,35 +7,20 @@ import { User } from './User';
|
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
9
|
export declare class Tweet implements ITweet {
|
|
10
|
-
/** The rest id of the tweet. */
|
|
11
10
|
id: string;
|
|
12
|
-
/** The details of the user who made the tweet. */
|
|
13
11
|
tweetBy: User;
|
|
14
|
-
/** The date and time of creation of the tweet, in UTC string format. */
|
|
15
12
|
createdAt: string;
|
|
16
|
-
/** Additional tweet entities like urls, mentions, etc. */
|
|
17
13
|
entities: TweetEntities;
|
|
18
|
-
/** The urls of the media contents of the tweet (if any). */
|
|
19
14
|
media: TweetMedia[];
|
|
20
|
-
/** The rest id of the tweet which is quoted in the tweet. */
|
|
21
15
|
quoted: string;
|
|
22
|
-
/** The full text content of the tweet. */
|
|
23
16
|
fullText: string;
|
|
24
|
-
/** The rest id of the user to which the tweet is a reply. */
|
|
25
17
|
replyTo: string;
|
|
26
|
-
/** The language in which the tweet is written. */
|
|
27
18
|
lang: string;
|
|
28
|
-
/** The number of quotes of the tweet. */
|
|
29
19
|
quoteCount: number;
|
|
30
|
-
/** The number of replies to the tweet. */
|
|
31
20
|
replyCount: number;
|
|
32
|
-
/** The number of retweets of the tweet. */
|
|
33
21
|
retweetCount: number;
|
|
34
|
-
/** The number of likes of the tweet. */
|
|
35
22
|
likeCount: number;
|
|
36
|
-
/** The number of views of a tweet. */
|
|
37
23
|
viewCount: number;
|
|
38
|
-
/** The number of bookmarks of a tweet. */
|
|
39
24
|
bookmarkCount: number;
|
|
40
25
|
/**
|
|
41
26
|
* Initializes a new Tweet from the given raw tweet data.
|
|
@@ -50,11 +35,8 @@ export declare class Tweet implements ITweet {
|
|
|
50
35
|
* @public
|
|
51
36
|
*/
|
|
52
37
|
export declare class TweetEntities implements ITweetEntities {
|
|
53
|
-
/** The list of hashtags mentioned in the tweet. */
|
|
54
38
|
hashtags: string[];
|
|
55
|
-
/** The list of urls mentioned in the tweet. */
|
|
56
39
|
urls: string[];
|
|
57
|
-
/** The list of IDs of users mentioned in the tweet. */
|
|
58
40
|
mentionedUsers: string[];
|
|
59
41
|
/**
|
|
60
42
|
* Initializes the TweetEntities from the raw tweet entities.
|
|
@@ -69,9 +51,7 @@ export declare class TweetEntities implements ITweetEntities {
|
|
|
69
51
|
* @public
|
|
70
52
|
*/
|
|
71
53
|
export declare class TweetMedia {
|
|
72
|
-
/** The type of media. */
|
|
73
54
|
type: EMediaType;
|
|
74
|
-
/** The direct URL to the media. */
|
|
75
55
|
url: string;
|
|
76
56
|
/**
|
|
77
57
|
* Initializes the TweetMedia from the raw tweet media.
|
|
@@ -51,11 +51,8 @@ var TweetEntities = /** @class */ (function () {
|
|
|
51
51
|
* @param entities - The raw tweet entities.
|
|
52
52
|
*/
|
|
53
53
|
function TweetEntities(entities) {
|
|
54
|
-
/** The list of hashtags mentioned in the tweet. */
|
|
55
54
|
this.hashtags = [];
|
|
56
|
-
/** The list of urls mentioned in the tweet. */
|
|
57
55
|
this.urls = [];
|
|
58
|
-
/** The list of IDs of users mentioned in the tweet. */
|
|
59
56
|
this.mentionedUsers = [];
|
|
60
57
|
// Extracting user mentions
|
|
61
58
|
if (entities.user_mentions) {
|
|
@@ -96,7 +93,6 @@ var TweetMedia = /** @class */ (function () {
|
|
|
96
93
|
function TweetMedia(media) {
|
|
97
94
|
var _this = this;
|
|
98
95
|
var _a, _b;
|
|
99
|
-
/** The direct URL to the media. */
|
|
100
96
|
this.url = '';
|
|
101
97
|
this.type = media.type;
|
|
102
98
|
// If the media is a photo
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tweet.js","sourceRoot":"","sources":["../../../src/models/public/Tweet.ts"],"names":[],"mappings":";;;AAAA,WAAW;AACX,6CAKsB;AAKtB,SAAS;AACT,+BAA8B;AAE9B,UAAU;AACV,oDAAuD;AAEvD;;;;GAIG;AACH;
|
|
1
|
+
{"version":3,"file":"Tweet.js","sourceRoot":"","sources":["../../../src/models/public/Tweet.ts"],"names":[],"mappings":";;;AAAA,WAAW;AACX,6CAKsB;AAKtB,SAAS;AACT,+BAA8B;AAE9B,UAAU;AACV,oDAAuD;AAEvD;;;;GAIG;AACH;IAiBC;;;;OAIG;IACH,eAAmB,KAAgB;;QAClC,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,IAAI,WAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,QAAQ,GAAG,IAAI,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACzD,IAAI,CAAC,KAAK,GAAG,MAAA,MAAA,KAAK,CAAC,MAAM,CAAC,iBAAiB,0CAAE,KAAK,0CAAE,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,IAAI,UAAU,CAAC,KAAK,CAAC,EAArB,CAAqB,CAAC,CAAC;QAC1F,IAAI,CA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AC9B,KAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;iBACvB;YACF,CAAC,CAAC,CAAC;SACH;IACF,CAAC;IACF,iBAAC;AAAD,CAAC,AApCD,IAoCC;AApCY,gCAAU"}
|
|
@@ -6,33 +6,19 @@ import { IUser } from '../../types/public/User';
|
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
8
|
export declare class User implements IUser {
|
|
9
|
-
/** The rest id of the user. */
|
|
10
9
|
id: string;
|
|
11
|
-
/** The username/screenname of the user. */
|
|
12
10
|
userName: string;
|
|
13
|
-
/** The full name of the user. */
|
|
14
11
|
fullName: string;
|
|
15
|
-
/** The creation date of user's account. */
|
|
16
12
|
createdAt: string;
|
|
17
|
-
/** The user's description. */
|
|
18
13
|
description: string;
|
|
19
|
-
/** Whether the account is verified or not. */
|
|
20
14
|
isVerified: boolean;
|
|
21
|
-
/** The number of tweets liked by the user. */
|
|
22
15
|
favouritesCount: number;
|
|
23
|
-
/** The number of followers of the user. */
|
|
24
16
|
followersCount: number;
|
|
25
|
-
/** The number of following of the user. */
|
|
26
17
|
followingsCount: number;
|
|
27
|
-
/** The number of tweets made by the user. */
|
|
28
18
|
statusesCount: number;
|
|
29
|
-
/** The location of user as provided by user. */
|
|
30
19
|
location: string;
|
|
31
|
-
/** The rest id of the tweet pinned in the user's profile. */
|
|
32
20
|
pinnedTweet: string;
|
|
33
|
-
/** The url of the profile banner image. */
|
|
34
21
|
profileBanner: string;
|
|
35
|
-
/** The url of the profile image. */
|
|
36
22
|
profileImage: string;
|
|
37
23
|
/**
|
|
38
24
|
* Initializes a new User from the given raw user data.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/models/public/User.ts"],"names":[],"mappings":";;;AAMA;;;;GAIG;AACH;
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/models/public/User.ts"],"names":[],"mappings":";;;AAMA;;;;GAIG;AACH;IAgBC;;;;OAIG;IACH,cAAmB,IAAc;QAChC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QAC3C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACvC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACpD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;QAClD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;QACjD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAChD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;QACvD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;QACpD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC;IACzD,CAAC;IACF,WAAC;AAAD,CAAC,AArCD,IAqCC;AArCY,oBAAI"}
|
|
@@ -28,6 +28,13 @@ export declare class FetcherService {
|
|
|
28
28
|
* @returns The generated AuthCredential.
|
|
29
29
|
*/
|
|
30
30
|
private getAuthCredential;
|
|
31
|
+
/**
|
|
32
|
+
* Returns an AuthCredential generated using the given guest key.
|
|
33
|
+
*
|
|
34
|
+
* @param guestKey - The guest key to use for authenticating as guest.
|
|
35
|
+
* @returns The generated AuthCredential.
|
|
36
|
+
*/
|
|
37
|
+
private getGuestCredential;
|
|
31
38
|
/**
|
|
32
39
|
* Checks the authorization status based on the requested resource.
|
|
33
40
|
*
|
|
@@ -67,7 +67,18 @@ var FetcherService = /** @class */ (function () {
|
|
|
67
67
|
* @param config - The config object for configuring the Rettiwt instance.
|
|
68
68
|
*/
|
|
69
69
|
function FetcherService(config) {
|
|
70
|
-
|
|
70
|
+
// If API key is supplied
|
|
71
|
+
if (config === null || config === void 0 ? void 0 : config.apiKey) {
|
|
72
|
+
this.cred = this.getAuthCredential(config.apiKey);
|
|
73
|
+
}
|
|
74
|
+
// If guest key is supplied
|
|
75
|
+
else if (config === null || config === void 0 ? void 0 : config.guestKey) {
|
|
76
|
+
this.cred = this.getGuestCredential(config.guestKey);
|
|
77
|
+
}
|
|
78
|
+
// If no key is supplied
|
|
79
|
+
else {
|
|
80
|
+
this.cred = undefined;
|
|
81
|
+
}
|
|
71
82
|
this.isAuthenticated = (config === null || config === void 0 ? void 0 : config.apiKey) ? true : false;
|
|
72
83
|
this.httpsAgent = this.getHttpsAgent(config === null || config === void 0 ? void 0 : config.proxyUrl);
|
|
73
84
|
this.logger = new LogService_1.LogService(config === null || config === void 0 ? void 0 : config.logging);
|
|
@@ -79,8 +90,21 @@ var FetcherService = /** @class */ (function () {
|
|
|
79
90
|
* @returns The generated AuthCredential.
|
|
80
91
|
*/
|
|
81
92
|
FetcherService.prototype.getAuthCredential = function (apiKey) {
|
|
93
|
+
// Converting apiKey from base64 to string
|
|
94
|
+
apiKey = Buffer.from(apiKey, 'base64').toString('ascii');
|
|
82
95
|
return new rettiwt_auth_1.AuthCredential(apiKey.split(';'));
|
|
83
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* Returns an AuthCredential generated using the given guest key.
|
|
99
|
+
*
|
|
100
|
+
* @param guestKey - The guest key to use for authenticating as guest.
|
|
101
|
+
* @returns The generated AuthCredential.
|
|
102
|
+
*/
|
|
103
|
+
FetcherService.prototype.getGuestCredential = function (guestKey) {
|
|
104
|
+
// Converting guestKey from base64 to string
|
|
105
|
+
guestKey = Buffer.from(guestKey).toString('ascii');
|
|
106
|
+
return new rettiwt_auth_1.AuthCredential(undefined, guestKey);
|
|
107
|
+
};
|
|
84
108
|
/**
|
|
85
109
|
* Checks the authorization status based on the requested resource.
|
|
86
110
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetcherService.js","sourceRoot":"","sources":["../../../src/services/internal/FetcherService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,WAAW;AACX,6CAWsB;AACtB,gDAAsF;AACtF,gDAAqC;AACrC,6CAAoD;AACpD,uDAAoD;AAEpD,WAAW;AACX,2CAA0C;AAE1C,QAAQ;AACR,yCAA+C;AAC/C,mDAAmD;AACnD,+CAAkD;AAIlD,iEAAgE;AAChE,mDAAkD;AAClD,iDAAgD;AAEhD,UAAU;AACV,oDAAsE;AAEtE;;;;GAIG;AACH;IAaC;;OAEG;IACH,wBAAmB,MAAsB;QACxC,IAAI,CAAC,IAAI,GAAG,
|
|
1
|
+
{"version":3,"file":"FetcherService.js","sourceRoot":"","sources":["../../../src/services/internal/FetcherService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,WAAW;AACX,6CAWsB;AACtB,gDAAsF;AACtF,gDAAqC;AACrC,6CAAoD;AACpD,uDAAoD;AAEpD,WAAW;AACX,2CAA0C;AAE1C,QAAQ;AACR,yCAA+C;AAC/C,mDAAmD;AACnD,+CAAkD;AAIlD,iEAAgE;AAChE,mDAAkD;AAClD,iDAAgD;AAEhD,UAAU;AACV,oDAAsE;AAEtE;;;;GAIG;AACH;IAaC;;OAEG;IACH,wBAAmB,MAAsB;QACxC,yBAAyB;QACzB,IAAI,MAAM,aAAN,MAAM,uBAAN,MAA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