rettiwt-api 5.0.0-alpha.0 → 5.0.0-alpha.2
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/.eslintrc.js +2 -3
- package/.github/workflows/documentation.yml +1 -1
- package/.github/workflows/publish-alpha.yml +1 -1
- package/.github/workflows/publish.yml +1 -1
- package/.prettierignore +1 -1
- package/.tool-versions +1 -1
- package/README.md +100 -100
- package/dist/Rettiwt.d.ts +10 -3
- package/dist/Rettiwt.js +31 -12
- package/dist/Rettiwt.js.map +1 -1
- package/dist/cli.js +8 -11
- package/dist/cli.js.map +1 -1
- package/dist/collections/Extractors.d.ts +36 -2
- package/dist/collections/Extractors.js +41 -69
- package/dist/collections/Extractors.js.map +1 -1
- package/dist/collections/Groups.js +5 -1
- package/dist/collections/Groups.js.map +1 -1
- package/dist/collections/Requests.d.ts +3 -3
- package/dist/collections/Requests.js +41 -40
- package/dist/collections/Requests.js.map +1 -1
- package/dist/commands/List.js +21 -78
- package/dist/commands/List.js.map +1 -1
- package/dist/commands/Tweet.js +214 -373
- package/dist/commands/Tweet.js.map +1 -1
- package/dist/commands/User.js +138 -305
- package/dist/commands/User.js.map +1 -1
- package/dist/enums/Authentication.d.ts +10 -0
- package/dist/enums/Authentication.js +15 -0
- package/dist/enums/Authentication.js.map +1 -0
- package/dist/enums/Data.d.ts +3 -3
- package/dist/enums/Data.js +3 -3
- package/dist/enums/Media.d.ts +10 -0
- package/dist/enums/Media.js +15 -0
- package/dist/enums/Media.js.map +1 -0
- package/dist/enums/Notification.d.ts +12 -0
- package/dist/enums/Notification.js +17 -0
- package/dist/enums/Notification.js.map +1 -0
- package/dist/enums/Resource.d.ts +4 -0
- package/dist/enums/Resource.js +4 -0
- package/dist/enums/Resource.js.map +1 -1
- package/dist/enums/raw/Analytics.d.ts +28 -0
- package/dist/enums/raw/Analytics.js +34 -0
- package/dist/enums/raw/Analytics.js.map +1 -0
- package/dist/enums/raw/Media.d.ts +10 -0
- package/dist/enums/raw/Media.js +15 -0
- package/dist/enums/raw/Media.js.map +1 -0
- package/dist/enums/raw/Notification.d.ts +11 -0
- package/dist/enums/raw/Notification.js +16 -0
- package/dist/enums/raw/Notification.js.map +1 -0
- package/dist/enums/raw/Tweet.d.ts +9 -0
- package/dist/enums/raw/Tweet.js +14 -0
- package/dist/enums/raw/Tweet.js.map +1 -0
- package/dist/helper/CliUtils.js +1 -2
- package/dist/helper/CliUtils.js.map +1 -1
- package/dist/helper/JsonUtils.js +6 -11
- package/dist/helper/JsonUtils.js.map +1 -1
- package/dist/helper/TidUtils.d.ts +2 -0
- package/dist/helper/TidUtils.js +162 -0
- package/dist/helper/TidUtils.js.map +1 -0
- package/dist/index.d.ts +75 -5
- package/dist/index.js +26 -6
- package/dist/index.js.map +1 -1
- package/dist/models/RettiwtConfig.d.ts +28 -0
- package/dist/models/RettiwtConfig.js +55 -0
- package/dist/models/RettiwtConfig.js.map +1 -0
- package/dist/models/args/FetchArgs.d.ts +16 -102
- package/dist/models/args/FetchArgs.js +105 -407
- package/dist/models/args/FetchArgs.js.map +1 -1
- package/dist/models/args/PostArgs.d.ts +16 -73
- package/dist/models/args/PostArgs.js +43 -236
- package/dist/models/args/PostArgs.js.map +1 -1
- package/dist/models/auth/AuthCookie.d.ts +21 -0
- package/dist/models/auth/AuthCookie.js +55 -0
- package/dist/models/auth/AuthCookie.js.map +1 -0
- package/dist/models/auth/AuthCredential.d.ts +30 -0
- package/dist/models/auth/AuthCredential.js +78 -0
- package/dist/models/auth/AuthCredential.js.map +1 -0
- package/dist/models/data/CursoredData.d.ts +5 -15
- package/dist/models/data/CursoredData.js +25 -32
- package/dist/models/data/CursoredData.js.map +1 -1
- package/dist/models/data/List.d.ts +7 -9
- package/dist/models/data/List.js +24 -4
- package/dist/models/data/List.js.map +1 -1
- package/dist/models/data/Notification.d.ts +10 -24
- package/dist/models/data/Notification.js +38 -36
- package/dist/models/data/Notification.js.map +1 -1
- package/dist/models/data/Tweet.d.ts +34 -31
- package/dist/models/data/Tweet.js +186 -112
- package/dist/models/data/Tweet.js.map +1 -1
- package/dist/models/data/User.d.ts +19 -23
- package/dist/models/data/User.js +92 -32
- package/dist/models/data/User.js.map +1 -1
- package/dist/models/errors/ApiError.js +8 -24
- package/dist/models/errors/ApiError.js.map +1 -1
- package/dist/models/errors/HttpError.js +8 -24
- package/dist/models/errors/HttpError.js.map +1 -1
- package/dist/models/errors/RettiwtError.d.ts +3 -2
- package/dist/models/errors/RettiwtError.js +8 -25
- package/dist/models/errors/RettiwtError.js.map +1 -1
- package/dist/models/errors/TimeoutError.js +5 -22
- package/dist/models/errors/TimeoutError.js.map +1 -1
- package/dist/models/params/Variables.d.ts +41 -0
- package/dist/models/params/Variables.js +61 -0
- package/dist/models/params/Variables.js.map +1 -0
- package/dist/requests/List.d.ts +24 -0
- package/dist/requests/List.js +122 -0
- package/dist/requests/List.js.map +1 -0
- package/dist/requests/Media.d.ts +21 -0
- package/dist/requests/Media.js +70 -0
- package/dist/requests/Media.js.map +1 -0
- package/dist/requests/Tweet.d.ts +75 -0
- package/dist/requests/Tweet.js +480 -0
- package/dist/requests/Tweet.js.map +1 -0
- package/dist/requests/User.d.ts +111 -0
- package/dist/requests/User.js +762 -0
- package/dist/requests/User.js.map +1 -0
- package/dist/services/internal/AuthService.d.ts +60 -0
- package/dist/services/internal/AuthService.js +106 -0
- package/dist/services/internal/AuthService.js.map +1 -0
- package/dist/services/internal/ErrorService.js +38 -40
- package/dist/services/internal/ErrorService.js.map +1 -1
- package/dist/services/internal/LogService.d.ts +0 -6
- package/dist/services/internal/LogService.js +12 -32
- package/dist/services/internal/LogService.js.map +1 -1
- package/dist/services/internal/TidService.d.ts +44 -0
- package/dist/services/internal/TidService.js +162 -0
- package/dist/services/internal/TidService.js.map +1 -0
- package/dist/services/public/FetcherService.d.ts +22 -19
- package/dist/services/public/FetcherService.js +126 -153
- package/dist/services/public/FetcherService.js.map +1 -1
- package/dist/services/public/ListService.d.ts +2 -2
- package/dist/services/public/ListService.js +31 -100
- package/dist/services/public/ListService.js.map +1 -1
- package/dist/services/public/TweetService.d.ts +63 -10
- package/dist/services/public/TweetService.js +255 -387
- package/dist/services/public/TweetService.js.map +1 -1
- package/dist/services/public/UserService.d.ts +4 -4
- package/dist/services/public/UserService.js +199 -386
- package/dist/services/public/UserService.js.map +1 -1
- package/dist/types/RettiwtConfig.d.ts +17 -10
- package/dist/types/args/FetchArgs.d.ts +123 -0
- package/dist/types/{ReturnTypes.js → args/FetchArgs.js} +1 -1
- package/dist/types/args/FetchArgs.js.map +1 -0
- package/dist/types/args/PostArgs.d.ts +100 -0
- package/dist/types/args/PostArgs.js +3 -0
- package/dist/types/args/PostArgs.js.map +1 -0
- package/dist/types/auth/AuthCookie.d.ts +15 -0
- package/dist/types/auth/AuthCookie.js +3 -0
- package/dist/types/auth/AuthCookie.js.map +1 -0
- package/dist/types/auth/AuthCredential.d.ts +23 -0
- package/dist/types/auth/AuthCredential.js +3 -0
- package/dist/types/auth/AuthCredential.js.map +1 -0
- package/dist/types/auth/TidDynamicArgs.d.ts +10 -0
- package/dist/types/auth/TidDynamicArgs.js +3 -0
- package/dist/types/auth/TidDynamicArgs.js.map +1 -0
- package/dist/types/auth/TidHeader.d.ts +8 -0
- package/dist/types/auth/TidHeader.js +3 -0
- package/dist/types/auth/TidHeader.js.map +1 -0
- package/dist/types/auth/TidParams.d.ts +27 -0
- package/dist/types/auth/TidParams.js +3 -0
- package/dist/types/auth/TidParams.js.map +1 -0
- package/dist/types/auth/TidProvider.d.ts +18 -0
- package/dist/types/auth/TidProvider.js +3 -0
- package/dist/types/auth/TidProvider.js.map +1 -0
- package/dist/types/data/CursoredData.d.ts +16 -0
- package/dist/types/data/CursoredData.js +3 -0
- package/dist/types/data/CursoredData.js.map +1 -0
- package/dist/types/data/List.d.ts +21 -0
- package/dist/types/data/List.js +3 -0
- package/dist/types/data/List.js.map +1 -0
- package/dist/types/data/Notification.d.ts +20 -0
- package/dist/types/data/Notification.js +3 -0
- package/dist/types/data/Notification.js.map +1 -0
- package/dist/types/data/Tweet.d.ts +71 -0
- package/dist/types/data/Tweet.js +3 -0
- package/dist/types/data/Tweet.js.map +1 -0
- package/dist/types/data/User.d.ts +35 -0
- package/dist/types/data/User.js +3 -0
- package/dist/types/data/User.js.map +1 -0
- package/dist/types/params/Variables.d.ts +27 -0
- package/dist/types/params/Variables.js +3 -0
- package/dist/types/params/Variables.js.map +1 -0
- package/dist/types/raw/base/Analytic.d.ts +21 -0
- package/dist/types/raw/base/Analytic.js +4 -0
- package/dist/types/raw/base/Analytic.js.map +1 -0
- package/dist/types/raw/base/Cursor.d.ts +11 -0
- package/dist/types/raw/base/Cursor.js +4 -0
- package/dist/types/raw/base/Cursor.js.map +1 -0
- package/dist/types/raw/base/LimitedVisibilityTweet.d.ts +32 -0
- package/dist/types/raw/base/LimitedVisibilityTweet.js +4 -0
- package/dist/types/raw/base/LimitedVisibilityTweet.js.map +1 -0
- package/dist/types/raw/base/List.d.ts +43 -0
- package/dist/types/raw/base/List.js +4 -0
- package/dist/types/raw/base/List.js.map +1 -0
- package/dist/types/raw/base/Media.d.ts +43 -0
- package/dist/types/raw/base/Media.js +4 -0
- package/dist/types/raw/base/Media.js.map +1 -0
- package/dist/types/raw/base/Notification.d.ts +53 -0
- package/dist/types/raw/base/Notification.js +4 -0
- package/dist/types/raw/base/Notification.js.map +1 -0
- package/dist/types/raw/base/Space.d.ts +32 -0
- package/dist/types/raw/base/Space.js +4 -0
- package/dist/types/raw/base/Space.js.map +1 -0
- package/dist/types/raw/base/Tweet.d.ts +119 -0
- package/dist/types/raw/base/Tweet.js +4 -0
- package/dist/types/raw/base/Tweet.js.map +1 -0
- package/dist/types/raw/base/User.d.ts +140 -0
- package/dist/types/raw/base/User.js +4 -0
- package/dist/types/raw/base/User.js.map +1 -0
- package/dist/types/raw/composite/DataResult.d.ts +8 -0
- package/dist/types/raw/composite/DataResult.js +3 -0
- package/dist/types/raw/composite/DataResult.js.map +1 -0
- package/dist/types/raw/composite/TimelineTweet.d.ts +11 -0
- package/dist/types/raw/composite/TimelineTweet.js +4 -0
- package/dist/types/raw/composite/TimelineTweet.js.map +1 -0
- package/dist/types/raw/composite/TimelineUser.d.ts +10 -0
- package/dist/types/raw/composite/TimelineUser.js +4 -0
- package/dist/types/raw/composite/TimelineUser.js.map +1 -0
- package/dist/types/raw/generic/Error.d.ts +30 -0
- package/dist/types/raw/generic/Error.js +3 -0
- package/dist/types/raw/generic/Error.js.map +1 -0
- package/dist/types/raw/generic/Response.d.ts +12 -0
- package/dist/types/raw/generic/Response.js +3 -0
- package/dist/types/raw/generic/Response.js.map +1 -0
- package/dist/types/raw/list/Details.d.ts +122 -0
- package/dist/types/raw/list/Details.js +4 -0
- package/dist/types/raw/list/Details.js.map +1 -0
- package/dist/types/raw/list/Members.d.ts +134 -0
- package/dist/types/raw/list/Members.js +4 -0
- package/dist/types/raw/list/Members.js.map +1 -0
- package/dist/types/raw/list/Tweets.d.ts +1968 -0
- package/dist/types/raw/list/Tweets.js +4 -0
- package/dist/types/raw/list/Tweets.js.map +1 -0
- package/dist/types/raw/media/FinalizeUpload.d.ts +18 -0
- package/dist/types/raw/media/FinalizeUpload.js +4 -0
- package/dist/types/raw/media/FinalizeUpload.js.map +1 -0
- package/dist/types/raw/media/InitalizeUpload.d.ts +10 -0
- package/dist/types/raw/media/InitalizeUpload.js +4 -0
- package/dist/types/raw/media/InitalizeUpload.js.map +1 -0
- package/dist/types/raw/media/LiveVideoStream.d.ts +19 -0
- package/dist/types/raw/media/LiveVideoStream.js +4 -0
- package/dist/types/raw/media/LiveVideoStream.js.map +1 -0
- package/dist/types/raw/space/Details.d.ts +315 -0
- package/dist/types/raw/space/Details.js +4 -0
- package/dist/types/raw/space/Details.js.map +1 -0
- package/dist/types/raw/tweet/Details.d.ts +183 -0
- package/dist/types/raw/tweet/Details.js +4 -0
- package/dist/types/raw/tweet/Details.js.map +1 -0
- package/dist/types/raw/tweet/Like.d.ts +12 -0
- package/dist/types/raw/tweet/Like.js +4 -0
- package/dist/types/raw/tweet/Like.js.map +1 -0
- package/dist/types/raw/tweet/Likers.d.ts +170 -0
- package/dist/types/raw/tweet/Likers.js +4 -0
- package/dist/types/raw/tweet/Likers.js.map +1 -0
- package/dist/types/raw/tweet/Post.d.ts +133 -0
- package/dist/types/raw/tweet/Post.js +4 -0
- package/dist/types/raw/tweet/Post.js.map +1 -0
- package/dist/types/raw/tweet/Replies.d.ts +465 -0
- package/dist/types/raw/tweet/Replies.js +4 -0
- package/dist/types/raw/tweet/Replies.js.map +1 -0
- package/dist/types/raw/tweet/Retweet.d.ts +25 -0
- package/dist/types/raw/tweet/Retweet.js +4 -0
- package/dist/types/raw/tweet/Retweet.js.map +1 -0
- package/dist/types/raw/tweet/Retweeters.d.ts +177 -0
- package/dist/types/raw/tweet/Retweeters.js +4 -0
- package/dist/types/raw/tweet/Retweeters.js.map +1 -0
- package/dist/types/raw/tweet/Schedule.d.ts +15 -0
- package/dist/types/raw/tweet/Schedule.js +4 -0
- package/dist/types/raw/tweet/Schedule.js.map +1 -0
- package/dist/types/raw/tweet/Search.d.ts +518 -0
- package/dist/types/raw/tweet/Search.js +4 -0
- package/dist/types/raw/tweet/Search.js.map +1 -0
- package/dist/types/raw/tweet/Unlike.d.ts +12 -0
- package/dist/types/raw/tweet/Unlike.js +4 -0
- package/dist/types/raw/tweet/Unlike.js.map +1 -0
- package/dist/types/raw/tweet/Unpost.d.ts +17 -0
- package/dist/types/raw/tweet/Unpost.js +4 -0
- package/dist/types/raw/tweet/Unpost.js.map +1 -0
- package/dist/types/raw/tweet/Unretweet.d.ts +25 -0
- package/dist/types/raw/tweet/Unretweet.js +4 -0
- package/dist/types/raw/tweet/Unretweet.js.map +1 -0
- package/dist/types/raw/tweet/Unschedule.d.ts +12 -0
- package/dist/types/raw/tweet/Unschedule.js +4 -0
- package/dist/types/raw/tweet/Unschedule.js.map +1 -0
- package/dist/types/raw/user/Affiliates.d.ts +154 -0
- package/dist/types/raw/user/Affiliates.js +4 -0
- package/dist/types/raw/user/Affiliates.js.map +1 -0
- package/dist/types/raw/user/Analytics.d.ts +32 -0
- package/dist/types/raw/user/Analytics.js +4 -0
- package/dist/types/raw/user/Analytics.js.map +1 -0
- package/dist/types/raw/user/Bookmarks.d.ts +550 -0
- package/dist/types/raw/user/Bookmarks.js +4 -0
- package/dist/types/raw/user/Bookmarks.js.map +1 -0
- package/dist/types/raw/user/Details.d.ts +157 -0
- package/dist/types/raw/user/Details.js +4 -0
- package/dist/types/raw/user/Details.js.map +1 -0
- package/dist/types/raw/user/Follow.d.ts +248 -0
- package/dist/types/raw/user/Follow.js +4 -0
- package/dist/types/raw/user/Follow.js.map +1 -0
- package/dist/types/raw/user/Followed.d.ts +1666 -0
- package/dist/types/raw/user/Followed.js +4 -0
- package/dist/types/raw/user/Followed.js.map +1 -0
- package/dist/types/raw/user/Followers.d.ts +182 -0
- package/dist/types/raw/user/Followers.js +4 -0
- package/dist/types/raw/user/Followers.js.map +1 -0
- package/dist/types/raw/user/Following.d.ts +182 -0
- package/dist/types/raw/user/Following.js +4 -0
- package/dist/types/raw/user/Following.js.map +1 -0
- package/dist/types/raw/user/Highlights.d.ts +1106 -0
- package/dist/types/raw/user/Highlights.js +4 -0
- package/dist/types/raw/user/Highlights.js.map +1 -0
- package/dist/types/raw/user/Likes.d.ts +1065 -0
- package/dist/types/raw/user/Likes.js +4 -0
- package/dist/types/raw/user/Likes.js.map +1 -0
- package/dist/types/raw/user/Media.d.ts +1492 -0
- package/dist/types/raw/user/Media.js +4 -0
- package/dist/types/raw/user/Media.js.map +1 -0
- package/dist/types/raw/user/Notifications.d.ts +142 -0
- package/dist/types/raw/user/Notifications.js +4 -0
- package/dist/types/raw/user/Notifications.js.map +1 -0
- package/dist/types/raw/user/Recommended.d.ts +1991 -0
- package/dist/types/raw/user/Recommended.js +4 -0
- package/dist/types/raw/user/Recommended.js.map +1 -0
- package/dist/types/raw/user/Scheduled.d.ts +31 -0
- package/dist/types/raw/user/Scheduled.js +4 -0
- package/dist/types/raw/user/Scheduled.js.map +1 -0
- package/dist/types/raw/user/Subscriptions.d.ts +151 -0
- package/dist/types/raw/user/Subscriptions.js +4 -0
- package/dist/types/raw/user/Subscriptions.js.map +1 -0
- package/dist/types/raw/user/Tweets.d.ts +1065 -0
- package/dist/types/raw/user/Tweets.js +4 -0
- package/dist/types/raw/user/Tweets.js.map +1 -0
- package/dist/types/raw/user/TweetsAndReplies.d.ts +1065 -0
- package/dist/types/raw/user/TweetsAndReplies.js +4 -0
- package/dist/types/raw/user/TweetsAndReplies.js.map +1 -0
- package/dist/types/raw/user/Unfollow.d.ts +248 -0
- package/dist/types/raw/user/Unfollow.js +4 -0
- package/dist/types/raw/user/Unfollow.js.map +1 -0
- package/eslint.config.mjs +17 -0
- package/package.json +22 -19
- package/src/Rettiwt.ts +22 -7
- package/src/cli.ts +0 -2
- package/src/collections/Extractors.ts +40 -34
- package/src/collections/Groups.ts +4 -0
- package/src/collections/Requests.ts +46 -44
- package/src/commands/Tweet.ts +35 -7
- package/src/commands/User.ts +13 -2
- package/src/enums/Authentication.ts +10 -0
- package/src/enums/Data.ts +3 -3
- package/src/enums/Media.ts +10 -0
- package/src/enums/Notification.ts +12 -0
- package/src/enums/Resource.ts +4 -0
- package/src/enums/raw/Analytics.ts +29 -0
- package/src/enums/raw/Media.ts +10 -0
- package/src/enums/raw/Notification.ts +11 -0
- package/src/enums/raw/Tweet.ts +9 -0
- package/src/helper/JsonUtils.ts +1 -1
- package/src/helper/TidUtils.ts +189 -0
- package/src/index.ts +78 -44
- package/src/models/RettiwtConfig.ts +64 -0
- package/src/models/args/FetchArgs.ts +86 -436
- package/src/models/args/PostArgs.ts +24 -249
- package/src/models/auth/AuthCookie.ts +58 -0
- package/src/models/auth/AuthCredential.ts +85 -0
- package/src/models/data/CursoredData.ts +21 -26
- package/src/models/data/List.ts +18 -15
- package/src/models/data/Notification.ts +25 -38
- package/src/models/data/Tweet.ts +143 -104
- package/src/models/data/User.ts +74 -44
- package/src/models/errors/RettiwtError.ts +3 -2
- package/src/models/params/Variables.ts +62 -0
- package/src/requests/List.ts +121 -0
- package/src/requests/Media.ts +67 -0
- package/src/requests/Tweet.ts +496 -0
- package/src/requests/User.ts +783 -0
- package/src/services/{public → internal}/AuthService.ts +28 -60
- package/src/services/internal/LogService.ts +4 -19
- package/src/services/internal/TidService.ts +147 -0
- package/src/services/public/FetcherService.ts +89 -59
- package/src/services/public/ListService.ts +4 -4
- package/src/services/public/TweetService.ts +129 -42
- package/src/services/public/UserService.ts +49 -37
- package/src/types/RettiwtConfig.ts +18 -12
- package/src/types/args/FetchArgs.ts +148 -0
- package/src/types/args/PostArgs.ts +112 -0
- package/src/types/auth/AuthCookie.ts +22 -0
- package/src/types/auth/AuthCredential.ts +28 -0
- package/src/types/auth/TidDynamicArgs.ts +10 -0
- package/src/types/auth/TidHeader.ts +12 -0
- package/src/types/auth/TidParams.ts +36 -0
- package/src/types/auth/TidProvider.ts +19 -0
- package/src/types/data/CursoredData.ts +18 -0
- package/src/types/data/List.ts +27 -0
- package/src/types/data/Notification.ts +26 -0
- package/src/types/data/Tweet.ts +96 -0
- package/src/types/data/User.ts +48 -0
- package/src/types/params/Variables.ts +41 -0
- package/src/types/raw/base/Analytic.ts +26 -0
- package/src/types/raw/base/Cursor.ts +13 -0
- package/src/types/raw/base/LimitedVisibilityTweet.ts +40 -0
- package/src/types/raw/base/List.ts +50 -0
- package/src/types/raw/base/Media.ts +53 -0
- package/src/types/raw/base/Notification.ts +67 -0
- package/src/types/raw/base/Space.ts +35 -0
- package/src/types/raw/base/Tweet.ts +139 -0
- package/src/types/raw/base/User.ts +164 -0
- package/src/types/raw/composite/DataResult.ts +8 -0
- package/src/types/raw/composite/TimelineTweet.ts +14 -0
- package/src/types/raw/composite/TimelineUser.ts +13 -0
- package/src/types/raw/generic/Error.ts +35 -0
- package/src/types/raw/generic/Response.ts +13 -0
- package/src/types/raw/list/Details.ts +137 -0
- package/src/types/raw/list/Members.ts +154 -0
- package/src/types/raw/list/Tweets.ts +2296 -0
- package/src/types/raw/media/FinalizeUpload.ts +20 -0
- package/src/types/raw/media/InitalizeUpload.ts +12 -0
- package/src/types/raw/media/LiveVideoStream.ts +21 -0
- package/src/types/raw/space/Details.ts +359 -0
- package/src/types/raw/tweet/Details.ts +210 -0
- package/src/types/raw/tweet/Like.ts +14 -0
- package/src/types/raw/tweet/Likers.ts +200 -0
- package/src/types/raw/tweet/Post.ts +150 -0
- package/src/types/raw/tweet/Replies.ts +539 -0
- package/src/types/raw/tweet/Retweet.ts +31 -0
- package/src/types/raw/tweet/Retweeters.ts +208 -0
- package/src/types/raw/tweet/Schedule.ts +18 -0
- package/src/types/raw/tweet/Search.ts +597 -0
- package/src/types/raw/tweet/Unlike.ts +14 -0
- package/src/types/raw/tweet/Unpost.ts +20 -0
- package/src/types/raw/tweet/Unretweet.ts +31 -0
- package/src/types/raw/tweet/Unschedule.ts +14 -0
- package/src/types/raw/user/Affiliates.ts +179 -0
- package/src/types/raw/user/Analytics.ts +39 -0
- package/src/types/raw/user/Bookmarks.ts +637 -0
- package/src/types/raw/user/Details.ts +185 -0
- package/src/types/raw/user/Follow.ts +280 -0
- package/src/types/raw/user/Followed.ts +1942 -0
- package/src/types/raw/user/Followers.ts +215 -0
- package/src/types/raw/user/Following.ts +215 -0
- package/src/types/raw/user/Highlights.ts +1287 -0
- package/src/types/raw/user/Likes.ts +1254 -0
- package/src/types/raw/user/Media.ts +1738 -0
- package/src/types/raw/user/Notifications.ts +175 -0
- package/src/types/raw/user/Recommended.ts +2319 -0
- package/src/types/raw/user/Scheduled.ts +37 -0
- package/src/types/raw/user/Subscriptions.ts +176 -0
- package/src/types/raw/user/Tweets.ts +1254 -0
- package/src/types/raw/user/TweetsAndReplies.ts +1254 -0
- package/src/types/raw/user/Unfollow.ts +280 -0
- package/tsconfig.json +7 -5
- package/.eslintignore +0 -3
- package/dist/commands/Auth.d.ts +0 -10
- package/dist/commands/Auth.js +0 -101
- package/dist/commands/Auth.js.map +0 -1
- package/dist/models/errors/DataValidationError.d.ts +0 -30
- package/dist/models/errors/DataValidationError.js +0 -34
- package/dist/models/errors/DataValidationError.js.map +0 -1
- package/dist/services/public/AuthService.d.ts +0 -91
- package/dist/services/public/AuthService.js +0 -205
- package/dist/services/public/AuthService.js.map +0 -1
- package/dist/types/ReturnTypes.d.ts +0 -21
- package/dist/types/ReturnTypes.js.map +0 -1
- package/src/commands/Auth.ts +0 -46
- package/src/models/errors/DataValidationError.ts +0 -44
- package/src/types/ReturnTypes.ts +0 -24
|
@@ -1,31 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TweetMedia = exports.TweetEntities = exports.Tweet = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
const Logging_1 = require("../../enums/Logging");
|
|
5
|
+
const Media_1 = require("../../enums/Media");
|
|
6
|
+
const Media_2 = require("../../enums/raw/Media");
|
|
7
|
+
const JsonUtils_1 = require("../../helper/JsonUtils");
|
|
8
|
+
const LogService_1 = require("../../services/internal/LogService");
|
|
9
|
+
const User_1 = require("./User");
|
|
9
10
|
/**
|
|
10
11
|
* The details of a single tweet.
|
|
11
12
|
*
|
|
12
13
|
* @public
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
+
class Tweet {
|
|
16
|
+
bookmarkCount;
|
|
17
|
+
conversationId;
|
|
18
|
+
createdAt;
|
|
19
|
+
entities;
|
|
20
|
+
fullText;
|
|
21
|
+
id;
|
|
22
|
+
lang;
|
|
23
|
+
likeCount;
|
|
24
|
+
media;
|
|
25
|
+
quoteCount;
|
|
26
|
+
quoted;
|
|
27
|
+
replyCount;
|
|
28
|
+
replyTo;
|
|
29
|
+
retweetCount;
|
|
30
|
+
retweetedTweet;
|
|
31
|
+
tweetBy;
|
|
32
|
+
url;
|
|
33
|
+
viewCount;
|
|
15
34
|
/**
|
|
16
35
|
* @param tweet - The raw tweet details.
|
|
17
|
-
* @param response - The raw response
|
|
18
36
|
*/
|
|
19
|
-
|
|
20
|
-
var _a, _b;
|
|
37
|
+
constructor(tweet) {
|
|
21
38
|
this.id = tweet.rest_id;
|
|
22
|
-
this.
|
|
39
|
+
this.conversationId = tweet.legacy.conversation_id_str;
|
|
40
|
+
this.createdAt = new Date(tweet.legacy.created_at).toISOString();
|
|
23
41
|
this.tweetBy = new User_1.User(tweet.core.user_results.result);
|
|
24
42
|
this.entities = new TweetEntities(tweet.legacy.entities);
|
|
25
|
-
this.media =
|
|
26
|
-
this.quoted = this.getQuotedTweet(tweet
|
|
43
|
+
this.media = tweet.legacy.extended_entities?.media?.map((media) => new TweetMedia(media));
|
|
44
|
+
this.quoted = this.getQuotedTweet(tweet);
|
|
27
45
|
this.fullText = tweet.note_tweet ? tweet.note_tweet.note_tweet_results.result.text : tweet.legacy.full_text;
|
|
28
|
-
this.replyTo =
|
|
46
|
+
this.replyTo = tweet.legacy.in_reply_to_status_id_str;
|
|
29
47
|
this.lang = tweet.legacy.lang;
|
|
30
48
|
this.quoteCount = tweet.legacy.quote_count;
|
|
31
49
|
this.replyCount = tweet.legacy.reply_count;
|
|
@@ -33,109 +51,88 @@ var Tweet = /** @class */ (function () {
|
|
|
33
51
|
this.likeCount = tweet.legacy.favorite_count;
|
|
34
52
|
this.viewCount = tweet.views.count ? parseInt(tweet.views.count) : 0;
|
|
35
53
|
this.bookmarkCount = tweet.legacy.bookmark_count;
|
|
36
|
-
this.retweetedTweet = this.getRetweetedTweet(tweet
|
|
54
|
+
this.retweetedTweet = this.getRetweetedTweet(tweet);
|
|
55
|
+
this.url = `https://x.com/${this.tweetBy.userName}/status/${this.id}`;
|
|
37
56
|
}
|
|
38
|
-
Tweet.prototype.getParentTweet = function (tweet, response) {
|
|
39
|
-
var _a, _b;
|
|
40
|
-
// Getting parent tweet ID, if any
|
|
41
|
-
var parentTweetId = (_b = (_a = tweet.legacy) === null || _a === void 0 ? void 0 : _a.in_reply_to_status_id_str) !== null && _b !== void 0 ? _b : '';
|
|
42
|
-
// If no parent tweet
|
|
43
|
-
if (parentTweetId.length == 0) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
// Getting the details of parent tweet
|
|
47
|
-
return Tweet.single(response, parentTweetId);
|
|
48
|
-
};
|
|
49
57
|
/**
|
|
50
58
|
* Extract and deserialize the original quoted tweet from the given raw tweet.
|
|
51
59
|
*
|
|
52
60
|
* @param tweet - The raw tweet.
|
|
53
|
-
* @param response - The raw response
|
|
54
61
|
*
|
|
55
62
|
* @returns - The deserialized original quoted tweet.
|
|
56
63
|
*/
|
|
57
|
-
|
|
58
|
-
var _a, _b, _c, _d, _e, _f;
|
|
64
|
+
getQuotedTweet(tweet) {
|
|
59
65
|
// If tweet with limited visibility
|
|
60
66
|
if (tweet.quoted_status_result &&
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return new Tweet(tweet.quoted_status_result.result.tweet
|
|
67
|
+
tweet.quoted_status_result?.result?.__typename == 'TweetWithVisibilityResults' &&
|
|
68
|
+
tweet.quoted_status_result.result?.tweet?.legacy) {
|
|
69
|
+
return new Tweet(tweet.quoted_status_result.result.tweet);
|
|
64
70
|
}
|
|
65
71
|
// If normal tweet
|
|
66
|
-
else if (
|
|
67
|
-
return new Tweet(tweet.quoted_status_result.result
|
|
72
|
+
else if (tweet.quoted_status_result?.result?.rest_id) {
|
|
73
|
+
return new Tweet(tweet.quoted_status_result.result);
|
|
68
74
|
}
|
|
69
75
|
// Else, skip
|
|
70
76
|
else {
|
|
71
77
|
return undefined;
|
|
72
78
|
}
|
|
73
|
-
}
|
|
79
|
+
}
|
|
74
80
|
/**
|
|
75
81
|
* Extract and deserialize the original retweeted tweet from the given raw tweet.
|
|
76
82
|
*
|
|
77
83
|
* @param tweet - The raw tweet.
|
|
78
|
-
* @param response - The raw response
|
|
79
84
|
*
|
|
80
85
|
* @returns - The deserialized original retweeted tweet.
|
|
81
86
|
*/
|
|
82
|
-
|
|
83
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
87
|
+
getRetweetedTweet(tweet) {
|
|
84
88
|
// If retweet with limited visibility
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return new Tweet(tweet.legacy.retweeted_status_result.result.tweet
|
|
89
|
+
if (tweet.legacy?.retweeted_status_result &&
|
|
90
|
+
tweet.legacy?.retweeted_status_result?.result?.__typename == 'TweetWithVisibilityResults' &&
|
|
91
|
+
tweet.legacy?.retweeted_status_result?.result?.tweet?.legacy) {
|
|
92
|
+
return new Tweet(tweet.legacy.retweeted_status_result.result.tweet);
|
|
89
93
|
}
|
|
90
94
|
// If normal tweet
|
|
91
|
-
else if (
|
|
92
|
-
return new Tweet(tweet.legacy.retweeted_status_result.result
|
|
95
|
+
else if (tweet.legacy?.retweeted_status_result?.result?.rest_id) {
|
|
96
|
+
return new Tweet(tweet.legacy.retweeted_status_result.result);
|
|
93
97
|
}
|
|
94
98
|
// Else, skip
|
|
95
99
|
else {
|
|
96
100
|
return undefined;
|
|
97
101
|
}
|
|
98
|
-
}
|
|
102
|
+
}
|
|
99
103
|
/**
|
|
100
|
-
* Extracts and deserializes
|
|
104
|
+
* Extracts and deserializes multiple target tweets from the given raw response data.
|
|
101
105
|
*
|
|
102
106
|
* @param response - The raw response data.
|
|
107
|
+
* @param ids - The ids of the target tweets.
|
|
103
108
|
*
|
|
104
|
-
* @returns The deserialized
|
|
105
|
-
*
|
|
106
|
-
* @internal
|
|
109
|
+
* @returns The target deserialized tweets.
|
|
107
110
|
*/
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
var tweets = [];
|
|
111
|
+
static multiple(response, ids) {
|
|
112
|
+
let tweets = [];
|
|
111
113
|
// Extracting the matching data
|
|
112
|
-
|
|
114
|
+
const extract = (0, JsonUtils_1.findByFilter)(response, '__typename', 'Tweet');
|
|
113
115
|
// Deserializing valid data
|
|
114
|
-
for (
|
|
115
|
-
|
|
116
|
-
// If tweet with limited visibility
|
|
117
|
-
if (((_a = item.tweet_results) === null || _a === void 0 ? void 0 : _a.result) &&
|
|
118
|
-
((_c = (_b = item.tweet_results) === null || _b === void 0 ? void 0 : _b.result) === null || _c === void 0 ? void 0 : _c.__typename) == 'TweetWithVisibilityResults' &&
|
|
119
|
-
((_f = (_e = (_d = item.tweet_results) === null || _d === void 0 ? void 0 : _d.result) === null || _e === void 0 ? void 0 : _e.tweet) === null || _f === void 0 ? void 0 : _f.legacy)) {
|
|
120
|
-
tweets.push(new Tweet(item.tweet_results.result.tweet, response));
|
|
121
|
-
}
|
|
122
|
-
// If normal tweet
|
|
123
|
-
else if ((_h = (_g = item.tweet_results) === null || _g === void 0 ? void 0 : _g.result) === null || _h === void 0 ? void 0 : _h.legacy) {
|
|
116
|
+
for (const item of extract) {
|
|
117
|
+
if (item.legacy) {
|
|
124
118
|
// Logging
|
|
125
|
-
LogService_1.LogService.log(Logging_1.ELogActions.DESERIALIZE, { id: item.
|
|
126
|
-
tweets.push(new Tweet(item
|
|
119
|
+
LogService_1.LogService.log(Logging_1.ELogActions.DESERIALIZE, { id: item.rest_id });
|
|
120
|
+
tweets.push(new Tweet(item));
|
|
127
121
|
}
|
|
128
|
-
// If invalid/unrecognized tweet
|
|
129
122
|
else {
|
|
130
123
|
// Logging
|
|
131
124
|
LogService_1.LogService.log(Logging_1.ELogActions.WARNING, {
|
|
132
125
|
action: Logging_1.ELogActions.DESERIALIZE,
|
|
133
|
-
message:
|
|
126
|
+
message: `Tweet not found, skipping`,
|
|
134
127
|
});
|
|
135
128
|
}
|
|
136
129
|
}
|
|
130
|
+
// Filtering only required tweets, if required
|
|
131
|
+
if (ids && ids.length) {
|
|
132
|
+
tweets = tweets.filter((tweet) => ids.includes(tweet.id));
|
|
133
|
+
}
|
|
137
134
|
return tweets;
|
|
138
|
-
}
|
|
135
|
+
}
|
|
139
136
|
/**
|
|
140
137
|
* Extracts and deserializes a single target tweet from the given raw response data.
|
|
141
138
|
*
|
|
@@ -143,115 +140,192 @@ var Tweet = /** @class */ (function () {
|
|
|
143
140
|
* @param id - The id of the target tweet.
|
|
144
141
|
*
|
|
145
142
|
* @returns The target deserialized tweet.
|
|
146
|
-
*
|
|
147
|
-
* @internal
|
|
148
143
|
*/
|
|
149
|
-
|
|
150
|
-
|
|
144
|
+
static single(response, id) {
|
|
145
|
+
const tweets = [];
|
|
151
146
|
// Extracting the matching data
|
|
152
|
-
|
|
147
|
+
const extract = (0, JsonUtils_1.findByFilter)(response, 'rest_id', id);
|
|
153
148
|
// Deserializing valid data
|
|
154
|
-
for (
|
|
155
|
-
var item = extract_2[_i];
|
|
149
|
+
for (const item of extract) {
|
|
156
150
|
if (item.legacy) {
|
|
157
151
|
// Logging
|
|
158
152
|
LogService_1.LogService.log(Logging_1.ELogActions.DESERIALIZE, { id: item.rest_id });
|
|
159
|
-
tweets.push(new Tweet(item
|
|
153
|
+
tweets.push(new Tweet(item));
|
|
160
154
|
}
|
|
161
155
|
else {
|
|
162
156
|
// Logging
|
|
163
157
|
LogService_1.LogService.log(Logging_1.ELogActions.WARNING, {
|
|
164
158
|
action: Logging_1.ELogActions.DESERIALIZE,
|
|
165
|
-
message:
|
|
159
|
+
message: `Tweet not found, skipping`,
|
|
166
160
|
});
|
|
167
161
|
}
|
|
168
162
|
}
|
|
169
163
|
return tweets.length ? tweets[0] : undefined;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Extracts and deserializes the timeline of tweets from the given raw response data.
|
|
167
|
+
*
|
|
168
|
+
* @param response - The raw response data.
|
|
169
|
+
* @param ids - The IDs of specific tweets that need to be extracted.
|
|
170
|
+
*
|
|
171
|
+
* @returns The deserialized timeline of tweets.
|
|
172
|
+
*/
|
|
173
|
+
static timeline(response) {
|
|
174
|
+
const tweets = [];
|
|
175
|
+
// Extracting the matching data
|
|
176
|
+
const extract = (0, JsonUtils_1.findByFilter)(response, '__typename', 'TimelineTweet');
|
|
177
|
+
// Deserializing valid data
|
|
178
|
+
for (const item of extract) {
|
|
179
|
+
// If tweet with limited visibility
|
|
180
|
+
if (item.tweet_results?.result &&
|
|
181
|
+
item.tweet_results?.result?.__typename == 'TweetWithVisibilityResults' &&
|
|
182
|
+
item.tweet_results?.result?.tweet?.legacy) {
|
|
183
|
+
tweets.push(new Tweet(item.tweet_results.result.tweet));
|
|
184
|
+
}
|
|
185
|
+
// If normal tweet
|
|
186
|
+
else if (item.tweet_results?.result?.legacy) {
|
|
187
|
+
// Logging
|
|
188
|
+
LogService_1.LogService.log(Logging_1.ELogActions.DESERIALIZE, { id: item.tweet_results.result.rest_id });
|
|
189
|
+
tweets.push(new Tweet(item.tweet_results.result));
|
|
190
|
+
}
|
|
191
|
+
// If invalid/unrecognized tweet
|
|
192
|
+
else {
|
|
193
|
+
// Logging
|
|
194
|
+
LogService_1.LogService.log(Logging_1.ELogActions.WARNING, {
|
|
195
|
+
action: Logging_1.ELogActions.DESERIALIZE,
|
|
196
|
+
message: `Tweet not found, skipping`,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return tweets;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* @returns A serializable JSON representation of `this` object.
|
|
204
|
+
*/
|
|
205
|
+
toJSON() {
|
|
206
|
+
return {
|
|
207
|
+
bookmarkCount: this.bookmarkCount,
|
|
208
|
+
conversationId: this.conversationId,
|
|
209
|
+
createdAt: this.createdAt,
|
|
210
|
+
entities: this.entities.toJSON(),
|
|
211
|
+
fullText: this.fullText,
|
|
212
|
+
id: this.id,
|
|
213
|
+
lang: this.lang,
|
|
214
|
+
likeCount: this.likeCount,
|
|
215
|
+
media: this.media?.map((item) => item.toJSON()),
|
|
216
|
+
quoteCount: this.quoteCount,
|
|
217
|
+
quoted: this.quoted?.toJSON(),
|
|
218
|
+
replyCount: this.replyCount,
|
|
219
|
+
replyTo: this.replyTo,
|
|
220
|
+
retweetCount: this.retweetCount,
|
|
221
|
+
retweetedTweet: this.retweetedTweet?.toJSON(),
|
|
222
|
+
tweetBy: this.tweetBy.toJSON(),
|
|
223
|
+
url: this.url,
|
|
224
|
+
viewCount: this.viewCount,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
173
228
|
exports.Tweet = Tweet;
|
|
174
229
|
/**
|
|
175
230
|
* The different types parsed entities like urls, media, mentions, hashtags, etc.
|
|
176
231
|
*
|
|
177
232
|
* @public
|
|
178
233
|
*/
|
|
179
|
-
|
|
234
|
+
class TweetEntities {
|
|
235
|
+
/** The list of hashtags mentioned in the tweet. */
|
|
236
|
+
hashtags = [];
|
|
237
|
+
/** The list of IDs of users mentioned in the tweet. */
|
|
238
|
+
mentionedUsers = [];
|
|
239
|
+
/** The list of urls mentioned in the tweet. */
|
|
240
|
+
urls = [];
|
|
180
241
|
/**
|
|
181
242
|
* @param entities - The raw tweet entities.
|
|
182
243
|
*/
|
|
183
|
-
|
|
184
|
-
/** The list of hashtags mentioned in the tweet. */
|
|
185
|
-
this.hashtags = [];
|
|
186
|
-
/** The list of IDs of users mentioned in the tweet. */
|
|
187
|
-
this.mentionedUsers = [];
|
|
188
|
-
/** The list of urls mentioned in the tweet. */
|
|
189
|
-
this.urls = [];
|
|
244
|
+
constructor(entities) {
|
|
190
245
|
// Extracting user mentions
|
|
191
246
|
if (entities.user_mentions) {
|
|
192
|
-
for (
|
|
193
|
-
var user = _a[_i];
|
|
247
|
+
for (const user of entities.user_mentions) {
|
|
194
248
|
this.mentionedUsers.push(user.screen_name);
|
|
195
249
|
}
|
|
196
250
|
}
|
|
197
251
|
// Extracting urls
|
|
198
252
|
if (entities.urls) {
|
|
199
|
-
for (
|
|
200
|
-
var url = _c[_b];
|
|
253
|
+
for (const url of entities.urls) {
|
|
201
254
|
this.urls.push(url.expanded_url);
|
|
202
255
|
}
|
|
203
256
|
}
|
|
204
257
|
// Extracting hashtags
|
|
205
258
|
if (entities.hashtags) {
|
|
206
|
-
for (
|
|
207
|
-
var hashtag = _e[_d];
|
|
259
|
+
for (const hashtag of entities.hashtags) {
|
|
208
260
|
this.hashtags.push(hashtag.text);
|
|
209
261
|
}
|
|
210
262
|
}
|
|
211
263
|
}
|
|
212
|
-
|
|
213
|
-
|
|
264
|
+
/**
|
|
265
|
+
* @returns A serializable JSON representation of `this` object.
|
|
266
|
+
*/
|
|
267
|
+
toJSON() {
|
|
268
|
+
return {
|
|
269
|
+
hashtags: this.hashtags,
|
|
270
|
+
mentionedUsers: this.mentionedUsers,
|
|
271
|
+
urls: this.urls,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
}
|
|
214
275
|
exports.TweetEntities = TweetEntities;
|
|
215
276
|
/**
|
|
216
277
|
* The details of a single media content included in a tweet.
|
|
217
278
|
*
|
|
218
279
|
* @public
|
|
219
280
|
*/
|
|
220
|
-
|
|
281
|
+
class TweetMedia {
|
|
282
|
+
/** The thumbnail URL for the video content of the tweet. */
|
|
283
|
+
thumbnailUrl;
|
|
284
|
+
/** The type of media. */
|
|
285
|
+
type;
|
|
286
|
+
/** The direct URL to the media. */
|
|
287
|
+
url = '';
|
|
221
288
|
/**
|
|
222
289
|
* @param media - The raw media details.
|
|
223
290
|
*/
|
|
224
|
-
|
|
225
|
-
var _this = this;
|
|
226
|
-
var _a, _b;
|
|
227
|
-
/** The direct URL to the media. */
|
|
228
|
-
this.url = '';
|
|
229
|
-
this.type = media.type;
|
|
291
|
+
constructor(media) {
|
|
230
292
|
// If the media is a photo
|
|
231
|
-
if (media.type ==
|
|
293
|
+
if (media.type == Media_2.ERawMediaType.PHOTO) {
|
|
294
|
+
this.type = Media_1.EMediaType.PHOTO;
|
|
232
295
|
this.url = media.media_url_https;
|
|
233
296
|
}
|
|
234
297
|
// If the media is a gif
|
|
235
|
-
else if (media.type ==
|
|
236
|
-
this.
|
|
298
|
+
else if (media.type == Media_2.ERawMediaType.GIF) {
|
|
299
|
+
this.type = Media_1.EMediaType.GIF;
|
|
300
|
+
this.url = media.video_info?.variants[0].url;
|
|
237
301
|
}
|
|
238
302
|
// If the media is a video
|
|
239
303
|
else {
|
|
304
|
+
this.type = Media_1.EMediaType.VIDEO;
|
|
240
305
|
this.thumbnailUrl = media.media_url_https;
|
|
241
306
|
/** The highest bitrate of all variants. */
|
|
242
|
-
|
|
307
|
+
let highestRate = 0;
|
|
243
308
|
/**
|
|
244
309
|
* Selecting the URL of the video variant with the highest bitrate.
|
|
245
310
|
*/
|
|
246
|
-
|
|
247
|
-
if (variant.bitrate >
|
|
248
|
-
|
|
249
|
-
|
|
311
|
+
media.video_info?.variants.forEach((variant) => {
|
|
312
|
+
if (variant.bitrate > highestRate) {
|
|
313
|
+
highestRate = variant.bitrate;
|
|
314
|
+
this.url = variant.url;
|
|
250
315
|
}
|
|
251
316
|
});
|
|
252
317
|
}
|
|
253
318
|
}
|
|
254
|
-
|
|
255
|
-
|
|
319
|
+
/**
|
|
320
|
+
* @returns A serializable JSON representation of `this` object.
|
|
321
|
+
*/
|
|
322
|
+
toJSON() {
|
|
323
|
+
return {
|
|
324
|
+
thumbnailUrl: this.thumbnailUrl,
|
|
325
|
+
type: this.type,
|
|
326
|
+
url: this.url,
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
}
|
|
256
330
|
exports.TweetMedia = TweetMedia;
|
|
257
331
|
//# sourceMappingURL=Tweet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tweet.js","sourceRoot":"","sources":["../../../src/models/data/Tweet.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Tweet.js","sourceRoot":"","sources":["../../../src/models/data/Tweet.ts"],"names":[],"mappings":";;;AAAA,iDAAkD;AAClD,6CAA+C;AAC/C,iDAAsD;AACtD,sDAAsD;AAEtD,mEAAgE;AAQhE,iCAA8B;AAE9B;;;;GAIG;AACH,MAAa,KAAK;IACV,aAAa,CAAS;IACtB,cAAc,CAAS;IAC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CAAC,GAAG,GAAG,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAa,CAAC;QACxD,CAAC;QACD,0BAA0B;aACrB,CAAC;YACL,IAAI,CAAC,IAAI,GAAG,kBAAU,CAAC,KAAK,CAAC;YAC7B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,eAAe,CAAC;YAE1C,2CAA2C;YAC3C,IAAI,WAAW,GAAG,CAAC,CAAC;YAEpB;;eAEG;YACH,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC9C,IAAI,OAAO,CAAC,OAAO,GAAG,WAAW,EAAE,CAAC;oBACnC,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;oBAC9B,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;gBACxB,CAAC;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAED;;OAEG;IACI,MAAM;QACZ,OAAO;YACN,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,GAAG,EAAE,IAAI,CAAC,GAAG;SACb,CAAC;IACH,CAAC;CACD;AAtDD,gCAsDC"}
|
|
@@ -1,60 +1,56 @@
|
|
|
1
|
-
import { IUser
|
|
1
|
+
import { IUser } from '../../types/data/User';
|
|
2
|
+
import { IUser as IRawUser } from '../../types/raw/base/User';
|
|
2
3
|
/**
|
|
3
4
|
* The details of a single user.
|
|
4
5
|
*
|
|
5
6
|
* @public
|
|
6
7
|
*/
|
|
7
|
-
export declare class User {
|
|
8
|
-
/** The creation date of user's account. */
|
|
8
|
+
export declare class User implements IUser {
|
|
9
9
|
createdAt: string;
|
|
10
|
-
/** The user's description. */
|
|
11
10
|
description?: string;
|
|
12
|
-
/** The number of followers of the user. */
|
|
13
11
|
followersCount: number;
|
|
14
|
-
/** The number of following of the user. */
|
|
15
12
|
followingsCount: number;
|
|
16
|
-
/** The full name of the user. */
|
|
17
13
|
fullName: string;
|
|
18
|
-
/** The rest id of the user. */
|
|
19
14
|
id: string;
|
|
20
|
-
/** Whether the account is verified or not. */
|
|
21
15
|
isVerified: boolean;
|
|
22
|
-
/** The number of tweets liked by the user. */
|
|
23
16
|
likeCount: number;
|
|
24
|
-
/** The location of user as provided by user. */
|
|
25
17
|
location?: string;
|
|
26
|
-
/** The rest id of the tweet pinned in the user's profile. */
|
|
27
18
|
pinnedTweet?: string;
|
|
28
|
-
/** The url of the profile banner image. */
|
|
29
19
|
profileBanner?: string;
|
|
30
|
-
/** The url of the profile image. */
|
|
31
20
|
profileImage: string;
|
|
32
|
-
/** The number of tweets made by the user. */
|
|
33
21
|
statusesCount: number;
|
|
34
|
-
/** The username/screenname of the user. */
|
|
35
22
|
userName: string;
|
|
36
23
|
/**
|
|
37
24
|
* @param user - The raw user details.
|
|
38
25
|
*/
|
|
39
26
|
constructor(user: IRawUser);
|
|
40
27
|
/**
|
|
41
|
-
* Extracts and deserializes
|
|
28
|
+
* Extracts and deserializes multiple target users from the given raw response data.
|
|
42
29
|
*
|
|
43
30
|
* @param response - The raw response data.
|
|
31
|
+
* @param ids - The ids of the target users.
|
|
44
32
|
*
|
|
45
|
-
* @returns The deserialized
|
|
46
|
-
*
|
|
47
|
-
* @internal
|
|
33
|
+
* @returns The target deserialized users.
|
|
48
34
|
*/
|
|
49
|
-
static
|
|
35
|
+
static multiple(response: NonNullable<unknown>, ids: string[]): User[];
|
|
50
36
|
/**
|
|
51
37
|
* Extracts and deserializes a single target user from the given raw response data.
|
|
52
38
|
*
|
|
53
39
|
* @param response - The raw response data.
|
|
54
40
|
*
|
|
55
41
|
* @returns The target deserialized user.
|
|
56
|
-
*
|
|
57
|
-
* @internal
|
|
58
42
|
*/
|
|
59
43
|
static single(response: NonNullable<unknown>): User | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Extracts and deserializes the timeline of users from the given raw response data.
|
|
46
|
+
*
|
|
47
|
+
* @param response - The raw response data.
|
|
48
|
+
*
|
|
49
|
+
* @returns The deserialized timeline of users.
|
|
50
|
+
*/
|
|
51
|
+
static timeline(response: NonNullable<unknown>): User[];
|
|
52
|
+
/**
|
|
53
|
+
* @returns A serializable JSON representation of `this` object.
|
|
54
|
+
*/
|
|
55
|
+
toJSON(): IUser;
|
|
60
56
|
}
|