rettiwt-api 2.1.0 → 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.
- package/.github/workflows/publish.yml +0 -3
- package/README.md +28 -12
- package/dist/Rettiwt.d.ts +3 -2
- package/dist/Rettiwt.js +5 -9
- package/dist/Rettiwt.js.map +1 -1
- package/dist/models/CursoredData.d.ts +15 -15
- package/dist/models/CursoredData.js +18 -18
- package/dist/models/CursoredData.js.map +1 -1
- package/dist/models/Tweet.d.ts +39 -17
- package/dist/models/Tweet.js +74 -31
- package/dist/models/Tweet.js.map +1 -1
- package/dist/models/User.d.ts +1 -1
- package/dist/models/User.js.map +1 -1
- package/dist/services/FetcherService.d.ts +19 -3
- package/dist/services/FetcherService.js +33 -5
- package/dist/services/FetcherService.js.map +1 -1
- package/dist/services/TweetService.d.ts +3 -3
- package/dist/services/TweetService.js +4 -3
- package/dist/services/TweetService.js.map +1 -1
- package/dist/services/UserService.d.ts +16 -3
- package/dist/services/UserService.js +33 -3
- package/dist/services/UserService.js.map +1 -1
- package/dist/types/CursoredData.d.ts +9 -9
- package/dist/types/Tweet.d.ts +27 -15
- package/package.json +4 -2
- package/src/Rettiwt.ts +5 -11
- package/src/models/CursoredData.ts +19 -19
- package/src/models/Tweet.ts +102 -50
- package/src/models/User.ts +3 -1
- package/src/services/FetcherService.ts +38 -5
- package/src/services/TweetService.ts +4 -4
- package/src/services/UserService.ts +27 -4
- package/src/types/CursoredData.ts +10 -10
- package/src/types/Tweet.ts +35 -19
package/src/types/Tweet.ts
CHANGED
|
@@ -1,25 +1,9 @@
|
|
|
1
|
+
// PACKAGES
|
|
2
|
+
import { EMediaType } from 'rettiwt-core';
|
|
3
|
+
|
|
1
4
|
// TYPES
|
|
2
5
|
import { IUser } from './User';
|
|
3
6
|
|
|
4
|
-
/**
|
|
5
|
-
* The different types parsed entities like urls, media, mentions, hashtags, etc.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export interface ITweetEntities {
|
|
10
|
-
/** The list of hashtags mentioned in the tweet. */
|
|
11
|
-
hashtags: string[];
|
|
12
|
-
|
|
13
|
-
/** The list of urls mentioned in the tweet. */
|
|
14
|
-
urls: string[];
|
|
15
|
-
|
|
16
|
-
/** The list of IDs of users mentioned in the tweet. */
|
|
17
|
-
mentionedUsers: string[];
|
|
18
|
-
|
|
19
|
-
/** The list of urls to various media mentioned in the tweet. */
|
|
20
|
-
media: string[];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
7
|
/**
|
|
24
8
|
* The details of a single Tweet.
|
|
25
9
|
*
|
|
@@ -38,6 +22,9 @@ export interface ITweet {
|
|
|
38
22
|
/** Additional tweet entities like urls, mentions, etc. */
|
|
39
23
|
entities: ITweetEntities;
|
|
40
24
|
|
|
25
|
+
/** The urls of the media contents of the tweet (if any). */
|
|
26
|
+
media: ITweetMedia[];
|
|
27
|
+
|
|
41
28
|
/** The rest id of the tweet which is quoted in the tweet. */
|
|
42
29
|
quoted: string;
|
|
43
30
|
|
|
@@ -68,3 +55,32 @@ export interface ITweet {
|
|
|
68
55
|
/** The number of bookmarks of a tweet. */
|
|
69
56
|
bookmarkCount: number;
|
|
70
57
|
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The different types parsed entities like urls, media, mentions, hashtags, etc.
|
|
61
|
+
*
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export interface ITweetEntities {
|
|
65
|
+
/** The list of hashtags mentioned in the tweet. */
|
|
66
|
+
hashtags: string[];
|
|
67
|
+
|
|
68
|
+
/** The list of urls mentioned in the tweet. */
|
|
69
|
+
urls: string[];
|
|
70
|
+
|
|
71
|
+
/** The list of IDs of users mentioned in the tweet. */
|
|
72
|
+
mentionedUsers: string[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* A single media content.
|
|
77
|
+
*
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
export interface ITweetMedia {
|
|
81
|
+
/** The type of media. */
|
|
82
|
+
type: EMediaType;
|
|
83
|
+
|
|
84
|
+
/** The direct URL to the media. */
|
|
85
|
+
url: string;
|
|
86
|
+
}
|