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
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
export * from './Rettiwt';
|
|
2
|
+
export * from './enums/raw/Analytics';
|
|
3
|
+
export * from './enums/raw/Media';
|
|
4
|
+
export * from './enums/raw/Notification';
|
|
5
|
+
export * from './enums/raw/Tweet';
|
|
2
6
|
export * from './enums/Api';
|
|
7
|
+
export * from './enums/Authentication';
|
|
8
|
+
export * from './enums/Data';
|
|
3
9
|
export * from './enums/Http';
|
|
10
|
+
export * from './enums/Logging';
|
|
11
|
+
export * from './enums/Media';
|
|
12
|
+
export * from './enums/Notification';
|
|
4
13
|
export * from './enums/Resource';
|
|
5
14
|
export * from './models/args/FetchArgs';
|
|
6
15
|
export * from './models/args/PostArgs';
|
|
@@ -10,15 +19,76 @@ export * from './models/data/Notification';
|
|
|
10
19
|
export * from './models/data/Tweet';
|
|
11
20
|
export * from './models/data/User';
|
|
12
21
|
export * from './models/errors/ApiError';
|
|
13
|
-
export * from './models/errors/DataValidationError';
|
|
14
22
|
export * from './models/errors/HttpError';
|
|
15
23
|
export * from './models/errors/RettiwtError';
|
|
16
24
|
export * from './models/errors/TimeoutError';
|
|
17
|
-
export * from './
|
|
25
|
+
export * from './requests/List';
|
|
26
|
+
export * from './requests/Media';
|
|
27
|
+
export * from './requests/Tweet';
|
|
28
|
+
export * from './requests/User';
|
|
18
29
|
export * from './services/public/FetcherService';
|
|
30
|
+
export * from './services/public/ListService';
|
|
19
31
|
export * from './services/public/TweetService';
|
|
20
32
|
export * from './services/public/UserService';
|
|
21
|
-
export * from './types/
|
|
33
|
+
export * from './types/args/FetchArgs';
|
|
34
|
+
export * from './types/args/PostArgs';
|
|
35
|
+
export * from './types/auth/TidProvider';
|
|
36
|
+
export * from './types/data/CursoredData';
|
|
37
|
+
export * from './types/data/List';
|
|
38
|
+
export * from './types/data/Notification';
|
|
39
|
+
export * from './types/data/Tweet';
|
|
40
|
+
export * from './types/data/User';
|
|
41
|
+
export * from './types/params/Variables';
|
|
42
|
+
export { IAnalytics as IRawAnalytics } from './types/raw/base/Analytic';
|
|
43
|
+
export { ICursor as IRawCursor } from './types/raw/base/Cursor';
|
|
44
|
+
export { ILimitedVisibilityTweet as IRawLimitedVisibilityTweet } from './types/raw/base/LimitedVisibilityTweet';
|
|
45
|
+
export { IList as IRawList } from './types/raw/base/List';
|
|
46
|
+
export { IMedia as IRawMedia } from './types/raw/base/Media';
|
|
47
|
+
export { INotification as IRawNotification } from './types/raw/base/Notification';
|
|
48
|
+
export { ISpace as IRawSpace } from './types/raw/base/Space';
|
|
49
|
+
export { ITweet as IRawTweet } from './types/raw/base/Tweet';
|
|
50
|
+
export { IUser as IRawUser } from './types/raw/base/User';
|
|
51
|
+
export { IDataResult as IRawDataResult } from './types/raw/composite/DataResult';
|
|
52
|
+
export { ITimelineTweet as IRawTimelineTweet } from './types/raw/composite/TimelineTweet';
|
|
53
|
+
export { ITimelineUser as IRawTimelineUser } from './types/raw/composite/TimelineUser';
|
|
54
|
+
export { IError as IRawError } from './types/raw/generic/Error';
|
|
55
|
+
export { IResponse as IRawResponse } from './types/raw/generic/Response';
|
|
56
|
+
export { IListDetailsResponse as IRawListDetailsResponse } from './types/raw/list/Details';
|
|
57
|
+
export { IListMembersResponse as IRawListMembersResponse } from './types/raw/list/Members';
|
|
58
|
+
export { IListTweetsResponse as IRawListTweetsResponse } from './types/raw/list/Tweets';
|
|
59
|
+
export { IMediaFinalizeUploadResponse as IRawMediaFinalizeUploadResponse } from './types/raw/media/FinalizeUpload';
|
|
60
|
+
export { IMediaInitializeUploadResponse as IRawMediaInitializeUploadResponse } from './types/raw/media/InitalizeUpload';
|
|
61
|
+
export { IMediaLiveVideoStreamResponse as IRawMediaLiveVideoStreamResponse } from './types/raw/media/LiveVideoStream';
|
|
62
|
+
export { ITweetDetailsResponse as IRawTweetDetailsResponse } from './types/raw/tweet/Details';
|
|
63
|
+
export { ITweetLikeResponse as IRawTweetLikeResponse } from './types/raw/tweet/Like';
|
|
64
|
+
export { ITweetLikersResponse as IRawTweetLikersResponse } from './types/raw/tweet/Likers';
|
|
65
|
+
export { ITweetPostResponse as IRawTweetPostResponse } from './types/raw/tweet/Post';
|
|
66
|
+
export { ITweetRepliesResponse as IRawTweetRepliesResponse } from './types/raw/tweet/Replies';
|
|
67
|
+
export { ITweetRetweetResponse as IRawTweetRetweetResponse } from './types/raw/tweet/Retweet';
|
|
68
|
+
export { ITweetRetweetersResponse as IRawTweetRetweetersResponse } from './types/raw/tweet/Retweeters';
|
|
69
|
+
export { ITweetScheduleResponse as IRawTweetScheduleResponse } from './types/raw/tweet/Schedule';
|
|
70
|
+
export { ITweetSearchResponse as IRawTweetSearchResponse } from './types/raw/tweet/Search';
|
|
71
|
+
export { ITweetUnlikeResponse as IRawTweetUnlikeResponse } from './types/raw/tweet/Unlike';
|
|
72
|
+
export { ITweetUnpostResponse as IRawTweetUnpostResponse } from './types/raw/tweet/Unpost';
|
|
73
|
+
export { ITweetUnretweetResponse as IRawTweetUnretweetResponse } from './types/raw/tweet/Unretweet';
|
|
74
|
+
export { ITweetUnscheduleResponse as ITRawTweetUnscheduleResponse } from './types/raw/tweet/Unschedule';
|
|
75
|
+
export { IUserAffiliatesResponse as IRawUserAffiliatesResponse } from './types/raw/user/Affiliates';
|
|
76
|
+
export { IUserAnalyticsResponse as IRawUserAnalyticsResponse } from './types/raw/user/Analytics';
|
|
77
|
+
export { IUserBookmarksResponse as IRawUserBookmarksResponse } from './types/raw/user/Bookmarks';
|
|
78
|
+
export { IUserDetailsResponse as IRawUserDetailsResponse } from './types/raw/user/Details';
|
|
79
|
+
export { IUserFollowResponse as IRawUserFollowResponse } from './types/raw/user/Follow';
|
|
80
|
+
export { IUserFollowedResponse as IRawUserFollowedResponse } from './types/raw/user/Followed';
|
|
81
|
+
export { IUserFollowersResponse as IRawUserFollowersResponse } from './types/raw/user/Followers';
|
|
82
|
+
export { IUserFollowingResponse as IRawUserFollowingResponse } from './types/raw/user/Following';
|
|
83
|
+
export { IUserHighlightsResponse as IRawUserHighlightsResponse } from './types/raw/user/Highlights';
|
|
84
|
+
export { IUserLikesResponse as IRawUserLikesResponse } from './types/raw/user/Likes';
|
|
85
|
+
export { IUserMediaResponse as IRawUserMediaResponse } from './types/raw/user/Media';
|
|
86
|
+
export { IUserNotificationsResponse as IRawUserNotificationsResponse } from './types/raw/user/Notifications';
|
|
87
|
+
export { IUserRecommendedResponse as IRawUserRecommendedResponse } from './types/raw/user/Recommended';
|
|
88
|
+
export { IUserScheduledResponse as IRawUserScheduledResponse } from './types/raw/user/Scheduled';
|
|
89
|
+
export { IUserSubscriptionsResponse as IRawUserSubscriptionsResponse } from './types/raw/user/Subscriptions';
|
|
90
|
+
export { IUserTweetsResponse as IRawUserTweetsResponse } from './types/raw/user/Tweets';
|
|
91
|
+
export { IUserTweetsAndRepliesResponse as IRawUserTweetsAndRepliesResponse } from './types/raw/user/TweetsAndReplies';
|
|
92
|
+
export { IUserUnfollowResponse as IRawUserUnfollowResponse } from './types/raw/user/Unfollow';
|
|
22
93
|
export * from './types/ErrorHandler';
|
|
23
|
-
export
|
|
24
|
-
export { IUserBookmarksResponse, IUserDetailsResponse, IUserFollowedResponse, IUserFollowersResponse, IUserFollowingResponse, IUserFollowResponse, IUserHighlightsResponse, IUserLikesResponse, IUserMediaResponse, IUserNotificationsResponse, IUserRecommendedResponse, IUserSubscriptionsResponse, IUserTweetsAndRepliesResponse, IUserTweetsResponse, IUserUnfollowResponse, } from 'rettiwt-core';
|
|
94
|
+
export * from './types/RettiwtConfig';
|
package/dist/index.js
CHANGED
|
@@ -17,30 +17,50 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
// MAIN
|
|
18
18
|
__exportStar(require("./Rettiwt"), exports);
|
|
19
19
|
// ENUMS
|
|
20
|
+
__exportStar(require("./enums/raw/Analytics"), exports);
|
|
21
|
+
__exportStar(require("./enums/raw/Media"), exports);
|
|
22
|
+
__exportStar(require("./enums/raw/Notification"), exports);
|
|
23
|
+
__exportStar(require("./enums/raw/Tweet"), exports);
|
|
20
24
|
__exportStar(require("./enums/Api"), exports);
|
|
25
|
+
__exportStar(require("./enums/Authentication"), exports);
|
|
26
|
+
__exportStar(require("./enums/Data"), exports);
|
|
21
27
|
__exportStar(require("./enums/Http"), exports);
|
|
28
|
+
__exportStar(require("./enums/Logging"), exports);
|
|
29
|
+
__exportStar(require("./enums/Media"), exports);
|
|
30
|
+
__exportStar(require("./enums/Notification"), exports);
|
|
22
31
|
__exportStar(require("./enums/Resource"), exports);
|
|
23
|
-
//
|
|
32
|
+
// MODELS
|
|
24
33
|
__exportStar(require("./models/args/FetchArgs"), exports);
|
|
25
34
|
__exportStar(require("./models/args/PostArgs"), exports);
|
|
26
|
-
// DATA MODELS
|
|
27
35
|
__exportStar(require("./models/data/CursoredData"), exports);
|
|
28
36
|
__exportStar(require("./models/data/List"), exports);
|
|
29
37
|
__exportStar(require("./models/data/Notification"), exports);
|
|
30
38
|
__exportStar(require("./models/data/Tweet"), exports);
|
|
31
39
|
__exportStar(require("./models/data/User"), exports);
|
|
32
|
-
// ERROR MODELS
|
|
33
40
|
__exportStar(require("./models/errors/ApiError"), exports);
|
|
34
|
-
__exportStar(require("./models/errors/DataValidationError"), exports);
|
|
35
41
|
__exportStar(require("./models/errors/HttpError"), exports);
|
|
36
42
|
__exportStar(require("./models/errors/RettiwtError"), exports);
|
|
37
43
|
__exportStar(require("./models/errors/TimeoutError"), exports);
|
|
44
|
+
// REQUESTS
|
|
45
|
+
__exportStar(require("./requests/List"), exports);
|
|
46
|
+
__exportStar(require("./requests/Media"), exports);
|
|
47
|
+
__exportStar(require("./requests/Tweet"), exports);
|
|
48
|
+
__exportStar(require("./requests/User"), exports);
|
|
38
49
|
// SERVICES
|
|
39
|
-
__exportStar(require("./services/public/AuthService"), exports);
|
|
40
50
|
__exportStar(require("./services/public/FetcherService"), exports);
|
|
51
|
+
__exportStar(require("./services/public/ListService"), exports);
|
|
41
52
|
__exportStar(require("./services/public/TweetService"), exports);
|
|
42
53
|
__exportStar(require("./services/public/UserService"), exports);
|
|
43
54
|
// TYPES
|
|
44
|
-
__exportStar(require("./types/
|
|
55
|
+
__exportStar(require("./types/args/FetchArgs"), exports);
|
|
56
|
+
__exportStar(require("./types/args/PostArgs"), exports);
|
|
57
|
+
__exportStar(require("./types/auth/TidProvider"), exports);
|
|
58
|
+
__exportStar(require("./types/data/CursoredData"), exports);
|
|
59
|
+
__exportStar(require("./types/data/List"), exports);
|
|
60
|
+
__exportStar(require("./types/data/Notification"), exports);
|
|
61
|
+
__exportStar(require("./types/data/Tweet"), exports);
|
|
62
|
+
__exportStar(require("./types/data/User"), exports);
|
|
63
|
+
__exportStar(require("./types/params/Variables"), exports);
|
|
45
64
|
__exportStar(require("./types/ErrorHandler"), exports);
|
|
65
|
+
__exportStar(require("./types/RettiwtConfig"), exports);
|
|
46
66
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,4CAA0B;AAE1B,QAAQ;AACR,8CAA4B;AAC5B,+CAA6B;AAC7B,mDAAiC;AAEjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,4CAA0B;AAE1B,QAAQ;AACR,wDAAsC;AACtC,oDAAkC;AAClC,2DAAyC;AACzC,oDAAkC;AAClC,8CAA4B;AAC5B,yDAAuC;AACvC,+CAA6B;AAC7B,+CAA6B;AAC7B,kDAAgC;AAChC,gDAA8B;AAC9B,uDAAqC;AACrC,mDAAiC;AAEjC,SAAS;AACT,0DAAwC;AACxC,yDAAuC;AACvC,6DAA2C;AAC3C,qDAAmC;AACnC,6DAA2C;AAC3C,sDAAoC;AACpC,qDAAmC;AACnC,2DAAyC;AACzC,4DAA0C;AAC1C,+DAA6C;AAC7C,+DAA6C;AAE7C,WAAW;AACX,kDAAgC;AAChC,mDAAiC;AACjC,mDAAiC;AACjC,kDAAgC;AAEhC,WAAW;AACX,mEAAiD;AACjD,gEAA8C;AAC9C,iEAA+C;AAC/C,gEAA8C;AAE9C,QAAQ;AACR,yDAAuC;AACvC,wDAAsC;AACtC,2DAAyC;AACzC,4DAA0C;AAC1C,oDAAkC;AAClC,4DAA0C;AAC1C,qDAAmC;AACnC,oDAAkC;AAClC,2DAAyC;AAoDzC,uDAAqC;AACrC,wDAAsC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Agent } from 'https';
|
|
2
|
+
import { ITidProvider } from '../types/auth/TidProvider';
|
|
3
|
+
import { IErrorHandler } from '../types/ErrorHandler';
|
|
4
|
+
import { IRettiwtConfig } from '../types/RettiwtConfig';
|
|
5
|
+
export declare class RettiwtConfig implements IRettiwtConfig {
|
|
6
|
+
private _apiKey?;
|
|
7
|
+
private _httpsAgent;
|
|
8
|
+
private _userId;
|
|
9
|
+
readonly delay?: number | (() => number | Promise<number>);
|
|
10
|
+
readonly errorHandler?: IErrorHandler;
|
|
11
|
+
readonly logging?: boolean;
|
|
12
|
+
readonly tidProvider?: ITidProvider;
|
|
13
|
+
readonly timeout?: number;
|
|
14
|
+
headers?: {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @param config - The config for Rettiwt of type {@link IRettiwtConfig}.
|
|
19
|
+
*/
|
|
20
|
+
constructor(config?: IRettiwtConfig);
|
|
21
|
+
get apiKey(): string | undefined;
|
|
22
|
+
/** The HTTPS agent instance to use. */
|
|
23
|
+
get httpsAgent(): Agent;
|
|
24
|
+
/** The ID of the user associated with the API key, if any. */
|
|
25
|
+
get userId(): string | undefined;
|
|
26
|
+
set apiKey(apiKey: string | undefined);
|
|
27
|
+
set proxyUrl(proxyUrl: URL | undefined);
|
|
28
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RettiwtConfig = void 0;
|
|
4
|
+
const https_1 = require("https");
|
|
5
|
+
const https_proxy_agent_1 = require("https-proxy-agent");
|
|
6
|
+
const AuthService_1 = require("../services/internal/AuthService");
|
|
7
|
+
class RettiwtConfig {
|
|
8
|
+
// Parameters for internal use
|
|
9
|
+
_apiKey;
|
|
10
|
+
_httpsAgent;
|
|
11
|
+
_userId;
|
|
12
|
+
// Parameters that can be set once, upon initialization
|
|
13
|
+
delay;
|
|
14
|
+
errorHandler;
|
|
15
|
+
logging;
|
|
16
|
+
tidProvider;
|
|
17
|
+
timeout;
|
|
18
|
+
// Parameters that can be changed on the fly
|
|
19
|
+
headers;
|
|
20
|
+
/**
|
|
21
|
+
* @param config - The config for Rettiwt of type {@link IRettiwtConfig}.
|
|
22
|
+
*/
|
|
23
|
+
constructor(config) {
|
|
24
|
+
this._apiKey = config?.apiKey;
|
|
25
|
+
this._httpsAgent = config?.proxyUrl ? new https_proxy_agent_1.HttpsProxyAgent(config?.proxyUrl) : new https_1.Agent();
|
|
26
|
+
this._userId = config?.apiKey ? AuthService_1.AuthService.getUserId(config?.apiKey) : undefined;
|
|
27
|
+
this.delay = config?.delay;
|
|
28
|
+
this.errorHandler = config?.errorHandler;
|
|
29
|
+
this.logging = config?.logging;
|
|
30
|
+
this.tidProvider = config?.tidProvider;
|
|
31
|
+
this.timeout = config?.timeout;
|
|
32
|
+
this.apiKey = config?.apiKey;
|
|
33
|
+
this.headers = config?.headers;
|
|
34
|
+
}
|
|
35
|
+
get apiKey() {
|
|
36
|
+
return this._apiKey;
|
|
37
|
+
}
|
|
38
|
+
/** The HTTPS agent instance to use. */
|
|
39
|
+
get httpsAgent() {
|
|
40
|
+
return this._httpsAgent;
|
|
41
|
+
}
|
|
42
|
+
/** The ID of the user associated with the API key, if any. */
|
|
43
|
+
get userId() {
|
|
44
|
+
return this._userId;
|
|
45
|
+
}
|
|
46
|
+
set apiKey(apiKey) {
|
|
47
|
+
this._apiKey = apiKey;
|
|
48
|
+
this._userId = apiKey ? AuthService_1.AuthService.getUserId(apiKey) : undefined;
|
|
49
|
+
}
|
|
50
|
+
set proxyUrl(proxyUrl) {
|
|
51
|
+
this._httpsAgent = proxyUrl ? new https_proxy_agent_1.HttpsProxyAgent(proxyUrl) : new https_1.Agent();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.RettiwtConfig = RettiwtConfig;
|
|
55
|
+
//# sourceMappingURL=RettiwtConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RettiwtConfig.js","sourceRoot":"","sources":["../../src/models/RettiwtConfig.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAE9B,yDAAoD;AAEpD,kEAA+D;AAK/D,MAAa,aAAa;IACzB,8BAA8B;IACtB,OAAO,CAAU;IACjB,WAAW,CAAQ;IACnB,OAAO,CAAqB;IAEpC,uDAAuD;IACvC,KAAK,CAA6C;IAClD,YAAY,CAAiB;IAC7B,OAAO,CAAW;IAClB,WAAW,CAAgB;IAC3B,OAAO,CAAU;IAEjC,4CAA4C;IACrC,OAAO,CAA6B;IAE3C;;OAEG;IACH,YAAmB,MAAuB;QACzC,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,MAAM,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,mCAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,aAAK,EAAE,CAAC;QAC1F,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,yBAAW,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAClF,IAAI,CAAC,KAAK,GAAG,MAAM,EAAE,KAAK,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,MAAM,EAAE,YAAY,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,OAAO,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,MAAM,EAAE,WAAW,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,OAAO,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,OAAO,CAAC;IAChC,CAAC;IAED,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAED,uCAAuC;IACvC,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;IAED,8DAA8D;IAC9D,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAED,IAAW,MAAM,CAAC,MAA0B;QAC3C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,yBAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,CAAC;IAED,IAAW,QAAQ,CAAC,QAAyB;QAC5C,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,mCAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,aAAK,EAAE,CAAC;IAC3E,CAAC;CACD;AAtDD,sCAsDC"}
|
|
@@ -1,149 +1,63 @@
|
|
|
1
|
-
import { ESearchResultType, TweetFilter as TweetFilterCore } from 'rettiwt-core';
|
|
2
1
|
import { EResourceType } from '../../enums/Resource';
|
|
2
|
+
import { IFetchArgs, ITweetFilter } from '../../types/args/FetchArgs';
|
|
3
3
|
/**
|
|
4
4
|
* Options specifying the data that is to be fetched.
|
|
5
5
|
*
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
export declare class FetchArgs {
|
|
9
|
-
/**
|
|
10
|
-
* The number of data items to fetch.
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* - Works only for cursored resources.
|
|
14
|
-
* - Must be \<= 20 for:
|
|
15
|
-
* - {@link EResourceType.USER_TIMELINE}
|
|
16
|
-
* - {@link EResourceType.USER_TIMELINE}
|
|
17
|
-
* - {@link EResourceType.USER_TIMELINE_AND_REPLIES}
|
|
18
|
-
* - Must be \<= 100 for all other cursored resources.
|
|
19
|
-
* - Due a bug on Twitter's end, count does not work for {@link EResourceType.USER_FOLLOWERS} and {@link EResourceType.USER_FOLLOWING}.
|
|
20
|
-
* - Has not effect for:
|
|
21
|
-
* - {@link EResourceType.USER_FEED_FOLLOWED}
|
|
22
|
-
* - {@link EResourceType.USER_FEED_RECOMMENDED}
|
|
23
|
-
*/
|
|
8
|
+
export declare class FetchArgs implements IFetchArgs {
|
|
24
9
|
count?: number;
|
|
25
|
-
/**
|
|
26
|
-
* The cursor to the batch of data to fetch.
|
|
27
|
-
*
|
|
28
|
-
* @remarks
|
|
29
|
-
* - May be used for cursored resources.
|
|
30
|
-
* - Has no effect for other resources.
|
|
31
|
-
*/
|
|
32
10
|
cursor?: string;
|
|
33
|
-
/**
|
|
34
|
-
* The filter for searching tweets.
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* Required when searching for tweets using {@link EResourceType.TWEET_SEARCH}.
|
|
38
|
-
*/
|
|
39
11
|
filter?: TweetFilter;
|
|
40
|
-
/**
|
|
41
|
-
* The id of the target resource.
|
|
42
|
-
*
|
|
43
|
-
* @remarks
|
|
44
|
-
* - Required for all resources except {@link EResourceType.TWEET_SEARCH} and {@link EResourceType.USER_TIMELINE_RECOMMENDED}.
|
|
45
|
-
* - For {@link EResourceType.USER_DETAILS_BY_USERNAME}, can be alphanumeric, while for others, is strictly numeric.
|
|
46
|
-
*/
|
|
47
12
|
id?: string;
|
|
48
|
-
|
|
49
|
-
* The type of search results to fetch. Can be one of:
|
|
50
|
-
* - {@link EResourceType.LATEST}, for latest search results.
|
|
51
|
-
* - {@link EResourceType.TOP}, for top search results.
|
|
52
|
-
*
|
|
53
|
-
* @defaultValue {@link ESearchResultType.LATEST}.
|
|
54
|
-
*
|
|
55
|
-
* @remarks
|
|
56
|
-
* - Applicable only for {@link EResourceType.TWEET_SEARCH}.
|
|
57
|
-
*/
|
|
58
|
-
results?: ESearchResultType;
|
|
13
|
+
ids?: string[];
|
|
59
14
|
/**
|
|
60
15
|
* @param resource - The resource to be fetched.
|
|
61
16
|
* @param args - Additional user-defined arguments for fetching the resource.
|
|
62
17
|
*/
|
|
63
|
-
constructor(resource: EResourceType, args:
|
|
18
|
+
constructor(resource: EResourceType, args: IFetchArgs);
|
|
64
19
|
}
|
|
65
20
|
/**
|
|
66
21
|
* The filter to be used for searching tweets.
|
|
67
22
|
*
|
|
68
23
|
* @public
|
|
69
24
|
*/
|
|
70
|
-
export declare class TweetFilter
|
|
71
|
-
/** The date upto which tweets are to be searched. */
|
|
25
|
+
export declare class TweetFilter implements ITweetFilter {
|
|
72
26
|
endDate?: Date;
|
|
73
|
-
/** The list of words to exclude from search. */
|
|
74
27
|
excludeWords?: string[];
|
|
75
|
-
/**
|
|
76
|
-
* The list of usernames whose tweets are to be searched.
|
|
77
|
-
*
|
|
78
|
-
* @remarks
|
|
79
|
-
* '\@' must be excluded from the username!
|
|
80
|
-
*/
|
|
81
28
|
fromUsers?: string[];
|
|
82
|
-
/**
|
|
83
|
-
* The list of hashtags to search.
|
|
84
|
-
*
|
|
85
|
-
* @remarks
|
|
86
|
-
* '#' must be excluded from the hashtag!
|
|
87
|
-
*/
|
|
88
29
|
hashtags?: string[];
|
|
89
|
-
/** The exact phrase to search. */
|
|
90
30
|
includePhrase?: string;
|
|
91
|
-
/** The list of words to search. */
|
|
92
31
|
includeWords?: string[];
|
|
93
|
-
/** The language of the tweets to search. */
|
|
94
32
|
language?: string;
|
|
95
|
-
/**
|
|
96
|
-
* Whether to fetch tweets that are links or not.
|
|
97
|
-
*
|
|
98
|
-
* @defaultValue true
|
|
99
|
-
*/
|
|
100
33
|
links?: boolean;
|
|
101
|
-
/** The list from which tweets are to be searched. */
|
|
102
34
|
list?: string;
|
|
103
|
-
/** The id of the tweet, before which the tweets are to be searched. */
|
|
104
35
|
maxId?: string;
|
|
105
|
-
/**
|
|
106
|
-
* The list of username mentioned in the tweets to search.
|
|
107
|
-
*
|
|
108
|
-
* @remarks
|
|
109
|
-
* '\@' must be excluded from the username!
|
|
110
|
-
*/
|
|
111
36
|
mentions?: string[];
|
|
112
|
-
/** The minimun number of likes to search by. */
|
|
113
37
|
minLikes?: number;
|
|
114
|
-
/** The minimum number of replies to search by. */
|
|
115
38
|
minReplies?: number;
|
|
116
|
-
/** The minimum number of retweets to search by. */
|
|
117
39
|
minRetweets?: number;
|
|
118
|
-
/** The optional words to search. */
|
|
119
40
|
optionalWords?: string[];
|
|
120
|
-
/** The id of the tweet which is quoted in the tweets to search. */
|
|
121
41
|
quoted?: string;
|
|
122
|
-
/**
|
|
123
|
-
* Whether to fetch tweets that are replies or not.
|
|
124
|
-
*
|
|
125
|
-
* @defaultValue true
|
|
126
|
-
*/
|
|
127
42
|
replies?: boolean;
|
|
128
|
-
/** The id of the tweet, after which the tweets are to be searched. */
|
|
129
43
|
sinceId?: string;
|
|
130
|
-
/** The date starting from which tweets are to be searched. */
|
|
131
44
|
startDate?: Date;
|
|
45
|
+
toUsers?: string[];
|
|
46
|
+
top?: boolean;
|
|
132
47
|
/**
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* @remarks
|
|
136
|
-
* '\@' must be excluded from the username!
|
|
48
|
+
* @param filter - The filter configuration.
|
|
137
49
|
*/
|
|
138
|
-
|
|
50
|
+
constructor(filter: ITweetFilter);
|
|
139
51
|
/**
|
|
140
|
-
*
|
|
52
|
+
* Convert Date object to Twitter string representation.
|
|
53
|
+
* eg - 2023-06-23_11:21:06_UTC
|
|
141
54
|
*
|
|
142
|
-
* @
|
|
55
|
+
* @param date - The date object to convert.
|
|
56
|
+
* @returns The Twitter string representation of the date.
|
|
143
57
|
*/
|
|
144
|
-
|
|
58
|
+
private static dateToTwitterString;
|
|
145
59
|
/**
|
|
146
|
-
* @
|
|
60
|
+
* @returns The string representation of 'this' filter.
|
|
147
61
|
*/
|
|
148
|
-
|
|
62
|
+
toString(): string;
|
|
149
63
|
}
|