rettiwt-api 2.0.3 → 2.2.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 (48) hide show
  1. package/.github/workflows/publish.yml +0 -3
  2. package/README.md +69 -0
  3. package/dist/Rettiwt.d.ts +3 -2
  4. package/dist/Rettiwt.js +5 -9
  5. package/dist/Rettiwt.js.map +1 -1
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +2 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/models/CursoredData.d.ts +15 -15
  10. package/dist/models/CursoredData.js +18 -18
  11. package/dist/models/CursoredData.js.map +1 -1
  12. package/dist/models/List.d.ts +29 -0
  13. package/dist/models/List.js +27 -0
  14. package/dist/models/List.js.map +1 -0
  15. package/dist/models/Tweet.d.ts +48 -19
  16. package/dist/models/Tweet.js +77 -28
  17. package/dist/models/Tweet.js.map +1 -1
  18. package/dist/models/User.d.ts +3 -1
  19. package/dist/models/User.js +2 -0
  20. package/dist/models/User.js.map +1 -1
  21. package/dist/services/FetcherService.d.ts +19 -3
  22. package/dist/services/FetcherService.js +39 -6
  23. package/dist/services/FetcherService.js.map +1 -1
  24. package/dist/services/TweetService.d.ts +19 -8
  25. package/dist/services/TweetService.js +40 -10
  26. package/dist/services/TweetService.js.map +1 -1
  27. package/dist/services/UserService.d.ts +16 -3
  28. package/dist/services/UserService.js +33 -3
  29. package/dist/services/UserService.js.map +1 -1
  30. package/dist/types/CursoredData.d.ts +9 -9
  31. package/dist/types/List.d.ts +21 -0
  32. package/dist/types/List.js +3 -0
  33. package/dist/types/List.js.map +1 -0
  34. package/dist/types/Tweet.d.ts +34 -17
  35. package/package.json +4 -2
  36. package/src/Rettiwt.ts +5 -11
  37. package/src/index.ts +2 -0
  38. package/src/models/CursoredData.ts +19 -19
  39. package/src/models/List.ts +48 -0
  40. package/src/models/Tweet.ts +118 -53
  41. package/src/models/User.ts +5 -1
  42. package/src/services/FetcherService.ts +49 -7
  43. package/src/services/TweetService.ts +35 -11
  44. package/src/services/UserService.ts +27 -4
  45. package/src/types/CursoredData.ts +10 -10
  46. package/src/types/List.ts +27 -0
  47. package/src/types/Tweet.ts +44 -19
  48. package/.dockerignore +0 -2
@@ -20,9 +20,6 @@ jobs:
20
20
  # Installing dependencies
21
21
  - run: yarn
22
22
 
23
- # Building the package
24
- - run: yarn run build
25
-
26
23
  # Publishing to NPM
27
24
  - run: npm publish
28
25
  env:
package/README.md CHANGED
@@ -26,6 +26,19 @@ Although the above process initializes a new project, that is, in fact, not nece
26
26
 
27
27
  **Note:** The API_KEY (cookie) that we generated, is a very sensitive information and provides all access to the Twitter account. Therefore, it is generally recommended to store it as an environment variable and use it from there.
28
28
 
29
+ ## Using a proxy
30
+
31
+ For masking of IP address using a proxy server, use the following code snippet for instantiation of Rettiwt:
32
+
33
+ ```
34
+ /**
35
+ * proxyUrl is the URL or configuration for the proxy server you want to use.`
36
+ */
37
+ const rettiwt = Rettiwt(API_KEY, proxyUrl);
38
+ ```
39
+
40
+ This creates a Rettiwt instance which uses the given proxy server for making requests to Twitter.
41
+
29
42
  ## Usage
30
43
 
31
44
  The following examples may help you to get started using the library:
@@ -33,6 +46,8 @@ The following examples may help you to get started using the library:
33
46
  ### 1. Getting the details of a target Twitter user
34
47
 
35
48
  ```
49
+ const { Rettiwt } = require('rettiwt-api');
50
+
36
51
  // Creating a new Rettiwt instance using the API_KEY
37
52
  const rettiwt = new Rettiwt(API_KEY);
38
53
 
@@ -49,6 +64,8 @@ rettiwt.user.details('<username>')
49
64
  ### 2. Getting the list of tweets that match a given filter
50
65
 
51
66
  ```
67
+ const { Rettiwt } = require('rettiwt-api');
68
+
52
69
  // Creating a new Rettiwt instance using the API_KEY
53
70
  const rettiwt = new Rettiwt(API_KEY);
54
71
 
@@ -66,11 +83,63 @@ rettiwt.tweet.search({
66
83
  })
67
84
  .catch(err => {
68
85
  ...
86
+ });
87
+ ```
88
+
89
+ ### 3. Getting the next batch of data using a cursor
90
+
91
+ 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:
92
+
93
+ ```
94
+ const { Rettiwt } = require('rettiwt-api');
95
+
96
+ // Creating a new Rettiwt instance using the API_KEY
97
+ const rettiwt = new Rettiwt(API_KEY);
98
+
99
+ /**
100
+ * Fetching the list of tweets that:
101
+ * - are made by a user with username <username>,
102
+ * - contain the words <word1> and <word2>
103
+ *
104
+ * 'data' is the response object received in the previous example.
105
+ */
106
+ rettiwt.tweet.search({
107
+ fromUsers: ['<username>'],
108
+ words: ['<word1>', '<word2>']
109
+ }, data.next.value)
110
+ .then(data => {
111
+ ...
69
112
  })
113
+ .catch(err => {
114
+ ...
115
+ });
70
116
  ```
71
117
 
72
118
  For more information regarding the different available filter options, please refer to [TweetFilter](https://rishikant181.github.io/Rettiwt-API/classes/TweetFilter.html).
73
119
 
120
+ ## Features
121
+
122
+ So far, the following operations are supported:
123
+
124
+ ### Tweets
125
+
126
+ - [Getting the details of a tweet](https://rishikant181.github.io/Rettiwt-API/classes/TweetService.html#details)
127
+ - [Favoriting/liking a tweet](https://rishikant181.github.io/Rettiwt-API/classes/TweetService.html#favorite)
128
+ - [Getting the list of users who favorited/liked a given tweet](https://rishikant181.github.io/Rettiwt-API/classes/TweetService.html#favoriters)
129
+ - [Getting the list of tweets from a given Twitter list](https://rishikant181.github.io/Rettiwt-API/classes/TweetService.html#list)
130
+ - [Retweeting/reposting a tweet](https://rishikant181.github.io/Rettiwt-API/classes/TweetService.html#retweet)
131
+ - [Getting the list of users who retweeted/reposted a given tweet](https://rishikant181.github.io/Rettiwt-API/classes/TweetService.html#retweeters)
132
+ - [Searching for the list of tweets that match a given filter](https://rishikant181.github.io/Rettiwt-API/classes/TweetService.html#search)
133
+ - [Posting a new tweet](https://rishikant181.github.io/Rettiwt-API/classes/TweetService.html#tweet)
134
+
135
+ ### Users
136
+
137
+ - [Getting the details of a user](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#details)
138
+ - [Getting the list of users who follow the given user](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#followers)
139
+ - [Getting the list of users who are followed by the given user](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#following)
140
+ - [Getting the list of tweets favorited/liked by the given user](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#likes)
141
+ - [Getting the timeline of a user](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#timeline)
142
+
74
143
  ## API Reference
75
144
 
76
145
  The complete API reference can be found at [this](https://rishikant181.github.io/Rettiwt-API/) page.
package/dist/Rettiwt.d.ts CHANGED
@@ -13,7 +13,8 @@ export declare class Rettiwt {
13
13
  /**
14
14
  * Initializes a new Rettiwt instance using the given api key.
15
15
  *
16
- * @param apiKey - The apiKey (cookie) to be used for authenticating Rettiwt against Twitter.
16
+ * @param apiKey - The apiKey (cookie) to use for authenticating Rettiwt against Twitter API.
17
+ * @param proxyUrl - Optional URL with proxy configuration to use for requests to Twitter API.
17
18
  */
18
- constructor(apiKey: string);
19
+ constructor(apiKey: string, proxyUrl?: URL);
19
20
  }
package/dist/Rettiwt.js CHANGED
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Rettiwt = void 0;
4
- // PACKAGE
5
- var rettiwt_auth_1 = require("rettiwt-auth");
6
4
  // SERVICES
7
5
  var TweetService_1 = require("./services/TweetService");
8
6
  var UserService_1 = require("./services/UserService");
@@ -15,14 +13,12 @@ var Rettiwt = /** @class */ (function () {
15
13
  /**
16
14
  * Initializes a new Rettiwt instance using the given api key.
17
15
  *
18
- * @param apiKey - The apiKey (cookie) to be used for authenticating Rettiwt against Twitter.
16
+ * @param apiKey - The apiKey (cookie) to use for authenticating Rettiwt against Twitter API.
17
+ * @param proxyUrl - Optional URL with proxy configuration to use for requests to Twitter API.
19
18
  */
20
- function Rettiwt(apiKey) {
21
- // Preparing auth credentials
22
- var cred = new rettiwt_auth_1.AuthCredential(apiKey.split(';'));
23
- // Initalizing service instances
24
- this.tweet = new TweetService_1.TweetService(cred);
25
- this.user = new UserService_1.UserService(cred);
19
+ function Rettiwt(apiKey, proxyUrl) {
20
+ this.tweet = new TweetService_1.TweetService(apiKey, proxyUrl);
21
+ this.user = new UserService_1.UserService(apiKey, proxyUrl);
26
22
  }
27
23
  return Rettiwt;
28
24
  }());
@@ -1 +1 @@
1
- {"version":3,"file":"Rettiwt.js","sourceRoot":"","sources":["../src/Rettiwt.ts"],"names":[],"mappings":";;;AAAA,UAAU;AACV,6CAA8C;AAE9C,WAAW;AACX,wDAAuD;AACvD,sDAAqD;AAErD;;;;GAIG;AACH;IAOC;;;;OAIG;IACH,iBAAY,MAAc;QACzB,6BAA6B;QAC7B,IAAM,IAAI,GAAmB,IAAI,6BAAc,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAEnE,gCAAgC;QAChC,IAAI,CAAC,KAAK,GAAG,IAAI,2BAAY,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC,IAAI,GAAG,IAAI,yBAAW,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACF,cAAC;AAAD,CAAC,AApBD,IAoBC;AApBY,0BAAO"}
1
+ {"version":3,"file":"Rettiwt.js","sourceRoot":"","sources":["../src/Rettiwt.ts"],"names":[],"mappings":";;;AAAA,WAAW;AACX,wDAAuD;AACvD,sDAAqD;AAErD;;;;GAIG;AACH;IAOC;;;;;OAKG;IACH,iBAAY,MAAc,EAAE,QAAc;QACzC,IAAI,CAAC,KAAK,GAAG,IAAI,2BAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,yBAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACF,cAAC;AAAD,CAAC,AAjBD,IAiBC;AAjBY,0BAAO"}
package/dist/index.d.ts CHANGED
@@ -2,11 +2,13 @@ export * from './Rettiwt';
2
2
  export * from './enums/ApiErrors';
3
3
  export * from './enums/HTTP';
4
4
  export * from './models/CursoredData';
5
+ export * from './models/List';
5
6
  export * from './models/Tweet';
6
7
  export * from './models/User';
7
8
  export * from './services/FetcherService';
8
9
  export * from './services/TweetService';
9
10
  export * from './services/UserService';
10
11
  export * from './types/CursoredData';
12
+ export * from './types/List';
11
13
  export * from './types/Tweet';
12
14
  export * from './types/User';
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ __exportStar(require("./enums/ApiErrors"), exports);
21
21
  __exportStar(require("./enums/HTTP"), exports);
22
22
  // Exporting models
23
23
  __exportStar(require("./models/CursoredData"), exports);
24
+ __exportStar(require("./models/List"), exports);
24
25
  __exportStar(require("./models/Tweet"), exports);
25
26
  __exportStar(require("./models/User"), exports);
26
27
  // Exporting services
@@ -29,6 +30,7 @@ __exportStar(require("./services/TweetService"), exports);
29
30
  __exportStar(require("./services/UserService"), exports);
30
31
  // Exporting types
31
32
  __exportStar(require("./types/CursoredData"), exports);
33
+ __exportStar(require("./types/List"), exports);
32
34
  __exportStar(require("./types/Tweet"), exports);
33
35
  __exportStar(require("./types/User"), exports);
34
36
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,4CAA0B;AAE1B,kBAAkB;AAClB,oDAAkC;AAClC,+CAA6B;AAE7B,mBAAmB;AACnB,wDAAsC;AACtC,iDAA+B;AAC/B,gDAA8B;AAE9B,qBAAqB;AACrB,4DAA0C;AAC1C,0DAAwC;AACxC,yDAAuC;AAEvC,kBAAkB;AAClB,uDAAqC;AACrC,gDAA8B;AAC9B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,4CAA0B;AAE1B,kBAAkB;AAClB,oDAAkC;AAClC,+CAA6B;AAE7B,mBAAmB;AACnB,wDAAsC;AACtC,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAE9B,qBAAqB;AACrB,4DAA0C;AAC1C,0DAAwC;AACxC,yDAAuC;AAEvC,kBAAkB;AAClB,uDAAqC;AACrC,+CAA6B;AAC7B,gDAA8B;AAC9B,+CAA6B"}
@@ -2,21 +2,6 @@ import { ITweet as IRawTweet, IUser as IRawUser } from 'rettiwt-core';
2
2
  import { Tweet } from './Tweet';
3
3
  import { User } from './User';
4
4
  import { ICursor, ICursoredData } from '../types/CursoredData';
5
- /**
6
- * The cursor to the batch of data to be fetched.
7
- *
8
- * @public
9
- */
10
- export declare class Cursor implements ICursor {
11
- /** The cursor string. */
12
- value: string;
13
- /**
14
- * Initializes a new cursor from the given cursor string.
15
- *
16
- * @param cursorStr - The string representation of the cursor.
17
- */
18
- constructor(cursorStr: string);
19
- }
20
5
  /**
21
6
  * The data that us fetched batch-wise along with a cursor.
22
7
  *
@@ -35,3 +20,18 @@ export declare class CursoredData<T extends Tweet | User> implements ICursoredDa
35
20
  */
36
21
  constructor(list?: (IRawTweet | IRawUser)[], next?: string);
37
22
  }
23
+ /**
24
+ * The cursor to the batch of data to be fetched.
25
+ *
26
+ * @public
27
+ */
28
+ export declare class Cursor implements ICursor {
29
+ /** The cursor string. */
30
+ value: string;
31
+ /**
32
+ * Initializes a new cursor from the given cursor string.
33
+ *
34
+ * @param cursorStr - The string representation of the cursor.
35
+ */
36
+ constructor(cursorStr: string);
37
+ }
@@ -1,26 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CursoredData = exports.Cursor = void 0;
3
+ exports.Cursor = exports.CursoredData = void 0;
4
4
  // MODELS
5
5
  var Tweet_1 = require("./Tweet");
6
6
  var User_1 = require("./User");
7
- /**
8
- * The cursor to the batch of data to be fetched.
9
- *
10
- * @public
11
- */
12
- var Cursor = /** @class */ (function () {
13
- /**
14
- * Initializes a new cursor from the given cursor string.
15
- *
16
- * @param cursorStr - The string representation of the cursor.
17
- */
18
- function Cursor(cursorStr) {
19
- this.value = cursorStr;
20
- }
21
- return Cursor;
22
- }());
23
- exports.Cursor = Cursor;
24
7
  /**
25
8
  * The data that us fetched batch-wise along with a cursor.
26
9
  *
@@ -56,4 +39,21 @@ var CursoredData = /** @class */ (function () {
56
39
  return CursoredData;
57
40
  }());
58
41
  exports.CursoredData = CursoredData;
42
+ /**
43
+ * The cursor to the batch of data to be fetched.
44
+ *
45
+ * @public
46
+ */
47
+ var Cursor = /** @class */ (function () {
48
+ /**
49
+ * Initializes a new cursor from the given cursor string.
50
+ *
51
+ * @param cursorStr - The string representation of the cursor.
52
+ */
53
+ function Cursor(cursorStr) {
54
+ this.value = cursorStr;
55
+ }
56
+ return Cursor;
57
+ }());
58
+ exports.Cursor = Cursor;
59
59
  //# sourceMappingURL=CursoredData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CursoredData.js","sourceRoot":"","sources":["../../src/models/CursoredData.ts"],"names":[],"mappings":";;;AAGA,SAAS;AACT,iCAAgC;AAChC,+BAA8B;AAK9B;;;;GAIG;AACH;IAIC;;;;OAIG;IACH,gBAAY,SAAiB;QAC5B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;IACxB,CAAC;IACF,aAAC;AAAD,CAAC,AAZD,IAYC;AAZY,wBAAM;AAcnB;;;;;;GAMG;AACH;IAOC;;;OAGG;IACH,sBAAY,IAAmC,EAAE,IAAiB;QAAtD,qBAAA,EAAA,SAAmC;QAAE,qBAAA,EAAA,SAAiB;QAVlE,0CAA0C;QAC1C,SAAI,GAAQ,EAAE,CAAC;QAUd,8DAA8D;QAC9D,KAAmB,UAAI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IAAI,MAAM,IAAI,IAAI,CAAC,OAAO,IAAK,IAAiB,CAAC,EAAE,EAAE;gBAC5E,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,WAAI,CAAC,IAAgB,CAAM,CAAC,CAAC;aAChD;SACD;QAED,uBAAuB;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IACF,mBAAC;AAAD,CAAC,AA3BD,IA2BC;AA3BY,oCAAY;AA6BzB;;;;GAIG;AACH;IAIC;;;;OAIG;IACH,gBAAY,SAAiB;QAC5B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;IACxB,CAAC;IACF,aAAC;AAAD,CAAC,AAZD,IAYC;AAZY,wBAAM"}
@@ -0,0 +1,29 @@
1
+ import { IList as IRawList } from 'rettiwt-core';
2
+ import { IList } from '../types/List';
3
+ /**
4
+ * The details of a single Twitter List.
5
+ *
6
+ * @public
7
+ */
8
+ export declare class List implements IList {
9
+ /** The rest id of the list. */
10
+ id: string;
11
+ /** The name of the list. */
12
+ name: string;
13
+ /** The date and time of creation of the list, int UTC string format. */
14
+ createdAt: string;
15
+ /** The list description. */
16
+ description: string;
17
+ /** The number of memeber of the list. */
18
+ memberCount: number;
19
+ /** The number of subscribers of the list. */
20
+ subscriberCount: number;
21
+ /** The rest id of the user who created the list. */
22
+ createdBy: string;
23
+ /**
24
+ * Initializes a new Tweet List from the given raw list data.
25
+ *
26
+ * @param list - list The raw tweet list data.
27
+ */
28
+ constructor(list: IRawList);
29
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.List = void 0;
4
+ /**
5
+ * The details of a single Twitter List.
6
+ *
7
+ * @public
8
+ */
9
+ var List = /** @class */ (function () {
10
+ /**
11
+ * Initializes a new Tweet List from the given raw list data.
12
+ *
13
+ * @param list - list The raw tweet list data.
14
+ */
15
+ function List(list) {
16
+ this.id = list.id_str;
17
+ this.name = list.name;
18
+ this.createdAt = new Date(list.created_at).toISOString();
19
+ this.description = list.description;
20
+ this.memberCount = list.member_count;
21
+ this.subscriberCount = list.subscriber_count;
22
+ this.createdBy = list.user_results.result.id;
23
+ }
24
+ return List;
25
+ }());
26
+ exports.List = List;
27
+ //# sourceMappingURL=List.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.js","sourceRoot":"","sources":["../../src/models/List.ts"],"names":[],"mappings":";;;AAMA;;;;GAIG;AACH;IAsBC;;;;OAIG;IACH,cAAY,IAAc;QACzB,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,AApCD,IAoCC;AApCY,oBAAI"}
@@ -1,21 +1,6 @@
1
+ import { ITweet as IRawTweet, IEntities as IRawTweetEntities, IExtendedMedia as IRawExtendedMedia, EMediaType } from 'rettiwt-core';
1
2
  import { ITweet, ITweetEntities } from '../types/Tweet';
2
- import { ITweet as IRawTweet, IEntities as IRawTweetEntities } from 'rettiwt-core';
3
- /**
4
- * The different types parsed entities like urls, media, mentions, hashtags, etc.
5
- *
6
- * @public
7
- */
8
- export declare class TweetEntities implements ITweetEntities {
9
- /** The list of hashtags mentioned in the tweet. */
10
- hashtags: string[];
11
- /** The list of urls mentioned in the tweet. */
12
- urls: string[];
13
- /** The list of IDs of users mentioned in the tweet. */
14
- mentionedUsers: string[];
15
- /** The list of urls to various media mentioned in the tweet. */
16
- media: string[];
17
- constructor(entities: IRawTweetEntities);
18
- }
3
+ import { User } from './User';
19
4
  /**
20
5
  * The details of a single Tweet.
21
6
  *
@@ -24,12 +9,14 @@ export declare class TweetEntities implements ITweetEntities {
24
9
  export declare class Tweet implements ITweet {
25
10
  /** The rest id of the tweet. */
26
11
  id: string;
27
- /** The rest id of the user who made the tweet. */
28
- tweetBy: string;
12
+ /** The details of the user who made the tweet. */
13
+ tweetBy: User;
29
14
  /** The date and time of creation of the tweet, in UTC string format. */
30
15
  createdAt: string;
31
16
  /** Additional tweet entities like urls, mentions, etc. */
32
17
  entities: TweetEntities;
18
+ /** The urls of the media contents of the tweet (if any). */
19
+ media: TweetMedia[];
33
20
  /** The rest id of the tweet which is quoted in the tweet. */
34
21
  quoted: string;
35
22
  /** The full text content of the tweet. */
@@ -46,8 +33,50 @@ export declare class Tweet implements ITweet {
46
33
  retweetCount: number;
47
34
  /** The number of likes of the tweet. */
48
35
  likeCount: number;
36
+ /** The number of views of a tweet. */
37
+ viewCount: number;
38
+ /** The number of bookmarks of a tweet. */
39
+ bookmarkCount: number;
49
40
  /**
41
+ * Initializes a new Tweet from the given raw tweet data.
42
+ *
50
43
  * @param tweet - The raw tweet data.
51
44
  */
52
45
  constructor(tweet: IRawTweet);
53
46
  }
47
+ /**
48
+ * The different types parsed entities like urls, media, mentions, hashtags, etc.
49
+ *
50
+ * @public
51
+ */
52
+ export declare class TweetEntities implements ITweetEntities {
53
+ /** The list of hashtags mentioned in the tweet. */
54
+ hashtags: string[];
55
+ /** The list of urls mentioned in the tweet. */
56
+ urls: string[];
57
+ /** The list of IDs of users mentioned in the tweet. */
58
+ mentionedUsers: string[];
59
+ /**
60
+ * Initializes the TweetEntities from the raw tweet entities.
61
+ *
62
+ * @param entities - The raw tweet entities.
63
+ */
64
+ constructor(entities: IRawTweetEntities);
65
+ }
66
+ /**
67
+ * A single media content.
68
+ *
69
+ * @public
70
+ */
71
+ export declare class TweetMedia {
72
+ /** The type of media. */
73
+ type: EMediaType;
74
+ /** The direct URL to the media. */
75
+ url: string;
76
+ /**
77
+ * Initializes the TweetMedia from the raw tweet media.
78
+ *
79
+ * @param media - The raw tweet media.
80
+ */
81
+ constructor(media: IRawExtendedMedia);
82
+ }
@@ -1,14 +1,55 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Tweet = exports.TweetEntities = void 0;
3
+ exports.TweetMedia = exports.TweetEntities = exports.Tweet = void 0;
4
+ // PACKAGES
5
+ var rettiwt_core_1 = require("rettiwt-core");
6
+ // MODELS
7
+ var User_1 = require("./User");
4
8
  // PARSERS
5
9
  var JsonUtils_1 = require("../helper/JsonUtils");
10
+ /**
11
+ * The details of a single Tweet.
12
+ *
13
+ * @public
14
+ */
15
+ var Tweet = /** @class */ (function () {
16
+ /**
17
+ * Initializes a new Tweet from the given raw tweet data.
18
+ *
19
+ * @param tweet - The raw tweet data.
20
+ */
21
+ function Tweet(tweet) {
22
+ var _a, _b;
23
+ this.id = tweet.rest_id;
24
+ this.createdAt = tweet.legacy.created_at;
25
+ this.tweetBy = new User_1.User(tweet.core.user_results.result);
26
+ this.entities = new TweetEntities(tweet.legacy.entities);
27
+ this.media = (_b = (_a = tweet.legacy.extended_entities) === null || _a === void 0 ? void 0 : _a.media) === null || _b === void 0 ? void 0 : _b.map(function (media) { return new TweetMedia(media); });
28
+ this.quoted = tweet.legacy.quoted_status_id_str;
29
+ this.fullText = (0, JsonUtils_1.normalizeText)(tweet.legacy.full_text);
30
+ this.replyTo = tweet.legacy.in_reply_to_status_id_str;
31
+ this.lang = tweet.legacy.lang;
32
+ this.quoteCount = tweet.legacy.quote_count;
33
+ this.replyCount = tweet.legacy.reply_count;
34
+ this.retweetCount = tweet.legacy.retweet_count;
35
+ this.likeCount = tweet.legacy.favorite_count;
36
+ this.viewCount = parseInt(tweet.views.count);
37
+ this.bookmarkCount = tweet.legacy.bookmark_count;
38
+ }
39
+ return Tweet;
40
+ }());
41
+ exports.Tweet = Tweet;
6
42
  /**
7
43
  * The different types parsed entities like urls, media, mentions, hashtags, etc.
8
44
  *
9
45
  * @public
10
46
  */
11
47
  var TweetEntities = /** @class */ (function () {
48
+ /**
49
+ * Initializes the TweetEntities from the raw tweet entities.
50
+ *
51
+ * @param entities - The raw tweet entities.
52
+ */
12
53
  function TweetEntities(entities) {
13
54
  /** The list of hashtags mentioned in the tweet. */
14
55
  this.hashtags = [];
@@ -16,8 +57,6 @@ var TweetEntities = /** @class */ (function () {
16
57
  this.urls = [];
17
58
  /** The list of IDs of users mentioned in the tweet. */
18
59
  this.mentionedUsers = [];
19
- /** The list of urls to various media mentioned in the tweet. */
20
- this.media = [];
21
60
  // Extracting user mentions
22
61
  if (entities.user_mentions) {
23
62
  for (var _i = 0, _a = entities.user_mentions; _i < _a.length; _i++) {
@@ -39,41 +78,51 @@ var TweetEntities = /** @class */ (function () {
39
78
  this.hashtags.push(hashtag.text);
40
79
  }
41
80
  }
42
- // Extracting media urls (if any)
43
- if (entities.media) {
44
- for (var _f = 0, _g = entities.media; _f < _g.length; _f++) {
45
- var media = _g[_f];
46
- this.media.push(media.media_url_https);
47
- }
48
- }
49
81
  }
50
82
  return TweetEntities;
51
83
  }());
52
84
  exports.TweetEntities = TweetEntities;
53
85
  /**
54
- * The details of a single Tweet.
86
+ * A single media content.
55
87
  *
56
88
  * @public
57
89
  */
58
- var Tweet = /** @class */ (function () {
90
+ var TweetMedia = /** @class */ (function () {
59
91
  /**
60
- * @param tweet - The raw tweet data.
92
+ * Initializes the TweetMedia from the raw tweet media.
93
+ *
94
+ * @param media - The raw tweet media.
61
95
  */
62
- function Tweet(tweet) {
63
- this.id = tweet.rest_id;
64
- this.createdAt = tweet.legacy.created_at;
65
- this.tweetBy = tweet.legacy.user_id_str;
66
- this.entities = new TweetEntities(tweet.legacy.entities);
67
- this.quoted = tweet.legacy.quoted_status_id_str;
68
- this.fullText = (0, JsonUtils_1.normalizeText)(tweet.legacy.full_text);
69
- this.replyTo = tweet.legacy.in_reply_to_status_id_str;
70
- this.lang = tweet.legacy.lang;
71
- this.quoteCount = tweet.legacy.quote_count;
72
- this.replyCount = tweet.legacy.reply_count;
73
- this.retweetCount = tweet.legacy.retweet_count;
74
- this.likeCount = tweet.legacy.favorite_count;
96
+ function TweetMedia(media) {
97
+ var _this = this;
98
+ var _a, _b;
99
+ /** The direct URL to the media. */
100
+ this.url = '';
101
+ this.type = media.type;
102
+ // If the media is a photo
103
+ if (media.type == rettiwt_core_1.EMediaType.PHOTO) {
104
+ this.url = media.media_url_https;
105
+ }
106
+ // If the media is a gif
107
+ else if (media.type == rettiwt_core_1.EMediaType.GIF) {
108
+ this.url = (_a = media.video_info) === null || _a === void 0 ? void 0 : _a.variants[0].url;
109
+ }
110
+ // If the media is a video
111
+ else {
112
+ /** The highest bitrate of all variants. */
113
+ var highestRate_1 = 0;
114
+ /**
115
+ * Selecting the URL of the video variant with the highest bitrate.
116
+ */
117
+ (_b = media.video_info) === null || _b === void 0 ? void 0 : _b.variants.forEach(function (variant) {
118
+ if (variant.bitrate > highestRate_1) {
119
+ highestRate_1 = variant.bitrate;
120
+ _this.url = variant.url;
121
+ }
122
+ });
123
+ }
75
124
  }
76
- return Tweet;
125
+ return TweetMedia;
77
126
  }());
78
- exports.Tweet = Tweet;
127
+ exports.TweetMedia = TweetMedia;
79
128
  //# sourceMappingURL=Tweet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tweet.js","sourceRoot":"","sources":["../../src/models/Tweet.ts"],"names":[],"mappings":";;;AAIA,UAAU;AACV,iDAAoD;AAEpD;;;;GAIG;AACH;IAaC,uBAAY,QAA2B;QAZvC,mDAAmD;QACnD,aAAQ,GAAa,EAAE,CAAC;QAExB,+CAA+C;QAC/C,SAAI,GAAa,EAAE,CAAC;QAEpB,uDAAuD;QACvD,mBAAc,GAAa,EAAE,CAAC;QAE9B,gEAAgE;Q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EAAE;YACtC,IAAI,CAAC,GAAG,GAAG,MAAA,KAAK,CAAC,UAAU,0CAAE,QAAQ,CAAC,CAAC,EAAE,GAAa,CAAC;SACvD;QACD,0BAA0B;aACrB;YACJ,2CAA2C;YAC3C,IAAI,aAAW,GAAW,CAAC,CAAC;YAE5B;;eAEG;YACH,MAAA,KAAK,CAAC,UAAU,0CAAE,QAAQ,CAAC,OAAO,CAAC,UAAC,OAAO;gBAC1C,IAAI,OAAO,CAAC,OAAO,GAAG,aAAW,EAAE;oBAClC,aAAW,GAAG,OAAO,CAAC,OAAO,CAAC;oBAC9B,KAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;iBACvB;YACF,CAAC,CAAC,CAAC;SACH;IACF,CAAC;IACF,iBAAC;AAAD,CAAC,AAvCD,IAuCC;AAvCY,gCAAU"}
@@ -1,5 +1,5 @@
1
- import { IUser } from '../types/User';
2
1
  import { IUser as IRawUser } from 'rettiwt-core';
2
+ import { IUser } from '../types/User';
3
3
  /**
4
4
  * The details of a single user.
5
5
  *
@@ -35,6 +35,8 @@ export declare class User implements IUser {
35
35
  /** The url of the profile image. */
36
36
  profileImage: string;
37
37
  /**
38
+ * Initializes a new User from the given raw user data.
39
+ *
38
40
  * @param user - The raw user data.
39
41
  */
40
42
  constructor(user: IRawUser);
@@ -8,6 +8,8 @@ exports.User = void 0;
8
8
  */
9
9
  var User = /** @class */ (function () {
10
10
  /**
11
+ * Initializes a new User from the given raw user data.
12
+ *
11
13
  * @param user - The raw user data.
12
14
  */
13
15
  function User(user) {
@@ -1 +1 @@
1
- {"version":3,"file":"User.js","sourceRoot":"","sources":["../../src/models/User.ts"],"names":[],"mappings":";;;AAIA;;;;GAIG;AACH;IA2CC;;OAEG;IACH,cAAY,IAAc;QACzB,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACxC,IAAI,CAA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