rettiwt-api 2.4.2 → 2.5.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.
Files changed (133) hide show
  1. package/.eslintrc.js +5 -0
  2. package/.github/workflows/documentation.yml +1 -1
  3. package/.github/workflows/publish.yml +1 -1
  4. package/.prettierrc +1 -1
  5. package/README.md +69 -19
  6. package/dist/Rettiwt.d.ts +7 -4
  7. package/dist/Rettiwt.js +4 -2
  8. package/dist/Rettiwt.js.map +1 -1
  9. package/dist/cli.js +1 -1
  10. package/dist/cli.js.map +1 -1
  11. package/dist/commands/Auth.d.ts +2 -1
  12. package/dist/commands/Auth.js +10 -17
  13. package/dist/commands/Auth.js.map +1 -1
  14. package/dist/commands/Tweet.js +36 -3
  15. package/dist/commands/Tweet.js.map +1 -1
  16. package/dist/enums/{ApiErrors.js → Api.js} +1 -1
  17. package/dist/enums/Api.js.map +1 -0
  18. package/dist/enums/Http.d.ts +68 -0
  19. package/dist/enums/Http.js +73 -0
  20. package/dist/enums/Http.js.map +1 -0
  21. package/dist/enums/Logging.d.ts +1 -0
  22. package/dist/enums/Logging.js +1 -0
  23. package/dist/enums/Logging.js.map +1 -1
  24. package/dist/index.d.ts +15 -14
  25. package/dist/index.js +21 -17
  26. package/dist/index.js.map +1 -1
  27. package/dist/models/{public → data}/CursoredData.d.ts +5 -3
  28. package/dist/models/{public → data}/CursoredData.js +1 -0
  29. package/dist/models/data/CursoredData.js.map +1 -0
  30. package/dist/{types/public → models/data}/List.d.ts +8 -1
  31. package/dist/models/data/List.js.map +1 -0
  32. package/dist/models/data/Media.d.ts +14 -0
  33. package/dist/models/data/Media.js +19 -0
  34. package/dist/models/data/Media.js.map +1 -0
  35. package/dist/{types/public → models/data}/Tweet.d.ts +26 -8
  36. package/dist/models/{public → data}/Tweet.js +4 -0
  37. package/dist/models/data/Tweet.js.map +1 -0
  38. package/dist/{types/public → models/data}/User.d.ts +8 -1
  39. package/dist/models/data/User.js.map +1 -0
  40. package/dist/models/errors/ApiError.d.ts +17 -0
  41. package/dist/models/errors/ApiError.js +42 -0
  42. package/dist/models/errors/ApiError.js.map +1 -0
  43. package/dist/models/errors/HttpError.d.ts +17 -0
  44. package/dist/models/errors/HttpError.js +42 -0
  45. package/dist/models/errors/HttpError.js.map +1 -0
  46. package/dist/models/errors/RettiwtError.d.ts +8 -0
  47. package/dist/models/errors/RettiwtError.js +34 -0
  48. package/dist/models/errors/RettiwtError.js.map +1 -0
  49. package/dist/models/errors/TimeoutError.d.ts +14 -0
  50. package/dist/models/errors/TimeoutError.js +39 -0
  51. package/dist/models/errors/TimeoutError.js.map +1 -0
  52. package/dist/services/internal/ErrorService.d.ts +85 -0
  53. package/dist/services/internal/ErrorService.js +144 -0
  54. package/dist/services/internal/ErrorService.js.map +1 -0
  55. package/dist/services/internal/FetcherService.d.ts +22 -24
  56. package/dist/services/internal/FetcherService.js +79 -59
  57. package/dist/services/internal/FetcherService.js.map +1 -1
  58. package/dist/services/public/AuthService.d.ts +66 -0
  59. package/dist/services/public/AuthService.js +160 -0
  60. package/dist/services/public/AuthService.js.map +1 -0
  61. package/dist/services/public/TweetService.d.ts +27 -8
  62. package/dist/services/public/TweetService.js +40 -5
  63. package/dist/services/public/TweetService.js.map +1 -1
  64. package/dist/services/public/UserService.d.ts +5 -5
  65. package/dist/services/public/UserService.js.map +1 -1
  66. package/dist/types/ErrorHandler.d.ts +13 -0
  67. package/dist/types/{public/User.js → ErrorHandler.js} +1 -1
  68. package/dist/types/ErrorHandler.js.map +1 -0
  69. package/dist/types/RettiwtConfig.d.ts +32 -0
  70. package/dist/types/RettiwtConfig.js.map +1 -0
  71. package/dist/types/args/TweetMediaArgs.d.ts +15 -0
  72. package/dist/types/{public/CursoredData.js → args/TweetMediaArgs.js} +1 -1
  73. package/dist/types/args/TweetMediaArgs.js.map +1 -0
  74. package/package.json +5 -5
  75. package/src/Rettiwt.ts +10 -5
  76. package/src/cli.ts +1 -1
  77. package/src/commands/Auth.ts +5 -16
  78. package/src/commands/Tweet.ts +56 -3
  79. package/src/enums/Http.ts +68 -0
  80. package/src/enums/Logging.ts +1 -0
  81. package/src/index.ts +23 -18
  82. package/src/models/{public → data}/CursoredData.ts +6 -5
  83. package/src/models/{public → data}/List.ts +14 -4
  84. package/src/models/data/Media.ts +19 -0
  85. package/src/models/{public → data}/Tweet.ts +39 -5
  86. package/src/models/{public → data}/User.ts +28 -4
  87. package/src/models/errors/ApiError.ts +24 -0
  88. package/src/models/errors/HttpError.ts +24 -0
  89. package/src/models/errors/RettiwtError.ts +12 -0
  90. package/src/models/errors/TimeoutError.ts +18 -0
  91. package/src/services/internal/ErrorService.ts +158 -0
  92. package/src/services/internal/FetcherService.ts +94 -80
  93. package/src/services/public/AuthService.ts +97 -0
  94. package/src/services/public/TweetService.ts +45 -10
  95. package/src/services/public/UserService.ts +7 -5
  96. package/src/types/ErrorHandler.ts +13 -0
  97. package/src/types/RettiwtConfig.ts +40 -0
  98. package/src/types/args/TweetMediaArgs.ts +16 -0
  99. package/dist/enums/ApiErrors.js.map +0 -1
  100. package/dist/enums/HTTP.d.ts +0 -17
  101. package/dist/enums/HTTP.js +0 -22
  102. package/dist/enums/HTTP.js.map +0 -1
  103. package/dist/models/internal/RettiwtConfig.d.ts +0 -18
  104. package/dist/models/internal/RettiwtConfig.js +0 -24
  105. package/dist/models/internal/RettiwtConfig.js.map +0 -1
  106. package/dist/models/public/CursoredData.js.map +0 -1
  107. package/dist/models/public/List.d.ts +0 -22
  108. package/dist/models/public/List.js.map +0 -1
  109. package/dist/models/public/Tweet.d.ts +0 -62
  110. package/dist/models/public/Tweet.js.map +0 -1
  111. package/dist/models/public/User.d.ts +0 -29
  112. package/dist/models/public/User.js.map +0 -1
  113. package/dist/types/internal/RettiwtConfig.d.ts +0 -15
  114. package/dist/types/internal/RettiwtConfig.js.map +0 -1
  115. package/dist/types/public/CursoredData.d.ts +0 -22
  116. package/dist/types/public/CursoredData.js.map +0 -1
  117. package/dist/types/public/List.js +0 -3
  118. package/dist/types/public/List.js.map +0 -1
  119. package/dist/types/public/Tweet.js +0 -3
  120. package/dist/types/public/Tweet.js.map +0 -1
  121. package/dist/types/public/User.js.map +0 -1
  122. package/src/enums/HTTP.ts +0 -17
  123. package/src/models/internal/RettiwtConfig.ts +0 -26
  124. package/src/types/internal/RettiwtConfig.ts +0 -18
  125. package/src/types/public/CursoredData.ts +0 -24
  126. package/src/types/public/List.ts +0 -27
  127. package/src/types/public/Tweet.ts +0 -86
  128. package/src/types/public/User.ts +0 -48
  129. /package/dist/enums/{ApiErrors.d.ts → Api.d.ts} +0 -0
  130. /package/dist/models/{public → data}/List.js +0 -0
  131. /package/dist/models/{public → data}/User.js +0 -0
  132. /package/dist/types/{internal/RettiwtConfig.js → RettiwtConfig.js} +0 -0
  133. /package/src/enums/{ApiErrors.ts → Api.ts} +0 -0
package/.eslintrc.js CHANGED
@@ -34,6 +34,11 @@ module.exports = {
34
34
  selector: ['variableLike', 'memberLike'],
35
35
  format: ['camelCase'],
36
36
  },
37
+ {
38
+ selector: ['variableLike', 'memberLike'],
39
+ modifiers: ['static', 'readonly'],
40
+ format: ['UPPER_CASE'],
41
+ },
37
42
  {
38
43
  selector: 'enumMember',
39
44
  format: ['UPPER_CASE'],
@@ -14,7 +14,7 @@ jobs:
14
14
  - uses: actions/checkout@v3
15
15
  - uses: actions/setup-node@v3
16
16
  with:
17
- node-version: '18.x'
17
+ node-version: '20.x'
18
18
 
19
19
  # Installing dependencies
20
20
  - run: yarn
@@ -14,7 +14,7 @@ jobs:
14
14
  - uses: actions/checkout@v3
15
15
  - uses: actions/setup-node@v3
16
16
  with:
17
- node-version: '18.x'
17
+ node-version: '20.x'
18
18
  registry-url: https://registry.npmjs.org/
19
19
 
20
20
  # Installing dependencies
package/.prettierrc CHANGED
@@ -3,7 +3,7 @@
3
3
  "bracketSpacing": true,
4
4
  "endOfLine": "auto",
5
5
  "printWidth": 120,
6
- "quoteProps": "consistent",
6
+ "quoteProps": "as-needed",
7
7
  "semi": true,
8
8
  "singleQuote": true,
9
9
  "tabWidth": 4,
package/README.md CHANGED
@@ -47,9 +47,9 @@ By default, Rettiwt-API uses 'guest' authentication. If however, access to the f
47
47
 
48
48
  Here,
49
49
 
50
- - \<email\> is the email of the Twitter account to be used for authentication.
51
- - \<username\> is the username associtated with the Twitter account.
52
- - \<password\> is the password to the Twitter account.
50
+ - `<email>` is the email of the Twitter account to be used for authentication.
51
+ - `<username>` is the username associated with the Twitter account.
52
+ - `<password>` is the password to the Twitter account.
53
53
 
54
54
  3. The string returned after running the command is the API_KEY. Store it in a secure place for later use.
55
55
 
@@ -68,7 +68,7 @@ The API_KEY generated by logging in is what allows Rettiwt-API to authenticate a
68
68
 
69
69
  - If you have no idea of programming, it's recommended to use the CLI.
70
70
  - The CLI provides an easy to use interface which does not require any knowledge of JavaScript or programming
71
- - Please skip to 'CLI-Usage' section for details.
71
+ - Please skip to [CLI-Usage](https://rishikant181.github.io/Rettiwt-API/#md:cli-usage) for details.
72
72
 
73
73
  ## Usage as a dependency
74
74
 
@@ -88,19 +88,20 @@ For example, for generating the API_KEY, the command will be modified as follows
88
88
 
89
89
  ## The Rettiwt class
90
90
 
91
- When used as a dependency, the Rettiwt class is entry point for accessing the Twitter API.
91
+ When used as a dependency, the [Rettiwt](https://rishikant181.github.io/Rettiwt-API/classes/Rettiwt.html) class is entry point for accessing the Twitter API.
92
92
 
93
93
  A new Rettiwt instance can be initialized using the following code snippets:
94
94
 
95
95
  - `const rettiwt = new Rettiwt()` (for 'guest' authentication)
96
96
  - `const rettiwt = new Rettiwt({ apiKey: API_KEY })` (for 'user' authentication)
97
97
 
98
- The Rettiwt class has two members:
98
+ The Rettiwt class has three members:
99
99
 
100
- - 'tweet' member, for accessing resources related to tweets
101
- - 'user' member, for accessing resources related to users
100
+ - `auth` memeber, for managing authentication
101
+ - `tweet` member, for accessing resources related to tweets
102
+ - `user` member, for accessing resources related to users
102
103
 
103
- For details regarding usage of these members for accessing the Twitter API, refer to the 'Features' section.
104
+ For details regarding usage of these members for accessing the Twitter API, refer to [Features](https://rishikant181.github.io/Rettiwt-API/#md:features).
104
105
 
105
106
  ## Usage
106
107
 
@@ -109,7 +110,7 @@ The following examples may help you to get started using the library:
109
110
  ### 1. Getting the details of a target Twitter user
110
111
 
111
112
  ```js
112
- const { Rettiwt } = require('rettiwt-api');
113
+ import { Rettiwt } from 'rettiwt-api';
113
114
 
114
115
  // Creating a new Rettiwt instance
115
116
  // Note that for accessing user details, 'guest' authentication can be used
@@ -128,7 +129,7 @@ rettiwt.user.details('<username>')
128
129
  ### 2. Getting the list of tweets that match a given filter
129
130
 
130
131
  ```js
131
- const { Rettiwt } = require('rettiwt-api');
132
+ import { Rettiwt } from 'rettiwt-api';
132
133
 
133
134
  // Creating a new Rettiwt instance using the API_KEY
134
135
  const rettiwt = new Rettiwt({ apiKey: API_KEY });
@@ -150,12 +151,14 @@ rettiwt.tweet.search({
150
151
  });
151
152
  ```
152
153
 
154
+ For more information regarding the different available filter options, please refer to [TweetFilter](https://rishikant181.github.io/Rettiwt-API/classes/TweetFilter.html).
155
+
153
156
  ### 3. Getting the next batch of data using a cursor
154
157
 
155
158
  The previous example fetches the the list of tweets matching the given filter. Since no count is specified, in this case, a default of 20 such Tweets are fetched initially. The following example demonstrates how to use the [cursor string](https://rishikant181.github.io/Rettiwt-API/classes/Cursor.html#value) obtained from the [response](https://rishikant181.github.io/Rettiwt-API/classes/CursoredData.html) object's [next](https://rishikant181.github.io/Rettiwt-API/classes/CursoredData.html#next) field, from the previous example, to fetch the next batch of tweets:
156
159
 
157
160
  ```js
158
- const { Rettiwt } = require('rettiwt-api');
161
+ import { Rettiwt } from 'rettiwt-api';
159
162
 
160
163
  // Creating a new Rettiwt instance using the API_KEY
161
164
  const rettiwt = new Rettiwt({ apiKey: API_KEY });
@@ -179,7 +182,32 @@ rettiwt.tweet.search({
179
182
  });
180
183
  ```
181
184
 
182
- For more information regarding the different available filter options, please refer to [TweetFilter](https://rishikant181.github.io/Rettiwt-Core/classes/TweetFilter.html).
185
+ ### 4. Getting an API_KEY during runtime, using 'user' authentication
186
+
187
+ Sometimes, you might want to generate an API_KEY on the fly, in situations such as implementing Twitter login in your application. The following example demonstrates how to generate an API_KEY during runtime:
188
+
189
+ ```js
190
+ import { Rettiwt } from 'rettiwt-api';
191
+
192
+ // Creating a new Rettiwt instance
193
+ const rettiwt = new Rettiwt();
194
+
195
+ // Logging in an getting the API_KEY
196
+ rettiwt.auth.login('<email>', '<username>', '<password>')
197
+ .then(apiKey => {
198
+ // Use the API_KEY
199
+ ...
200
+ })
201
+ .catch(err => {
202
+ console.log(err);
203
+ });
204
+ ```
205
+
206
+ Where,
207
+
208
+ - `<email>` is the email associated with the Twitter account to be logged into.
209
+ - `<username>` is the username associated with the Twitter account.
210
+ - `<password>` is the password to the Twitter account.
183
211
 
184
212
  ## Using a proxy
185
213
 
@@ -189,11 +217,28 @@ For masking of IP address using a proxy server, use the following code snippet f
189
217
  /**
190
218
  * PROXY_URL is the URL or configuration for the proxy server you want to use.`
191
219
  */
192
- const rettiwt = Rettiwt({ apiKey: API_KEY, proxyUrl: PROXY_URL });
220
+ const rettiwt = new Rettiwt({ apiKey: API_KEY, proxyUrl: PROXY_URL });
193
221
  ```
194
222
 
195
223
  This creates a Rettiwt instance which uses the given proxy server for making requests to Twitter.
196
224
 
225
+ ## Cloud environment
226
+
227
+ When using this library in an application deployed in a cloud environment, the library might throw error 429, even when under rate limits. This happens because Twitter's v1.1 API endpoints seemingly blocks access from cloud services' IP ranges. These v1.1 API endpoints are the ones used for authentication and as such, authentication tasks are blocked while deployed on cloud environments.
228
+
229
+ This issue can be bypassed by using a proxy only for authentication, using the following code snippet for creating a new Rettiwt instance:
230
+
231
+ `const rettiwt = new Rettiwt({ authProxyUrl: PROXY_URL });`
232
+
233
+ Where,
234
+
235
+ - `PROXY_URL` is the URL to the proxy server to use.
236
+
237
+ Authentication proxy is required only in the following two scenarios:
238
+
239
+ 1. While using 'guest' authentication.
240
+ 2. While creating API_KEY by 'user' authentication.
241
+
197
242
  ## Debug logs
198
243
 
199
244
  Sometimes, when the library shows unexpected behaviour, for troubleshooting purposes, debug logs can be enabled which will help in tracking down the issue and working on a potential fix. Currently, debug logs are printed to the console and are enabled by setting the 'logging' property of the config to true, while creating an instance of Rettiwt:
@@ -202,13 +247,18 @@ Sometimes, when the library shows unexpected behaviour, for troubleshooting purp
202
247
  /**
203
248
  * By default, is no value for 'logging' is supplied, logging is disabled.
204
249
  */
205
- const rettiwt = Rettiwt({ apiKey: API_KEY, logging: true });
250
+ const rettiwt = new Rettiwt({ apiKey: API_KEY, logging: true });
206
251
  ```
207
252
 
208
253
  ## Features
209
254
 
210
255
  So far, the following operations are supported:
211
256
 
257
+ ### Authentication
258
+
259
+ - [Logging in as user](https://rishikant181.github.io/Rettiwt-API/classes/AuthService.html#login)
260
+ - [Logging in as guest](https://rishikant181.github.io/Rettiwt-API/classes/AuthService.html#guest)
261
+
212
262
  ### Tweets
213
263
 
214
264
  - [Getting the details of a tweet](https://rishikant181.github.io/Rettiwt-API/classes/TweetService.html#details)
@@ -235,12 +285,12 @@ Rettiwt-API provides an easy to use command-line interface which does not requir
235
285
 
236
286
  By default, the CLI operates in 'guest' authentication. If you want to use 'user' authentication:
237
287
 
238
- 1. Generate an API_KEY as described in 'Authentication' section.
288
+ 1. Generate an API_KEY as described in [Authentication](https://rishikant181.github.io/Rettiwt-API/#md:authentication).
239
289
  2. Store the output API_KEY as an environment variable with the name 'API_KEY'.
240
- - Additionaly, store the API_KEY in a file for later use.
290
+ - Additionally, store the API_KEY in a file for later use.
241
291
  - Make sure to generate an API_KEY only once, and use it every time you need it.
242
292
  3. The CLI automatically reads this environment variable to authenticate against Twitter.
243
- - Additionaly, the API_KEY can also be passed in manually using the '-k' option as follows: `rettiwt -k <API_KEY> <command>`
293
+ - Additionally, the API_KEY can also be passed in manually using the '-k' option as follows: `rettiwt -k <API_KEY> <command>`
244
294
 
245
295
  Help for the CLI can be obtained from the CLI itself:
246
296
 
@@ -253,5 +303,5 @@ The complete API reference can be found at [this](https://rishikant181.github.io
253
303
 
254
304
  ## Additional information
255
305
 
256
- - This API uses the cookies of a Twitter account to fetch data from Twitter and as such, there is always a chance (altough a measly one) of getting the account banned by Twitter algorithm.
306
+ - This API uses the cookies of a Twitter account to fetch data from Twitter and as such, there is always a chance (although a measly one) of getting the account banned by Twitter algorithm.
257
307
  - There have been no reports of accounts getting banned, but you have been warned, even though the chances of getting banned is negligible, it is not zero!
package/dist/Rettiwt.d.ts CHANGED
@@ -1,12 +1,13 @@
1
+ import { AuthService } from './services/public/AuthService';
1
2
  import { TweetService } from './services/public/TweetService';
2
3
  import { UserService } from './services/public/UserService';
3
- import { RettiwtConfig } from './models/internal/RettiwtConfig';
4
+ import { IRettiwtConfig } from './types/RettiwtConfig';
4
5
  /**
5
6
  * The class for accessing Twitter API.
6
7
  *
7
8
  * The created Rettiwt instance can be configured by passing in a configuration object to the constructor.
8
9
  *
9
- * For details regarding the available configuration options, refer to {@link RettiwtConfig}
10
+ * For details regarding the available configuration options, refer to {@link IRettiwtConfig}
10
11
  *
11
12
  * @example Creating a Rettiwt instance with 'guest' authentication:
12
13
  * ```
@@ -37,12 +38,14 @@ import { RettiwtConfig } from './models/internal/RettiwtConfig';
37
38
  * import { Rettiwt } from 'rettiwt-api';
38
39
  *
39
40
  * // Creating a new Rettiwt instance
40
- * const rettiwt = new Rettiwt({ apiKey: 'API_KEY', loggin: true, proxyUrl: 'URL_TO_PROXY_SERVER' });
41
+ * const rettiwt = new Rettiwt({ apiKey: 'API_KEY', logging: true, proxyUrl: 'URL_TO_PROXY_SERVER' });
41
42
  * ```
42
43
  *
43
44
  * @public
44
45
  */
45
46
  export declare class Rettiwt {
47
+ /** The instance used to authenticate. */
48
+ auth: AuthService;
46
49
  /** The instance used to fetch data related to tweets. */
47
50
  tweet: TweetService;
48
51
  /** The instance used to fetch data related to users. */
@@ -52,5 +55,5 @@ export declare class Rettiwt {
52
55
  *
53
56
  * @param config - The config object for configuring the Rettiwt instance.
54
57
  */
55
- constructor(config?: RettiwtConfig);
58
+ constructor(config?: IRettiwtConfig);
56
59
  }
package/dist/Rettiwt.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Rettiwt = void 0;
4
4
  // SERVICES
5
+ var AuthService_1 = require("./services/public/AuthService");
5
6
  var TweetService_1 = require("./services/public/TweetService");
6
7
  var UserService_1 = require("./services/public/UserService");
7
8
  /**
@@ -9,7 +10,7 @@ var UserService_1 = require("./services/public/UserService");
9
10
  *
10
11
  * The created Rettiwt instance can be configured by passing in a configuration object to the constructor.
11
12
  *
12
- * For details regarding the available configuration options, refer to {@link RettiwtConfig}
13
+ * For details regarding the available configuration options, refer to {@link IRettiwtConfig}
13
14
  *
14
15
  * @example Creating a Rettiwt instance with 'guest' authentication:
15
16
  * ```
@@ -40,7 +41,7 @@ var UserService_1 = require("./services/public/UserService");
40
41
  * import { Rettiwt } from 'rettiwt-api';
41
42
  *
42
43
  * // Creating a new Rettiwt instance
43
- * const rettiwt = new Rettiwt({ apiKey: 'API_KEY', loggin: true, proxyUrl: 'URL_TO_PROXY_SERVER' });
44
+ * const rettiwt = new Rettiwt({ apiKey: 'API_KEY', logging: true, proxyUrl: 'URL_TO_PROXY_SERVER' });
44
45
  * ```
45
46
  *
46
47
  * @public
@@ -52,6 +53,7 @@ var Rettiwt = /** @class */ (function () {
52
53
  * @param config - The config object for configuring the Rettiwt instance.
53
54
  */
54
55
  function Rettiwt(config) {
56
+ this.auth = new AuthService_1.AuthService(config);
55
57
  this.tweet = new TweetService_1.TweetService(config);
56
58
  this.user = new UserService_1.UserService(config);
57
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Rettiwt.js","sourceRoot":"","sources":["../src/Rettiwt.ts"],"names":[],"mappings":";;;AAAA,WAAW;AACX,+DAA8D;AAC9D,6DAA4D;AAK5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH;IAOC;;;;OAIG;IACH,iBAAmB,MAAsB;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,yBAAW,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IACF,cAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,0BAAO"}
1
+ {"version":3,"file":"Rettiwt.js","sourceRoot":"","sources":["../src/Rettiwt.ts"],"names":[],"mappings":";;;AAAA,WAAW;AACX,6DAA4D;AAC5D,+DAA8D;AAC9D,6DAA4D;AAK5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH;IAUC;;;;OAIG;IACH,iBAAmB,MAAuB;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,yBAAW,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,yBAAW,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IACF,cAAC;AAAD,CAAC,AApBD,IAoBC;AApBY,0BAAO"}
package/dist/cli.js CHANGED
@@ -33,7 +33,7 @@ var rettiwt = new Rettiwt_1.Rettiwt({
33
33
  // Adding sub-commands
34
34
  program.addCommand((0, Tweet_1.default)(rettiwt));
35
35
  program.addCommand((0, User_1.default)(rettiwt));
36
- program.addCommand((0, Auth_1.default)());
36
+ program.addCommand((0, Auth_1.default)(rettiwt));
37
37
  // Finalizing the CLI
38
38
  program.parse();
39
39
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;;AAEA,WAAW;AACX,uCAA0C;AAC1C,qCAAoC;AAEpC,eAAe;AACf,2DAAqC;AACrC,yDAAmC;AAC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KACtC,WAAW,CAAC,oDAAoD,CAAC;KACjE,kBAAkB,EAAE;KACpB,uBAAuB,EAAE,CAAC;AAE5B,iBAAiB;AACjB,OAAO;KACL,MAAM,CAAC,oBAAoB,EAAE,uCAAuC,CAAC;KACrE,MAAM,CAAC,WAAW,EAAE,2BAA2B,CAAC;KAChD,MAAM,CAAC,sBAAsB,EAAE,6BAA6B,CAAC,CAAC;AAEhE,8CAA8C;AAC9C,OAAO,CAAC,KAAK,EAAE,CAAC;AAEhB,wDAAwD;AACxD,IAAM,OAAO,GAAY,IAAI,iBAAO,CAAC;IACpC,MAAM,EAAE,MAAA,OAAO,CAAC,GAAG,CAAC,OAAO,mCAAK,OAAO,CAAC,IAAI,EAAE,CAAC,GAAc;IAC7D,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;IAC1C,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,KAAY;CACrC,CAAC,CAAC;AAEH,sBAAsB;AACtB,OAAO,CAAC,UAAU,CAAC,IAAA,eAAK,EAAC,OAAO,CAAC,CAAC,CAAC;AACnC,OAAO,CAAC,UAAU,CAAC,IAAA,cAAI,EAAC,OAAO,CAAC,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,IAAA,cAAI,EAAC,OAAO,CAAC,CAAC,CAAC;AAElC,qBAAqB;AACrB,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import { Command } from 'commander';
2
- declare function createAuthCommand(): Command;
2
+ import { Rettiwt } from '../Rettiwt';
3
+ declare function createAuthCommand(rettiwt: Rettiwt): Command;
3
4
  export default createAuthCommand;
@@ -38,10 +38,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  // PACKAGES
40
40
  var commander_1 = require("commander");
41
- var rettiwt_auth_1 = require("rettiwt-auth");
42
41
  // UTILITY
43
42
  var CliUtils_1 = require("../helper/CliUtils");
44
- function createAuthCommand() {
43
+ function createAuthCommand(rettiwt) {
45
44
  var _this = this;
46
45
  // Creating the 'auth' command
47
46
  var auth = (0, commander_1.createCommand)('auth').description('Manage authentication');
@@ -53,14 +52,11 @@ function createAuthCommand() {
53
52
  .argument('<password>', 'The password to the Twitter account')
54
53
  .action(function (email, username, password) { return __awaiter(_this, void 0, void 0, function () {
55
54
  var apiKey;
56
- var _a;
57
- return __generator(this, function (_b) {
58
- switch (_b.label) {
59
- case 0: return [4 /*yield*/, new rettiwt_auth_1.Auth().getUserCredential({ email: email, userName: username, password: password })];
55
+ return __generator(this, function (_a) {
56
+ switch (_a.label) {
57
+ case 0: return [4 /*yield*/, rettiwt.auth.login(email, username, password)];
60
58
  case 1:
61
- apiKey = (_a = (_b.sent()).toHeader().cookie) !== null && _a !== void 0 ? _a : '';
62
- // Converting the credentials to base64 string
63
- apiKey = Buffer.from(apiKey).toString('base64');
59
+ apiKey = _a.sent();
64
60
  (0, CliUtils_1.output)(apiKey);
65
61
  return [2 /*return*/];
66
62
  }
@@ -68,17 +64,14 @@ function createAuthCommand() {
68
64
  }); });
69
65
  // Guest
70
66
  auth.command('guest')
71
- .description('Generate a new guest API key')
67
+ .description('Generate a new guest key')
72
68
  .action(function () { return __awaiter(_this, void 0, void 0, function () {
73
69
  var guestKey;
74
- var _a;
75
- return __generator(this, function (_b) {
76
- switch (_b.label) {
77
- case 0: return [4 /*yield*/, new rettiwt_auth_1.Auth().getGuestCredential()];
70
+ return __generator(this, function (_a) {
71
+ switch (_a.label) {
72
+ case 0: return [4 /*yield*/, rettiwt.auth.guest()];
78
73
  case 1:
79
- guestKey = (_a = (_b.sent()).guestToken) !== null && _a !== void 0 ? _a : '';
80
- // Converting the credentials to base64 string
81
- guestKey = Buffer.from(guestKey).toString('base64');
74
+ guestKey = _a.sent();
82
75
  (0, CliUtils_1.output)(guestKey);
83
76
  return [2 /*return*/];
84
77
  }
@@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BAAM,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,EAAA;;oBAA7C,QAAQ,GAAW,SAA0B;oBACnD,IAAA,iBAAM,EAAC,QAAQ,CAAC,CAAC;;;;SACjB,CAAC,CAAC;IAEJ,OAAO,IAAI,CAAC;AACb,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
@@ -77,7 +77,17 @@ function createTweetCommand(rettiwt) {
77
77
  .option('-f, --from <string>', "Matches the tweets made by list of given users, separated by ';'")
78
78
  .option('-t, --to <string>', "Matches the tweets made to the list of given users, separated by ';'")
79
79
  .option('-w, --words <string>', "Matches the tweets containing the given list of words, separated by ';'")
80
+ .option('-p, --phrase <string>', 'Matches the tweets containing the exact phrase')
81
+ .option('--optional-words <string>', "Matches the tweets containing any of the given list of words, separated by ';'")
82
+ .option('--exclude-words <string>', "Matches the tweets that do not contain any of the give list of words, separated by ';'")
80
83
  .option('-h, --hashtags <string>', "Matches the tweets containing the given list of hashtags, separated by ';'")
84
+ .option('-m, --mentions <string>', "Matches the tweets that mention the give list of usernames, separated by ';'")
85
+ .option('-r, --min-replies <number>', 'Matches the tweets that have a minimum of given number of replies')
86
+ .option('-l, --min-likes <number>', 'Matches the tweets that have a minimum of given number of likes')
87
+ .option('-x, --min-retweets <number>', 'Matches the tweets that have a minimum of given number of retweets')
88
+ .option('-q, --quoted <string>', 'Matches the tweets that quote the tweet with the given id')
89
+ .option('--exclude-links', 'Matches tweets that do not contain links')
90
+ .option('--exclude-replies', 'Matches the tweets that are not replies')
81
91
  .option('-s, --start <string>', 'Matches the tweets made since the given date (valid date string)')
82
92
  .option('-e, --end <string>', 'Matches the tweets made upto the given date (valid date string)')
83
93
  .action(function (count, cursor, options) { return __awaiter(_this, void 0, void 0, function () {
@@ -154,11 +164,12 @@ function createTweetCommand(rettiwt) {
154
164
  .command('post')
155
165
  .description('Post a tweet (text only)')
156
166
  .argument('<text>', 'The text to post as a tweet')
157
- .action(function (text) { return __awaiter(_this, void 0, void 0, function () {
167
+ .option('-m, --media [string]', "The path to the media item(s) to be posted, separated by ';'")
168
+ .action(function (text, options) { return __awaiter(_this, void 0, void 0, function () {
158
169
  var result;
159
170
  return __generator(this, function (_a) {
160
171
  switch (_a.label) {
161
- case 0: return [4 /*yield*/, rettiwt.tweet.tweet(text)];
172
+ case 0: return [4 /*yield*/, rettiwt.tweet.tweet(text, (options === null || options === void 0 ? void 0 : options.media) ? options === null || options === void 0 ? void 0 : options.media.split(';').map(function (item) { return ({ path: item }); }) : undefined)];
162
173
  case 1:
163
174
  result = _a.sent();
164
175
  (0, CliUtils_1.output)(result);
@@ -214,10 +225,22 @@ var TweetSearchOptions = /** @class */ (function () {
214
225
  * @param options - The search options.
215
226
  */
216
227
  function TweetSearchOptions(options) {
228
+ this.excludeLinks = false;
229
+ this.excludeReplies = false;
217
230
  this.from = options === null || options === void 0 ? void 0 : options.from;
218
231
  this.to = options === null || options === void 0 ? void 0 : options.to;
219
232
  this.words = options === null || options === void 0 ? void 0 : options.words;
233
+ this.phrase = options === null || options === void 0 ? void 0 : options.phrase;
234
+ this.optionalWords = options === null || options === void 0 ? void 0 : options.optionalWords;
235
+ this.excludeWords = options === null || options === void 0 ? void 0 : options.excludeWords;
220
236
  this.hashtags = options === null || options === void 0 ? void 0 : options.hashtags;
237
+ this.mentions = options === null || options === void 0 ? void 0 : options.mentions;
238
+ this.minReplies = options === null || options === void 0 ? void 0 : options.minReplies;
239
+ this.minLikes = options === null || options === void 0 ? void 0 : options.minLikes;
240
+ this.minRetweets = options === null || options === void 0 ? void 0 : options.minRetweets;
241
+ this.quoted = options === null || options === void 0 ? void 0 : options.quoted;
242
+ this.excludeLinks = options === null || options === void 0 ? void 0 : options.excludeLinks;
243
+ this.excludeReplies = options === null || options === void 0 ? void 0 : options.excludeReplies;
221
244
  this.start = options === null || options === void 0 ? void 0 : options.start;
222
245
  this.end = options === null || options === void 0 ? void 0 : options.end;
223
246
  }
@@ -230,8 +253,18 @@ var TweetSearchOptions = /** @class */ (function () {
230
253
  return new rettiwt_core_1.TweetFilter({
231
254
  fromUsers: this.from ? this.from.split(';') : undefined,
232
255
  toUsers: this.to ? this.to.split(';') : undefined,
233
- words: this.words ? this.words.split(';') : undefined,
256
+ includeWords: this.words ? this.words.split(';') : undefined,
257
+ includePhrase: this.phrase,
258
+ optionalWords: this.optionalWords ? this.optionalWords.split(';') : undefined,
259
+ excludeWords: this.excludeWords ? this.excludeWords.split(';') : undefined,
234
260
  hashtags: this.hashtags ? this.hashtags.split(';') : undefined,
261
+ mentions: this.mentions ? this.mentions.split(';') : undefined,
262
+ minReplies: this.minReplies,
263
+ minLikes: this.minLikes,
264
+ minRetweets: this.minRetweets,
265
+ quoted: this.quoted,
266
+ links: !this.excludeLinks,
267
+ replies: !this.excludeReplies,
235
268
  startDate: this.start ? new Date(this.start) : undefined,
236
269
  endDate: this.end ? new Date(this.end) : undefined,
237
270
  });
@@ -1 +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;;;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,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,KAAK,EAAE,CAAC,IAAI,CAAC,YAAY;YACzB,OAAO,EAAE,CAAC,IAAI,CAAC,cAAc;YAC7B,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;YACxD,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;SAClD,CAAC,CAAC;IACJ,CAAC;IACF,yBAAC;AAAD,CAAC,AAnED,IAmEC;AAED,kBAAe,kBAAkB,CAAC"}
@@ -32,4 +32,4 @@ var EApiErrors;
32
32
  EApiErrors["TWEET_VIOLATED_RULES"] = "Requestd tweet has been removed for rules violation";
33
33
  EApiErrors["DISABLED_TWEET_ACTIONS"] = "Reqeusted action disabled on the tweet";
34
34
  })(EApiErrors || (exports.EApiErrors = EApiErrors = {}));
35
- //# sourceMappingURL=ApiErrors.js.map
35
+ //# sourceMappingURL=Api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Api.js","sourceRoot":"","sources":["../../src/enums/Api.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,UAwBX;AAxBD,WAAY,UAAU;IACrB,+DAAiD,CAAA;IACjD,iEAAmD,CAAA;IACnD,2DAA6C,CAAA;IAC7C,yDAA2C,CAAA;IAC3C,kEAAoD,CAAA;IACpD,8DAAgD,CAAA;IAChD,yDAA2C,CAAA;IAC3C,sDAAwC,CAAA;IACxC,6DAA+C,CAAA;IAC/C,2DAA6C,CAAA;IAC7C,6DAA+C,CAAA;IAC/C,6DAA+C,CAAA;IAC/C,+EAAiE,CAAA;IACjE,0EAA4D,CAAA;IAC5D,uDAAyC,CAAA;IACzC,gEAAkD,CAAA;IAClD,kFAAoE,CAAA;IACpE,oEAAsD,CAAA;IACtD,wDAA0C,CAAA;IAC1C,2DAA6C,CAAA;IAC7C,2DAA6C,CAAA;IAC7C,0FAA4E,CAAA;IAC5E,+EAAiE,CAAA;AAClE,CAAC,EAxBW,UAAU,0BAAV,UAAU,QAwBrB"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * The different types of http status codes
3
+ *
4
+ * @internal
5
+ */
6
+ export declare enum EHttpStatus {
7
+ CONTINUE = 100,
8
+ SWITCHING_PROTOCOLS = 101,
9
+ PROCESSING = 102,
10
+ OK = 200,
11
+ CREATED = 201,
12
+ ACCEPTED = 202,
13
+ NON_AUTHORITATIVE_INFORMATION = 203,
14
+ NO_CONTENT = 204,
15
+ RESET_CONTENT = 205,
16
+ PARTIAL_CONTENT = 206,
17
+ MULTI_STATUS = 207,
18
+ ALREADY_REPORTED = 208,
19
+ IM_USED = 226,
20
+ MULTIPLE_CHOICES = 300,
21
+ MOVED_PERMANENTLY = 301,
22
+ FOUND = 302,
23
+ SEE_OTHER = 303,
24
+ NOT_MODIFIED = 304,
25
+ USE_PROXY = 305,
26
+ SWITCH_PROXY = 306,
27
+ TEMPORARY_REDIRECT = 307,
28
+ PERMANENT_REDIRECT = 308,
29
+ BAD_REQUEST = 400,
30
+ UNAUTHORIZED = 401,
31
+ PAYMENT_REQUIRED = 402,
32
+ FORBIDDEN = 403,
33
+ NOT_FOUND = 404,
34
+ METHOD_NOT_ALLOWED = 405,
35
+ NOT_ACCEPTABLE = 406,
36
+ PROXY_AUTHENTICATION_REQUIRED = 407,
37
+ REQUEST_TIMEOUT = 408,
38
+ CONFLICT = 409,
39
+ GONE = 410,
40
+ LENGTH_REQUIRED = 411,
41
+ PRECONDITION_FAILED = 412,
42
+ PAYLOAD_TOO_LARGE = 413,
43
+ URI_TOO_LONG = 414,
44
+ UNSUPPORTED_MEDIA_TYPE = 415,
45
+ RANGE_NOT_SATISFIABLE = 416,
46
+ EXPECTATION_FAILED = 417,
47
+ I_AM_A_TEAPOT = 418,
48
+ MISDIRECTED_REQUEST = 421,
49
+ UNPROCESSABLE_ENTITY = 422,
50
+ LOCKED = 423,
51
+ FAILED_DEPENDENCY = 424,
52
+ UPGRADE_REQUIRED = 426,
53
+ PRECONDITION_REQUIRED = 428,
54
+ TOO_MANY_REQUESTS = 429,
55
+ REQUEST_HEADER_FIELDS_TOO_LARGE = 431,
56
+ UNAVAILABLE_FOR_LEGAL_REASONS = 451,
57
+ INTERNAL_SERVER_ERROR = 500,
58
+ NOT_IMPLEMENTED = 501,
59
+ BAD_GATEWAY = 502,
60
+ SERVICE_UNAVAILABLE = 503,
61
+ GATEWAY_TIMEOUT = 504,
62
+ HTTP_VERSION_NOT_SUPPORTED = 505,
63
+ VARIANT_ALSO_NEGOTIATES = 506,
64
+ INSUFFICIENT_STORAGE = 507,
65
+ LOOP_DETECTED = 508,
66
+ NOT_EXTENDED = 510,
67
+ NETWORK_AUTHENTICATION_REQUIRED = 511
68
+ }