rettiwt-api 5.0.0-alpha.1 → 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/dist/Rettiwt.d.ts +10 -3
- package/dist/Rettiwt.js +19 -7
- package/dist/Rettiwt.js.map +1 -1
- package/dist/collections/Extractors.d.ts +35 -2
- package/dist/collections/Extractors.js +3 -0
- package/dist/collections/Extractors.js.map +1 -1
- package/dist/collections/Groups.js +3 -0
- package/dist/collections/Groups.js.map +1 -1
- package/dist/collections/Requests.js +41 -41
- package/dist/collections/Requests.js.map +1 -1
- package/dist/commands/Tweet.js +33 -7
- package/dist/commands/Tweet.js.map +1 -1
- package/dist/commands/User.js +12 -2
- package/dist/commands/User.js.map +1 -1
- package/dist/enums/Authentication.d.ts +2 -10
- package/dist/enums/Authentication.js +3 -12
- package/dist/enums/Authentication.js.map +1 -1
- package/dist/enums/Data.d.ts +3 -15
- package/dist/enums/Data.js +4 -17
- package/dist/enums/Data.js.map +1 -1
- 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 +3 -0
- package/dist/enums/Resource.js +3 -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/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 -4
- package/dist/index.js +26 -5
- 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 +46 -3
- package/dist/models/args/FetchArgs.js +107 -5
- package/dist/models/args/FetchArgs.js.map +1 -1
- package/dist/models/args/PostArgs.d.ts +44 -16
- package/dist/models/args/PostArgs.js +61 -22
- package/dist/models/args/PostArgs.js.map +1 -1
- package/dist/models/auth/AuthCookie.d.ts +2 -0
- package/dist/models/auth/AuthCookie.js +2 -0
- package/dist/models/auth/AuthCookie.js.map +1 -1
- package/dist/models/auth/AuthCredential.d.ts +2 -0
- package/dist/models/auth/AuthCredential.js +2 -0
- package/dist/models/auth/AuthCredential.js.map +1 -1
- package/dist/models/data/CursoredData.d.ts +4 -13
- package/dist/models/data/CursoredData.js +16 -23
- package/dist/models/data/CursoredData.js.map +1 -1
- package/dist/models/data/List.d.ts +5 -1
- package/dist/models/data/List.js +14 -0
- package/dist/models/data/List.js.map +1 -1
- package/dist/models/data/Notification.d.ts +7 -5
- package/dist/models/data/Notification.js +19 -8
- package/dist/models/data/Notification.js.map +1 -1
- package/dist/models/data/Tweet.d.ts +29 -9
- package/dist/models/data/Tweet.js +103 -25
- package/dist/models/data/Tweet.js.map +1 -1
- package/dist/models/data/User.d.ts +17 -8
- package/dist/models/data/User.js +63 -13
- package/dist/models/data/User.js.map +1 -1
- package/dist/models/errors/RettiwtError.d.ts +3 -2
- package/dist/models/errors/RettiwtError.js +3 -2
- package/dist/models/errors/RettiwtError.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 +3 -5
- package/dist/services/internal/AuthService.js +5 -8
- package/dist/services/internal/AuthService.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 +20 -19
- package/dist/services/public/FetcherService.js +67 -49
- package/dist/services/public/FetcherService.js.map +1 -1
- package/dist/services/public/ListService.d.ts +2 -2
- package/dist/services/public/ListService.js.map +1 -1
- package/dist/services/public/TweetService.d.ts +35 -7
- package/dist/services/public/TweetService.js +54 -8
- package/dist/services/public/TweetService.js.map +1 -1
- package/dist/services/public/UserService.d.ts +4 -4
- package/dist/services/public/UserService.js +25 -13
- package/dist/services/public/UserService.js.map +1 -1
- package/dist/types/RettiwtConfig.d.ts +9 -10
- package/dist/types/args/FetchArgs.d.ts +71 -7
- package/dist/types/args/PostArgs.d.ts +62 -18
- package/dist/types/auth/AuthCookie.d.ts +2 -0
- package/dist/types/auth/AuthCredential.d.ts +2 -0
- package/dist/types/auth/TidDynamicArgs.d.ts +10 -0
- package/dist/types/auth/{AccountCredential.js → TidDynamicArgs.js} +1 -1
- package/dist/types/auth/TidDynamicArgs.js.map +1 -0
- package/dist/types/auth/TidHeader.d.ts +8 -0
- package/dist/types/{ReturnTypes.js → auth/TidHeader.js} +1 -1
- 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 +1 -10
- package/dist/types/data/Notification.d.ts +2 -2
- package/dist/types/data/Tweet.d.ts +2 -2
- 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/package.json +3 -3
- package/src/Rettiwt.ts +22 -7
- package/src/collections/Extractors.ts +38 -34
- package/src/collections/Groups.ts +3 -0
- package/src/collections/Requests.ts +43 -42
- package/src/commands/Tweet.ts +35 -7
- package/src/commands/User.ts +13 -2
- package/src/enums/Authentication.ts +2 -11
- package/src/enums/Data.ts +3 -16
- package/src/enums/Media.ts +10 -0
- package/src/enums/Notification.ts +12 -0
- package/src/enums/Resource.ts +3 -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/TidUtils.ts +189 -0
- package/src/index.ts +78 -43
- package/src/models/RettiwtConfig.ts +64 -0
- package/src/models/args/FetchArgs.ts +121 -5
- package/src/models/args/PostArgs.ts +61 -21
- package/src/models/auth/AuthCookie.ts +2 -0
- package/src/models/auth/AuthCredential.ts +2 -0
- package/src/models/data/CursoredData.ts +16 -24
- package/src/models/data/List.ts +16 -2
- package/src/models/data/Notification.ts +21 -12
- package/src/models/data/Tweet.ts +120 -39
- package/src/models/data/User.ts +71 -15
- 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/internal/AuthService.ts +6 -11
- package/src/services/internal/TidService.ts +147 -0
- package/src/services/public/FetcherService.ts +78 -58
- package/src/services/public/ListService.ts +4 -4
- package/src/services/public/TweetService.ts +87 -40
- package/src/services/public/UserService.ts +47 -35
- package/src/types/RettiwtConfig.ts +11 -12
- package/src/types/args/FetchArgs.ts +92 -8
- package/src/types/args/PostArgs.ts +72 -22
- package/src/types/auth/AuthCookie.ts +2 -0
- package/src/types/auth/AuthCredential.ts +2 -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 +1 -11
- package/src/types/data/Notification.ts +2 -2
- package/src/types/data/Tweet.ts +2 -2
- 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/dist/models/auth/AccountCredential.d.ts +0 -13
- package/dist/models/auth/AccountCredential.js +0 -21
- package/dist/models/auth/AccountCredential.js.map +0 -1
- package/dist/types/ReturnTypes.d.ts +0 -21
- package/dist/types/ReturnTypes.js.map +0 -1
- package/dist/types/auth/AccountCredential.d.ts +0 -11
- package/dist/types/auth/AccountCredential.js.map +0 -1
- package/src/models/auth/AccountCredential.ts +0 -19
- package/src/types/ReturnTypes.ts +0 -24
- package/src/types/auth/AccountCredential.ts +0 -13
package/dist/models/data/User.js
CHANGED
|
@@ -31,7 +31,7 @@ class User {
|
|
|
31
31
|
this.id = user.rest_id;
|
|
32
32
|
this.userName = user.legacy.screen_name;
|
|
33
33
|
this.fullName = user.legacy.name;
|
|
34
|
-
this.createdAt = user.legacy.created_at;
|
|
34
|
+
this.createdAt = new Date(user.legacy.created_at).toISOString();
|
|
35
35
|
this.description = user.legacy.description.length ? user.legacy.description : undefined;
|
|
36
36
|
this.isVerified = user.is_blue_verified;
|
|
37
37
|
this.likeCount = user.legacy.favourites_count;
|
|
@@ -44,24 +44,23 @@ class User {
|
|
|
44
44
|
this.profileImage = user.legacy.profile_image_url_https;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Extracts and deserializes
|
|
47
|
+
* Extracts and deserializes multiple target users from the given raw response data.
|
|
48
48
|
*
|
|
49
49
|
* @param response - The raw response data.
|
|
50
|
+
* @param ids - The ids of the target users.
|
|
50
51
|
*
|
|
51
|
-
* @returns The deserialized
|
|
52
|
-
*
|
|
53
|
-
* @internal
|
|
52
|
+
* @returns The target deserialized users.
|
|
54
53
|
*/
|
|
55
|
-
static
|
|
56
|
-
|
|
54
|
+
static multiple(response, ids) {
|
|
55
|
+
let users = [];
|
|
57
56
|
// Extracting the matching data
|
|
58
|
-
const extract = (0, JsonUtils_1.findByFilter)(response, '__typename', '
|
|
57
|
+
const extract = (0, JsonUtils_1.findByFilter)(response, '__typename', 'User');
|
|
59
58
|
// Deserializing valid data
|
|
60
59
|
for (const item of extract) {
|
|
61
|
-
if (item.
|
|
60
|
+
if (item.legacy && item.legacy.created_at) {
|
|
62
61
|
// Logging
|
|
63
|
-
LogService_1.LogService.log(Logging_1.ELogActions.DESERIALIZE, { id: item.
|
|
64
|
-
users.push(new User(item
|
|
62
|
+
LogService_1.LogService.log(Logging_1.ELogActions.DESERIALIZE, { id: item.rest_id });
|
|
63
|
+
users.push(new User(item));
|
|
65
64
|
}
|
|
66
65
|
else {
|
|
67
66
|
// Logging
|
|
@@ -71,6 +70,10 @@ class User {
|
|
|
71
70
|
});
|
|
72
71
|
}
|
|
73
72
|
}
|
|
73
|
+
// Filtering only required user, if required
|
|
74
|
+
if (ids && ids.length) {
|
|
75
|
+
users = users.filter((user) => ids.includes(user.id));
|
|
76
|
+
}
|
|
74
77
|
return users;
|
|
75
78
|
}
|
|
76
79
|
/**
|
|
@@ -79,8 +82,6 @@ class User {
|
|
|
79
82
|
* @param response - The raw response data.
|
|
80
83
|
*
|
|
81
84
|
* @returns The target deserialized user.
|
|
82
|
-
*
|
|
83
|
-
* @internal
|
|
84
85
|
*/
|
|
85
86
|
static single(response) {
|
|
86
87
|
const users = [];
|
|
@@ -103,6 +104,55 @@ class User {
|
|
|
103
104
|
}
|
|
104
105
|
return users.length ? users[0] : undefined;
|
|
105
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Extracts and deserializes the timeline of users from the given raw response data.
|
|
109
|
+
*
|
|
110
|
+
* @param response - The raw response data.
|
|
111
|
+
*
|
|
112
|
+
* @returns The deserialized timeline of users.
|
|
113
|
+
*/
|
|
114
|
+
static timeline(response) {
|
|
115
|
+
const users = [];
|
|
116
|
+
// Extracting the matching data
|
|
117
|
+
const extract = (0, JsonUtils_1.findByFilter)(response, '__typename', 'TimelineUser');
|
|
118
|
+
// Deserializing valid data
|
|
119
|
+
for (const item of extract) {
|
|
120
|
+
if (item.user_results?.result?.legacy) {
|
|
121
|
+
// Logging
|
|
122
|
+
LogService_1.LogService.log(Logging_1.ELogActions.DESERIALIZE, { id: item.user_results.result.rest_id });
|
|
123
|
+
users.push(new User(item.user_results.result));
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
// Logging
|
|
127
|
+
LogService_1.LogService.log(Logging_1.ELogActions.WARNING, {
|
|
128
|
+
action: Logging_1.ELogActions.DESERIALIZE,
|
|
129
|
+
message: `User not found, skipping`,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return users;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @returns A serializable JSON representation of `this` object.
|
|
137
|
+
*/
|
|
138
|
+
toJSON() {
|
|
139
|
+
return {
|
|
140
|
+
createdAt: this.createdAt,
|
|
141
|
+
description: this.description,
|
|
142
|
+
followersCount: this.followersCount,
|
|
143
|
+
followingsCount: this.followingsCount,
|
|
144
|
+
fullName: this.fullName,
|
|
145
|
+
id: this.id,
|
|
146
|
+
isVerified: this.isVerified,
|
|
147
|
+
likeCount: this.likeCount,
|
|
148
|
+
location: this.location,
|
|
149
|
+
pinnedTweet: this.pinnedTweet,
|
|
150
|
+
profileBanner: this.profileBanner,
|
|
151
|
+
profileImage: this.profileImage,
|
|
152
|
+
statusesCount: this.statusesCount,
|
|
153
|
+
userName: this.userName,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
106
156
|
}
|
|
107
157
|
exports.User = User;
|
|
108
158
|
//# sourceMappingURL=User.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/models/data/User.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/models/data/User.ts"],"names":[],"mappings":";;;AAAA,iDAAkD;AAClD,sDAAsD;AACtD,mEAAgE;AAKhE;;;;GAIG;AACH,MAAa,IAAI;IACT,SAAS,CAAS;IAClB,WAAW,CAAU;IACrB,cAAc,CAAS;IACvB,eAAe,CAAS;IACxB,QAAQ,CAAS;IACjB,EAAE,CAAS;IACX,UAAU,CAAU;IACpB,SAAS,CAAS;IAClB,QAAQ,CAAU;IAClB,WAAW,CAAU;IACrB,aAAa,CAAU;IACvB,YAAY,CAAS;IACrB,aAAa,CAAS;IACtB,QAAQ,CAAS;IAExB;;OAEG;IACH,YAAmB,IAAc;QAChC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QAC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0B;iBACnC,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC;IAED;;OAEG;IACI,MAAM;QACZ,OAAO;YACN,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACvB,CAAC;IACH,CAAC;CACD;AA/JD,oBA+JC"}
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RettiwtError = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Represents an error that arises inside the package.
|
|
6
|
-
*
|
|
7
|
-
* @internal
|
|
8
6
|
*/
|
|
9
7
|
class RettiwtError extends Error {
|
|
8
|
+
/**
|
|
9
|
+
* @param message - The error message.
|
|
10
|
+
*/
|
|
10
11
|
constructor(message) {
|
|
11
12
|
super(message);
|
|
12
13
|
Object.setPrototypeOf(this, RettiwtError.prototype);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RettiwtError.js","sourceRoot":"","sources":["../../../src/models/errors/RettiwtError.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"RettiwtError.js","sourceRoot":"","sources":["../../../src/models/errors/RettiwtError.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK;IACtC;;OAEG;IACH,YAAmB,OAAgB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;CACD;AATD,oCASC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { IMediaEntityVariable, IMediaVariable, IReplyVariable } from '../../types/params/Variables';
|
|
2
|
+
import { NewTweetMedia } from '../args/PostArgs';
|
|
3
|
+
/**
|
|
4
|
+
* Media to be sent as payload.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class MediaVariable implements IMediaVariable {
|
|
9
|
+
media_entities: MediaEntityVariable[];
|
|
10
|
+
possibly_sensitive: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @param media - The list of NewTweetMedia objects specifying the media items to be sent in the Tweet.
|
|
13
|
+
*/
|
|
14
|
+
constructor(media: NewTweetMedia[]);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Each media item in the media payload.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare class MediaEntityVariable implements IMediaEntityVariable {
|
|
22
|
+
media_id: string;
|
|
23
|
+
tagged_users: string[];
|
|
24
|
+
/**
|
|
25
|
+
* @param media - The NewTweetMedia object specifying the details of the media item to be included in the payload.
|
|
26
|
+
*/
|
|
27
|
+
constructor(media: NewTweetMedia);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Reply specific details to be sent in payload.
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare class ReplyVariable implements IReplyVariable {
|
|
35
|
+
exclude_reply_user_ids: string[];
|
|
36
|
+
in_reply_to_tweet_id: string;
|
|
37
|
+
/**
|
|
38
|
+
* @param replyTo - The id of the Tweet to which this Tweet is a reply.
|
|
39
|
+
*/
|
|
40
|
+
constructor(replyTo: string);
|
|
41
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReplyVariable = exports.MediaEntityVariable = exports.MediaVariable = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Media to be sent as payload.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
class MediaVariable {
|
|
10
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
11
|
+
media_entities;
|
|
12
|
+
possibly_sensitive;
|
|
13
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
14
|
+
/**
|
|
15
|
+
* @param media - The list of NewTweetMedia objects specifying the media items to be sent in the Tweet.
|
|
16
|
+
*/
|
|
17
|
+
constructor(media) {
|
|
18
|
+
this.media_entities = media.map((item) => new MediaEntityVariable(item));
|
|
19
|
+
this.possibly_sensitive = false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.MediaVariable = MediaVariable;
|
|
23
|
+
/**
|
|
24
|
+
* Each media item in the media payload.
|
|
25
|
+
*
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
class MediaEntityVariable {
|
|
29
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
30
|
+
media_id;
|
|
31
|
+
tagged_users;
|
|
32
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
33
|
+
/**
|
|
34
|
+
* @param media - The NewTweetMedia object specifying the details of the media item to be included in the payload.
|
|
35
|
+
*/
|
|
36
|
+
constructor(media) {
|
|
37
|
+
this.media_id = media.id;
|
|
38
|
+
this.tagged_users = media.tags ?? [];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.MediaEntityVariable = MediaEntityVariable;
|
|
42
|
+
/**
|
|
43
|
+
* Reply specific details to be sent in payload.
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
class ReplyVariable {
|
|
48
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
49
|
+
exclude_reply_user_ids;
|
|
50
|
+
in_reply_to_tweet_id;
|
|
51
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
52
|
+
/**
|
|
53
|
+
* @param replyTo - The id of the Tweet to which this Tweet is a reply.
|
|
54
|
+
*/
|
|
55
|
+
constructor(replyTo) {
|
|
56
|
+
this.in_reply_to_tweet_id = replyTo;
|
|
57
|
+
this.exclude_reply_user_ids = [];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ReplyVariable = ReplyVariable;
|
|
61
|
+
//# sourceMappingURL=Variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Variables.js","sourceRoot":"","sources":["../../../src/models/params/Variables.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH,MAAa,aAAa;IACzB,yDAAyD;IAClD,cAAc,CAAwB;IACtC,kBAAkB,CAAU;IACnC,wDAAwD;IAExD;;OAEG;IACH,YAAmB,KAAsB;QACxC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IACjC,CAAC;CACD;AAbD,sCAaC;AAED;;;;GAIG;AACH,MAAa,mBAAmB;IAC/B,yDAAyD;IAClD,QAAQ,CAAS;IACjB,YAAY,CAAW;IAC9B,wDAAwD;IAExD;;OAEG;IACH,YAAmB,KAAoB;QACtC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;IACtC,CAAC;CACD;AAbD,kDAaC;AAED;;;;GAIG;AACH,MAAa,aAAa;IACzB,yDAAyD;IAClD,sBAAsB,CAAW;IACjC,oBAAoB,CAAS;IACpC,wDAAwD;IAExD;;OAEG;IACH,YAAmB,OAAe;QACjC,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC;QACpC,IAAI,CAAC,sBAAsB,GAAG,EAAE,CAAC;IAClC,CAAC;CACD;AAbD,sCAaC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
/**
|
|
3
|
+
* Collection of requests related to lists.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListRequests {
|
|
8
|
+
/**
|
|
9
|
+
* @param id - The id of the list whose details are to be fetched.
|
|
10
|
+
*/
|
|
11
|
+
static details(id: string): AxiosRequestConfig;
|
|
12
|
+
/**
|
|
13
|
+
* @param id - The id of the list whose members are to be fetched.
|
|
14
|
+
* @param count - The number of members to fetch. Must be \<= 100.
|
|
15
|
+
* @param cursor - The cursor to the batch of members to fetch.
|
|
16
|
+
*/
|
|
17
|
+
static members(id: string, count?: number, cursor?: string): AxiosRequestConfig;
|
|
18
|
+
/**
|
|
19
|
+
* @param id - The id of the list whose tweets are to be fetched.
|
|
20
|
+
* @param count - The number of tweets to fetch. Must be \<= 100.
|
|
21
|
+
* @param cursor - The cursor to the batch of tweets to fetch.
|
|
22
|
+
*/
|
|
23
|
+
static tweets(id: string, count?: number, cursor?: string): AxiosRequestConfig;
|
|
24
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListRequests = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Collection of requests related to lists.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
class ListRequests {
|
|
10
|
+
/**
|
|
11
|
+
* @param id - The id of the list whose details are to be fetched.
|
|
12
|
+
*/
|
|
13
|
+
static details(id) {
|
|
14
|
+
return {
|
|
15
|
+
method: 'get',
|
|
16
|
+
url: 'https://x.com/i/api/graphql/gO1_eYPohKYHwCG2m-1ZnQ/ListByRestId',
|
|
17
|
+
params: {
|
|
18
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
19
|
+
variables: JSON.stringify({ listId: id }),
|
|
20
|
+
features: JSON.stringify({
|
|
21
|
+
rweb_lists_timeline_redesign_enabled: true,
|
|
22
|
+
responsive_web_graphql_exclude_directive_enabled: true,
|
|
23
|
+
verified_phone_label_enabled: true,
|
|
24
|
+
responsive_web_graphql_skip_user_profile_image_extensions_enabled: false,
|
|
25
|
+
responsive_web_graphql_timeline_navigation_enabled: true,
|
|
26
|
+
}),
|
|
27
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
28
|
+
},
|
|
29
|
+
paramsSerializer: { encode: encodeURIComponent },
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @param id - The id of the list whose members are to be fetched.
|
|
34
|
+
* @param count - The number of members to fetch. Must be \<= 100.
|
|
35
|
+
* @param cursor - The cursor to the batch of members to fetch.
|
|
36
|
+
*/
|
|
37
|
+
static members(id, count, cursor) {
|
|
38
|
+
return {
|
|
39
|
+
method: 'get',
|
|
40
|
+
url: 'https://x.com/i/api/graphql/dsJhIe3M0vCopjSfU6SlQw/ListMembers',
|
|
41
|
+
params: {
|
|
42
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
43
|
+
variables: JSON.stringify({
|
|
44
|
+
listId: id,
|
|
45
|
+
count: count,
|
|
46
|
+
cursor: cursor,
|
|
47
|
+
}),
|
|
48
|
+
features: JSON.stringify({
|
|
49
|
+
rweb_tipjar_consumption_enabled: true,
|
|
50
|
+
responsive_web_graphql_exclude_directive_enabled: true,
|
|
51
|
+
verified_phone_label_enabled: true,
|
|
52
|
+
creator_subscriptions_tweet_preview_api_enabled: true,
|
|
53
|
+
responsive_web_graphql_timeline_navigation_enabled: true,
|
|
54
|
+
responsive_web_graphql_skip_user_profile_image_extensions_enabled: false,
|
|
55
|
+
communities_web_enable_tweet_community_results_fetch: true,
|
|
56
|
+
c9s_tweet_anatomy_moderator_badge_enabled: true,
|
|
57
|
+
articles_preview_enabled: true,
|
|
58
|
+
responsive_web_edit_tweet_api_enabled: true,
|
|
59
|
+
graphql_is_translatable_rweb_tweet_is_translatable_enabled: true,
|
|
60
|
+
view_counts_everywhere_api_enabled: true,
|
|
61
|
+
longform_notetweets_consumption_enabled: true,
|
|
62
|
+
responsive_web_twitter_article_tweet_consumption_enabled: true,
|
|
63
|
+
tweet_awards_web_tipping_enabled: false,
|
|
64
|
+
creator_subscriptions_quote_tweet_preview_enabled: false,
|
|
65
|
+
freedom_of_speech_not_reach_fetch_enabled: true,
|
|
66
|
+
standardized_nudges_misinfo: true,
|
|
67
|
+
tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled: true,
|
|
68
|
+
rweb_video_timestamps_enabled: true,
|
|
69
|
+
longform_notetweets_rich_text_read_enabled: true,
|
|
70
|
+
longform_notetweets_inline_media_enabled: true,
|
|
71
|
+
responsive_web_enhance_cards_enabled: false,
|
|
72
|
+
}),
|
|
73
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @param id - The id of the list whose tweets are to be fetched.
|
|
79
|
+
* @param count - The number of tweets to fetch. Must be \<= 100.
|
|
80
|
+
* @param cursor - The cursor to the batch of tweets to fetch.
|
|
81
|
+
*/
|
|
82
|
+
static tweets(id, count, cursor) {
|
|
83
|
+
return {
|
|
84
|
+
method: 'get',
|
|
85
|
+
url: 'https://x.com/i/api/graphql/naCjgapXCSCsbZ7qnnItQA/ListLatestTweetsTimeline',
|
|
86
|
+
params: {
|
|
87
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
88
|
+
variables: JSON.stringify({
|
|
89
|
+
listId: id,
|
|
90
|
+
count: count,
|
|
91
|
+
cursor: cursor,
|
|
92
|
+
}),
|
|
93
|
+
features: JSON.stringify({
|
|
94
|
+
rweb_lists_timeline_redesign_enabled: true,
|
|
95
|
+
responsive_web_graphql_exclude_directive_enabled: true,
|
|
96
|
+
verified_phone_label_enabled: true,
|
|
97
|
+
creator_subscriptions_tweet_preview_api_enabled: true,
|
|
98
|
+
responsive_web_graphql_timeline_navigation_enabled: true,
|
|
99
|
+
responsive_web_graphql_skip_user_profile_image_extensions_enabled: false,
|
|
100
|
+
tweetypie_unmention_optimization_enabled: true,
|
|
101
|
+
responsive_web_edit_tweet_api_enabled: true,
|
|
102
|
+
graphql_is_translatable_rweb_tweet_is_translatable_enabled: true,
|
|
103
|
+
view_counts_everywhere_api_enabled: true,
|
|
104
|
+
longform_notetweets_consumption_enabled: true,
|
|
105
|
+
responsive_web_twitter_article_tweet_consumption_enabled: false,
|
|
106
|
+
tweet_awards_web_tipping_enabled: false,
|
|
107
|
+
freedom_of_speech_not_reach_fetch_enabled: true,
|
|
108
|
+
standardized_nudges_misinfo: true,
|
|
109
|
+
tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled: true,
|
|
110
|
+
longform_notetweets_rich_text_read_enabled: true,
|
|
111
|
+
longform_notetweets_inline_media_enabled: true,
|
|
112
|
+
responsive_web_media_download_video_enabled: false,
|
|
113
|
+
responsive_web_enhance_cards_enabled: false,
|
|
114
|
+
}),
|
|
115
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
116
|
+
},
|
|
117
|
+
paramsSerializer: { encode: encodeURIComponent },
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.ListRequests = ListRequests;
|
|
122
|
+
//# sourceMappingURL=List.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../src/requests/List.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,MAAa,YAAY;IACxB;;OAEG;IACI,MAAM,CAAC,OAAO,CA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AAgB,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE;SAChD,CAAC;IACH,CAAC;CACD;AAjHD,oCAiHC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
/**
|
|
3
|
+
* Collection of requests related to media.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class MediaRequests {
|
|
8
|
+
/**
|
|
9
|
+
* @param id - The allocated id of the media item to be uploaded.
|
|
10
|
+
* @param media - The media item to upload.
|
|
11
|
+
*/
|
|
12
|
+
static appendUpload(id: string, media: string | ArrayBuffer): AxiosRequestConfig;
|
|
13
|
+
/**
|
|
14
|
+
* @param id - The allocated id of the media item.
|
|
15
|
+
*/
|
|
16
|
+
static finalizeUpload(id: string): AxiosRequestConfig;
|
|
17
|
+
/**
|
|
18
|
+
* @param size - The size (in bytes) of the media item to be uploaded.
|
|
19
|
+
*/
|
|
20
|
+
static initializeUpload(size: number): AxiosRequestConfig;
|
|
21
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MediaRequests = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const form_data_1 = __importDefault(require("form-data"));
|
|
9
|
+
/**
|
|
10
|
+
* Collection of requests related to media.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
class MediaRequests {
|
|
15
|
+
/**
|
|
16
|
+
* @param id - The allocated id of the media item to be uploaded.
|
|
17
|
+
* @param media - The media item to upload.
|
|
18
|
+
*/
|
|
19
|
+
static appendUpload(id, media) {
|
|
20
|
+
const data = new form_data_1.default();
|
|
21
|
+
data.append('media', typeof media == 'string' ? fs_1.default.createReadStream(media) : Buffer.from(media));
|
|
22
|
+
return {
|
|
23
|
+
method: 'post',
|
|
24
|
+
headers: { referer: 'https://x.com' },
|
|
25
|
+
url: 'https://upload.x.com/i/media/upload.json',
|
|
26
|
+
params: {
|
|
27
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
28
|
+
command: 'APPEND',
|
|
29
|
+
media_id: id,
|
|
30
|
+
segment_index: 0,
|
|
31
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
32
|
+
},
|
|
33
|
+
data: data,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @param id - The allocated id of the media item.
|
|
38
|
+
*/
|
|
39
|
+
static finalizeUpload(id) {
|
|
40
|
+
return {
|
|
41
|
+
method: 'post',
|
|
42
|
+
headers: { referer: 'https://x.com' },
|
|
43
|
+
url: 'https://upload.x.com/i/media/upload.json',
|
|
44
|
+
params: {
|
|
45
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
46
|
+
command: 'FINALIZE',
|
|
47
|
+
media_id: id,
|
|
48
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @param size - The size (in bytes) of the media item to be uploaded.
|
|
54
|
+
*/
|
|
55
|
+
static initializeUpload(size) {
|
|
56
|
+
return {
|
|
57
|
+
method: 'post',
|
|
58
|
+
headers: { referer: 'https://x.com' },
|
|
59
|
+
url: 'https://upload.x.com/i/media/upload.json',
|
|
60
|
+
params: {
|
|
61
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
62
|
+
command: 'INIT',
|
|
63
|
+
total_bytes: size,
|
|
64
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.MediaRequests = MediaRequests;
|
|
70
|
+
//# sourceMapping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E;gBACP,yDAAyD;gBACzD,OAAO,EAAE,MAAM;gBACf,WAAW,EAAE,IAAI;gBACjB,wDAAwD;aACxD;SACD,CAAC;IACH,CAAC;CACD;AAxDD,sCAwDC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { ITweetFilter } from '../types/args/FetchArgs';
|
|
3
|
+
import { INewTweet } from '../types/args/PostArgs';
|
|
4
|
+
/**
|
|
5
|
+
* Collection of requests related to tweets.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare class TweetRequests {
|
|
10
|
+
/**
|
|
11
|
+
* @param ids - The IDs of the tweets whose details are to be fetched.
|
|
12
|
+
*/
|
|
13
|
+
static bulkDetails(ids: string[]): AxiosRequestConfig;
|
|
14
|
+
/**
|
|
15
|
+
* @param id - The id of the tweet whose details are to be fetched.
|
|
16
|
+
*/
|
|
17
|
+
static details(id: string): AxiosRequestConfig;
|
|
18
|
+
/**
|
|
19
|
+
* @param id - The id of the tweet to be liked.
|
|
20
|
+
*/
|
|
21
|
+
static like(id: string): AxiosRequestConfig;
|
|
22
|
+
/**
|
|
23
|
+
* @param id - The id of the tweet whose likers are to be fetched.
|
|
24
|
+
* @param count - The number of likers to fetch. Only works as a lower limit when used with a cursor.
|
|
25
|
+
* @param cursor - The cursor to the batch of likers to fetch.
|
|
26
|
+
*/
|
|
27
|
+
static likers(id: string, count?: number, cursor?: string): AxiosRequestConfig;
|
|
28
|
+
/**
|
|
29
|
+
* @param args - The configuration object for the tweet to be posted.
|
|
30
|
+
*/
|
|
31
|
+
static post(args: INewTweet): AxiosRequestConfig;
|
|
32
|
+
/**
|
|
33
|
+
* @param id - The id of the tweet whose replies are to be fetched.
|
|
34
|
+
* @param cursor - The cursor to the batch of replies to fetch.
|
|
35
|
+
*/
|
|
36
|
+
static replies(id: string, cursor?: string): AxiosRequestConfig;
|
|
37
|
+
/**
|
|
38
|
+
* @param id - The id of the tweet which is to be retweeted.
|
|
39
|
+
*/
|
|
40
|
+
static retweet(id: string): AxiosRequestConfig;
|
|
41
|
+
/**
|
|
42
|
+
* @param id - The id of the tweet whose retweeters are to be fetched.
|
|
43
|
+
* @param count - The number of retweeters to fetch. Only works as a lower limit when used with a cursor.
|
|
44
|
+
* @param cursor - The cursor to the batch of retweeters to fetch.
|
|
45
|
+
*/
|
|
46
|
+
static retweeters(id: string, count?: number, cursor?: string): AxiosRequestConfig;
|
|
47
|
+
/**
|
|
48
|
+
* @param args - The configuration object for the tweet to be posted.
|
|
49
|
+
*
|
|
50
|
+
* @remarks - Only `text` and `media.id` parameters are supported.
|
|
51
|
+
*/
|
|
52
|
+
static schedule(args: INewTweet): AxiosRequestConfig;
|
|
53
|
+
/**
|
|
54
|
+
* @param filter - The filter to use for searching tweets.
|
|
55
|
+
* @param count - The number of tweets to fetch. Only works as a lower limit when used with a cursor.
|
|
56
|
+
* @param cursor - The cursor to the batch of tweets to fetch.
|
|
57
|
+
*/
|
|
58
|
+
static search(filter: ITweetFilter, count?: number, cursor?: string): AxiosRequestConfig;
|
|
59
|
+
/**
|
|
60
|
+
* @param id - The id of the tweet to be unliked.
|
|
61
|
+
*/
|
|
62
|
+
static unlike(id: string): AxiosRequestConfig;
|
|
63
|
+
/**
|
|
64
|
+
* @param id - The id of the tweet to be unposted.
|
|
65
|
+
*/
|
|
66
|
+
static unpost(id: string): AxiosRequestConfig;
|
|
67
|
+
/**
|
|
68
|
+
* @param id - The id of the source tweet (which was retweeted), to be unretweeted.
|
|
69
|
+
*/
|
|
70
|
+
static unretweet(id: string): AxiosRequestConfig;
|
|
71
|
+
/**
|
|
72
|
+
* @param id - The id of the scheduled tweet to be unscheduled.
|
|
73
|
+
*/
|
|
74
|
+
static unschedule(id: string): AxiosRequestConfig;
|
|
75
|
+
}
|