rettiwt-api 1.1.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-docs.yml +22 -21
- package/.github/workflows/publish-to-npm.yml +29 -0
- package/README.md +52 -40
- package/dist/config/env.d.ts +5 -5
- package/dist/config/env.js +8 -8
- package/dist/enums/Errors.d.ts +21 -20
- package/dist/enums/Errors.js +28 -27
- package/dist/enums/Errors.js.map +1 -1
- package/dist/enums/HTTP.d.ts +17 -17
- package/dist/enums/HTTP.js +22 -22
- package/dist/graphql/enums/Errors.d.ts +21 -21
- package/dist/graphql/enums/Errors.js +28 -28
- package/dist/graphql/queries/RootQuery.d.ts +4 -4
- package/dist/graphql/queries/RootQuery.js +77 -77
- package/dist/graphql/queries/RootQuery.js.map +1 -1
- package/dist/graphql/resolvers/AccountResolver.d.ts +12 -12
- package/dist/graphql/resolvers/AccountResolver.js +83 -83
- package/dist/graphql/resolvers/ResolverBase.d.ts +16 -16
- package/dist/graphql/resolvers/ResolverBase.js +22 -22
- package/dist/graphql/resolvers/TweetResolver.d.ts +46 -46
- package/dist/graphql/resolvers/TweetResolver.js +311 -311
- package/dist/graphql/resolvers/TweetResolver.js.map +1 -1
- package/dist/graphql/resolvers/UserResolver.d.ts +48 -48
- package/dist/graphql/resolvers/UserResolver.js +333 -333
- package/dist/graphql/resolvers/UserResolver.js.map +1 -1
- package/dist/graphql/types/Global.d.ts +4 -4
- package/dist/graphql/types/Global.js +12 -12
- package/dist/graphql/types/TweetTypes.d.ts +4 -4
- package/dist/graphql/types/TweetTypes.js +159 -159
- package/dist/graphql/types/UserTypes.d.ts +3 -3
- package/dist/graphql/types/UserTypes.js +136 -136
- package/dist/graphql/types/UserTypes.js.map +1 -1
- package/dist/index.d.ts +45 -43
- package/dist/index.js +72 -70
- package/dist/index.js.map +1 -1
- package/dist/models/args/TweetListArgs.d.ts +21 -21
- package/dist/models/args/TweetListArgs.js +53 -53
- package/dist/models/args/TweetListArgs.js.map +1 -1
- package/dist/models/args/UserListArgs.d.ts +21 -21
- package/dist/models/args/UserListArgs.js +53 -53
- package/dist/models/args/UserListArgs.js.map +1 -1
- package/dist/models/auth/AuthCookie.d.ts +21 -21
- package/dist/models/auth/AuthCookie.js +32 -32
- package/dist/models/data/CursoredData.d.ts +34 -34
- package/dist/models/data/CursoredData.js +41 -41
- package/dist/models/data/Tweet.d.ts +53 -53
- package/dist/models/data/Tweet.js +103 -103
- package/dist/models/data/Tweet.js.map +1 -1
- package/dist/models/data/User.d.ts +41 -41
- package/dist/models/data/User.js +31 -31
- package/dist/models/data/User.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +75 -75
- package/dist/services/auth/AccountService.d.ts +83 -83
- package/dist/services/auth/AccountService.js +411 -411
- package/dist/services/auth/AuthService.d.ts +31 -31
- package/dist/services/auth/AuthService.js +117 -117
- package/dist/services/data/TweetService.d.ts +60 -74
- package/dist/services/data/TweetService.js +250 -254
- package/dist/services/data/TweetService.js.map +1 -1
- package/dist/services/data/UserService.d.ts +71 -87
- package/dist/services/data/UserService.js +277 -296
- package/dist/services/data/UserService.js.map +1 -1
- package/dist/services/helper/Headers.d.ts +19 -19
- package/dist/services/helper/Headers.js +61 -61
- package/dist/services/helper/Headers.js.map +1 -1
- package/dist/services/helper/Parser.d.ts +22 -28
- package/dist/services/helper/Parser.js +83 -104
- package/dist/services/helper/Parser.js.map +1 -1
- package/dist/services/helper/extractors/Tweets.d.ts +23 -32
- package/dist/services/helper/extractors/Tweets.js +199 -263
- package/dist/services/helper/extractors/Tweets.js.map +1 -1
- package/dist/services/helper/extractors/Users.d.ts +17 -26
- package/dist/services/helper/extractors/Users.js +150 -202
- package/dist/services/helper/extractors/Users.js.map +1 -1
- package/dist/services/helper/payloads/LoginFlows.d.ts +77 -77
- package/dist/services/helper/payloads/LoginFlows.js +91 -91
- package/dist/services/helper/urls/Authentication.d.ts +4 -4
- package/dist/services/helper/urls/Authentication.js +10 -10
- package/dist/services/util/CacheService.d.ts +33 -33
- package/dist/services/util/CacheService.js +95 -95
- package/dist/services/util/FetcherService.d.ts +65 -65
- package/dist/services/util/FetcherService.js +201 -213
- package/dist/services/util/FetcherService.js.map +1 -1
- package/dist/types/Args.d.ts +11 -38
- package/dist/types/Args.js +3 -4
- package/dist/types/Args.js.map +1 -1
- package/dist/types/Authentication.d.ts +55 -55
- package/dist/types/Authentication.js +5 -5
- package/dist/types/Resolvers.d.ts +15 -15
- package/dist/types/Resolvers.js +2 -2
- package/dist/types/Rettiwt.d.ts +16 -16
- package/dist/types/Rettiwt.js +2 -2
- package/dist/types/Service.d.ts +22 -22
- package/dist/types/Service.js +4 -4
- package/dist/types/Tweet.d.ts +46 -46
- package/dist/types/Tweet.js +2 -2
- package/dist/types/User.d.ts +35 -35
- package/dist/types/User.js +2 -2
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +64 -0
- package/docs/assets/main.js +58 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1280 -0
- package/docs/classes/AccountService.html +286 -0
- package/docs/classes/AuthCookie.html +146 -0
- package/docs/classes/AuthService.html +147 -0
- package/docs/classes/CacheService.html +157 -0
- package/docs/classes/Cursor.html +102 -0
- package/docs/classes/CursoredData.html +126 -0
- package/docs/classes/DataValidationError.html +120 -0
- package/docs/classes/FetcherService.html +225 -0
- package/docs/classes/Tweet.html +210 -0
- package/docs/classes/TweetEntities.html +128 -0
- package/docs/classes/TweetFilter.html +223 -0
- package/docs/classes/TweetListArgs.html +118 -0
- package/docs/classes/TweetService.html +319 -0
- package/docs/classes/User.html +230 -0
- package/docs/classes/UserListArgs.html +118 -0
- package/docs/classes/UserService.html +355 -0
- package/docs/enums/HttpMethods.html +74 -0
- package/docs/functions/Rettiwt.html +100 -0
- package/docs/index.html +159 -0
- package/docs/interfaces/IAuthCookie.html +104 -0
- package/docs/interfaces/ICursor.html +77 -0
- package/docs/interfaces/ICursoredData.html +93 -0
- package/docs/interfaces/IDataContext.html +91 -0
- package/docs/interfaces/IDataValidationError.html +109 -0
- package/docs/interfaces/IListArgs.html +87 -0
- package/docs/interfaces/ITweet.html +176 -0
- package/docs/interfaces/ITweetEntities.html +104 -0
- package/docs/interfaces/ITweetFilter.html +158 -0
- package/docs/interfaces/IUser.html +194 -0
- package/docs/modules.html +111 -0
- package/package.json +4 -3
- package/src/enums/Errors.ts +2 -1
- package/src/graphql/queries/RootQuery.ts +1 -1
- package/src/graphql/resolvers/TweetResolver.ts +12 -59
- package/src/graphql/resolvers/UserResolver.ts +4 -4
- package/src/graphql/types/UserTypes.ts +2 -2
- package/src/index.ts +5 -3
- package/src/models/args/TweetListArgs.ts +2 -2
- package/src/models/args/UserListArgs.ts +1 -1
- package/src/models/data/Tweet.ts +3 -3
- package/src/models/data/User.ts +2 -2
- package/src/services/data/TweetService.ts +45 -72
- package/src/services/data/UserService.ts +61 -71
- package/src/services/helper/Headers.ts +34 -34
- package/src/services/helper/Parser.ts +5 -26
- package/src/services/helper/extractors/Tweets.ts +35 -97
- package/src/services/helper/extractors/Users.ts +11 -62
- package/src/services/util/FetcherService.ts +15 -22
- package/src/types/Args.ts +0 -37
- package/Dockerfile +0 -9
- package/dist/Test.d.ts +0 -0
- package/dist/Test.js +0 -2
- package/dist/Test.js.map +0 -1
- package/dist/endpoints/Endpoints.d.ts +0 -14
- package/dist/endpoints/Endpoints.js +0 -20
- package/dist/endpoints/Endpoints.js.map +0 -1
- package/dist/endpoints/Url.d.ts +0 -5
- package/dist/endpoints/Url.js +0 -12
- package/dist/endpoints/Url.js.map +0 -1
- package/dist/enums/Endpoints.d.ts +0 -25
- package/dist/enums/Endpoints.js +0 -31
- package/dist/enums/Endpoints.js.map +0 -1
- package/dist/graphql/types/Errors.d.ts +0 -20
- package/dist/graphql/types/Errors.js +0 -28
- package/dist/graphql/types/Errors.js.map +0 -1
- package/dist/middlewares/Authentication.d.ts +0 -0
- package/dist/middlewares/Authentication.js +0 -2
- package/dist/middlewares/Authentication.js.map +0 -1
- package/dist/models/args/TweetFilter.d.ts +0 -59
- package/dist/models/args/TweetFilter.js +0 -101
- package/dist/models/args/TweetFilter.js.map +0 -1
- package/dist/models/data/DataValidationError.d.ts +0 -18
- package/dist/models/data/DataValidationError.js +0 -21
- package/dist/models/data/DataValidationError.js.map +0 -1
- package/dist/models/data/Errors.d.ts +0 -18
- package/dist/models/data/Errors.js +0 -21
- package/dist/models/data/Errors.js.map +0 -1
- package/dist/models/data/Service.d.ts +0 -33
- package/dist/models/data/Service.js +0 -41
- package/dist/models/data/Service.js.map +0 -1
- package/dist/models/errors/DataValidationError.d.ts +0 -20
- package/dist/models/errors/DataValidationError.js +0 -23
- package/dist/models/errors/DataValidationError.js.map +0 -1
- package/dist/models/graphql/Global.d.ts +0 -4
- package/dist/models/graphql/Global.js +0 -13
- package/dist/models/graphql/Global.js.map +0 -1
- package/dist/models/graphql/TweetTypes.d.ts +0 -6
- package/dist/models/graphql/TweetTypes.js +0 -156
- package/dist/models/graphql/TweetTypes.js.map +0 -1
- package/dist/models/graphql/UserTypes.d.ts +0 -3
- package/dist/models/graphql/UserTypes.js +0 -139
- package/dist/models/graphql/UserTypes.js.map +0 -1
- package/dist/models/query/Variables.d.ts +0 -2
- package/dist/models/query/Variables.js +0 -10
- package/dist/models/query/Variables.js.map +0 -1
- package/dist/queries/RootQuery.d.ts +0 -4
- package/dist/queries/RootQuery.js +0 -70
- package/dist/queries/RootQuery.js.map +0 -1
- package/dist/requests/Url.d.ts +0 -5
- package/dist/requests/Url.js +0 -12
- package/dist/requests/Url.js.map +0 -1
- package/dist/requests/payloads/Variables.d.ts +0 -23
- package/dist/requests/payloads/Variables.js +0 -24
- package/dist/requests/payloads/Variables.js.map +0 -1
- package/dist/resolvers/AccountResolver.d.ts +0 -12
- package/dist/resolvers/AccountResolver.js +0 -84
- package/dist/resolvers/AccountResolver.js.map +0 -1
- package/dist/resolvers/ResolverBase.d.ts +0 -5
- package/dist/resolvers/ResolverBase.js +0 -11
- package/dist/resolvers/ResolverBase.js.map +0 -1
- package/dist/resolvers/TweetResolver.d.ts +0 -54
- package/dist/resolvers/TweetResolver.js +0 -332
- package/dist/resolvers/TweetResolver.js.map +0 -1
- package/dist/resolvers/UserResolver.d.ts +0 -38
- package/dist/resolvers/UserResolver.js +0 -253
- package/dist/resolvers/UserResolver.js.map +0 -1
- package/dist/services/AuthService.d.ts +0 -22
- package/dist/services/AuthService.js +0 -106
- package/dist/services/AuthService.js.map +0 -1
- package/dist/services/CacheService.d.ts +0 -30
- package/dist/services/CacheService.js +0 -93
- package/dist/services/CacheService.js.map +0 -1
- package/dist/services/FetcherService.d.ts +0 -61
- package/dist/services/FetcherService.js +0 -209
- package/dist/services/FetcherService.js.map +0 -1
- package/dist/services/accounts/AccountService.d.ts +0 -65
- package/dist/services/accounts/AccountService.js +0 -336
- package/dist/services/accounts/AccountService.js.map +0 -1
- package/dist/services/accounts/LoginFlows.d.ts +0 -77
- package/dist/services/accounts/LoginFlows.js +0 -92
- package/dist/services/accounts/LoginFlows.js.map +0 -1
- package/dist/services/auth/LoginFlows.d.ts +0 -77
- package/dist/services/auth/LoginFlows.js +0 -92
- package/dist/services/auth/LoginFlows.js.map +0 -1
- package/dist/services/data/TrendService.d.ts +0 -17
- package/dist/services/data/TrendService.js +0 -116
- package/dist/services/data/TrendService.js.map +0 -1
- package/dist/services/data/UserAccountService.d.ts +0 -42
- package/dist/services/data/UserAccountService.js +0 -239
- package/dist/services/data/UserAccountService.js.map +0 -1
- package/dist/services/helper/Deserializers.d.ts +0 -19
- package/dist/services/helper/Deserializers.js +0 -115
- package/dist/services/helper/Deserializers.js.map +0 -1
- package/dist/services/helper/Extractors.d.ts +0 -104
- package/dist/services/helper/Extractors.js +0 -432
- package/dist/services/helper/Extractors.js.map +0 -1
- package/dist/services/helper/Urls.d.ts +0 -85
- package/dist/services/helper/Urls.js +0 -130
- package/dist/services/helper/Urls.js.map +0 -1
- package/dist/services/helper/deserializers/Tweets.d.ts +0 -12
- package/dist/services/helper/deserializers/Tweets.js +0 -92
- package/dist/services/helper/deserializers/Tweets.js.map +0 -1
- package/dist/services/helper/deserializers/Users.d.ts +0 -7
- package/dist/services/helper/deserializers/Users.js +0 -27
- package/dist/services/helper/deserializers/Users.js.map +0 -1
- package/dist/services/helper/extractors/Trends.d.ts +0 -3
- package/dist/services/helper/extractors/Trends.js +0 -51
- package/dist/services/helper/extractors/Trends.js.map +0 -1
- package/dist/services/helper/urls/Trends.d.ts +0 -7
- package/dist/services/helper/urls/Trends.js +0 -13
- package/dist/services/helper/urls/Trends.js.map +0 -1
- package/dist/services/helper/urls/Tweets.d.ts +0 -32
- package/dist/services/helper/urls/Tweets.js +0 -51
- package/dist/services/helper/urls/Tweets.js.map +0 -1
- package/dist/services/helper/urls/Users.d.ts +0 -38
- package/dist/services/helper/urls/Users.js +0 -76
- package/dist/services/helper/urls/Users.js.map +0 -1
- package/dist/types/HTTP.d.ts +0 -17
- package/dist/types/HTTP.js +0 -23
- package/dist/types/HTTP.js.map +0 -1
- package/dist/types/Query.d.ts +0 -80
- package/dist/types/Query.js +0 -3
- package/dist/types/Query.js.map +0 -1
- package/dist/types/Trends.d.ts +0 -50
- package/dist/types/Trends.js +0 -3
- package/dist/types/Trends.js.map +0 -1
- package/dist/types/UserAccount.d.ts +0 -19
- package/dist/types/UserAccount.js +0 -4
- package/dist/types/UserAccount.js.map +0 -1
- package/dist/types/args/TweetFilter.d.ts +0 -54
- package/dist/types/args/TweetFilter.js +0 -96
- package/dist/types/args/TweetFilter.js.map +0 -1
- package/dist/types/args/TweetListArg.d.ts +0 -10
- package/dist/types/args/TweetListArg.js +0 -42
- package/dist/types/args/TweetListArg.js.map +0 -1
- package/dist/types/args/TweetListArgs.d.ts +0 -20
- package/dist/types/args/TweetListArgs.js +0 -52
- package/dist/types/args/TweetListArgs.js.map +0 -1
- package/dist/types/args/UserListArgs.d.ts +0 -16
- package/dist/types/args/UserListArgs.js +0 -48
- package/dist/types/args/UserListArgs.js.map +0 -1
- package/dist/types/data/Errors.d.ts +0 -35
- package/dist/types/data/Errors.js +0 -45
- package/dist/types/data/Errors.js.map +0 -1
- package/dist/types/data/Service.d.ts +0 -43
- package/dist/types/data/Service.js +0 -22
- package/dist/types/data/Service.js.map +0 -1
- package/dist/types/data/Tweet.d.ts +0 -98
- package/dist/types/data/Tweet.js +0 -4
- package/dist/types/data/Tweet.js.map +0 -1
- package/dist/types/data/TweetFilter.d.ts +0 -49
- package/dist/types/data/TweetFilter.js +0 -63
- package/dist/types/data/TweetFilter.js.map +0 -1
- package/dist/types/data/User.d.ts +0 -38
- package/dist/types/data/User.js +0 -3
- package/dist/types/data/User.js.map +0 -1
- package/dist/types/graphql/Errors.d.ts +0 -15
- package/dist/types/graphql/Errors.js +0 -23
- package/dist/types/graphql/Errors.js.map +0 -1
- package/dist/types/interfaces/Args.d.ts +0 -38
- package/dist/types/interfaces/Args.js +0 -5
- package/dist/types/interfaces/Args.js.map +0 -1
- package/dist/types/interfaces/Authentication.d.ts +0 -40
- package/dist/types/interfaces/Authentication.js +0 -5
- package/dist/types/interfaces/Authentication.js.map +0 -1
- package/dist/types/interfaces/Resolvers.d.ts +0 -14
- package/dist/types/interfaces/Resolvers.js +0 -3
- package/dist/types/interfaces/Resolvers.js.map +0 -1
- package/dist/types/interfaces/Rettiwt.d.ts +0 -16
- package/dist/types/interfaces/Rettiwt.js +0 -3
- package/dist/types/interfaces/Rettiwt.js.map +0 -1
- package/dist/types/interfaces/Service.d.ts +0 -13
- package/dist/types/interfaces/Service.js +0 -3
- package/dist/types/interfaces/Service.js.map +0 -1
- package/dist/types/interfaces/Services.d.ts +0 -13
- package/dist/types/interfaces/Services.js +0 -3
- package/dist/types/interfaces/Services.js.map +0 -1
- package/dist/types/interfaces/Tweet.d.ts +0 -46
- package/dist/types/interfaces/Tweet.js +0 -3
- package/dist/types/interfaces/Tweet.js.map +0 -1
- package/dist/types/interfaces/TweetFilter.d.ts +0 -0
- package/dist/types/interfaces/TweetFilter.js +0 -2
- package/dist/types/interfaces/TweetFilter.js.map +0 -1
- package/dist/types/interfaces/User.d.ts +0 -35
- package/dist/types/interfaces/User.js +0 -3
- package/dist/types/interfaces/User.js.map +0 -1
- package/dist/types/raw/auth/Cookie.d.ts +0 -16
- package/dist/types/raw/auth/Cookie.js +0 -3
- package/dist/types/raw/auth/Cookie.js.map +0 -1
- package/dist/types/raw/data/tweet/Favouriters.d.ts +0 -164
- package/dist/types/raw/data/tweet/Favouriters.js +0 -3
- package/dist/types/raw/data/tweet/Favouriters.js.map +0 -1
- package/dist/types/raw/data/tweet/Retweeters.d.ts +0 -171
- package/dist/types/raw/data/tweet/Retweeters.js +0 -3
- package/dist/types/raw/data/tweet/Retweeters.js.map +0 -1
- package/dist/types/raw/data/tweet/Tweet.d.ts +0 -746
- package/dist/types/raw/data/tweet/Tweet.js +0 -3
- package/dist/types/raw/data/tweet/Tweet.js.map +0 -1
- package/dist/types/raw/data/tweet/Tweets.d.ts +0 -386
- package/dist/types/raw/data/tweet/Tweets.js +0 -3
- package/dist/types/raw/data/tweet/Tweets.js.map +0 -1
- package/dist/types/raw/data/user/Followers.d.ts +0 -176
- package/dist/types/raw/data/user/Followers.js +0 -3
- package/dist/types/raw/data/user/Followers.js.map +0 -1
- package/dist/types/raw/data/user/Following.d.ts +0 -176
- package/dist/types/raw/data/user/Following.js +0 -3
- package/dist/types/raw/data/user/Following.js.map +0 -1
- package/dist/types/raw/data/user/Likes.d.ts +0 -1059
- package/dist/types/raw/data/user/Likes.js +0 -3
- package/dist/types/raw/data/user/Likes.js.map +0 -1
- package/dist/types/raw/data/user/User.d.ts +0 -117
- package/dist/types/raw/data/user/User.js +0 -3
- package/dist/types/raw/data/user/User.js.map +0 -1
- package/dist/types/raw/general/Trends.d.ts +0 -324
- package/dist/types/raw/general/Trends.js +0 -3
- package/dist/types/raw/general/Trends.js.map +0 -1
- package/dist/types/raw/query/tweet/Details.d.ts +0 -80
- package/dist/types/raw/query/tweet/Details.js +0 -5
- package/dist/types/raw/query/tweet/Details.js.map +0 -1
- package/dist/types/raw/query/tweet/Engagements.d.ts +0 -29
- package/dist/types/raw/query/tweet/Engagements.js +0 -3
- package/dist/types/raw/query/tweet/Engagements.js.map +0 -1
- package/dist/types/raw/query/tweet/Likes.d.ts +0 -29
- package/dist/types/raw/query/tweet/Likes.js +0 -3
- package/dist/types/raw/query/tweet/Likes.js.map +0 -1
- package/dist/types/raw/query/tweet/Retweets.d.ts +0 -29
- package/dist/types/raw/query/tweet/Retweets.js +0 -3
- package/dist/types/raw/query/tweet/Retweets.js.map +0 -1
- package/dist/types/raw/query/tweet/Search.d.ts +0 -40
- package/dist/types/raw/query/tweet/Search.js +0 -3
- package/dist/types/raw/query/tweet/Search.js.map +0 -1
- package/dist/types/raw/query/tweet/TweetDetails.d.ts +0 -34
- package/dist/types/raw/query/tweet/TweetDetails.js +0 -5
- package/dist/types/raw/query/tweet/TweetDetails.js.map +0 -1
- package/dist/types/raw/query/tweet/TweetLike.d.ts +0 -29
- package/dist/types/raw/query/tweet/TweetLike.js +0 -3
- package/dist/types/raw/query/tweet/TweetLike.js.map +0 -1
- package/dist/types/raw/query/tweet/TweetLikes.d.ts +0 -29
- package/dist/types/raw/query/tweet/TweetLikes.js +0 -3
- package/dist/types/raw/query/tweet/TweetLikes.js.map +0 -1
- package/dist/types/raw/query/tweet/TweetRetweets.d.ts +0 -0
- package/dist/types/raw/query/tweet/TweetRetweets.js +0 -2
- package/dist/types/raw/query/tweet/TweetRetweets.js.map +0 -1
- package/dist/types/raw/query/user/Details.d.ts +0 -34
- package/dist/types/raw/query/user/Details.js +0 -3
- package/dist/types/raw/query/user/Details.js.map +0 -1
- package/dist/types/raw/tweet/Favouriters.d.ts +0 -164
- package/dist/types/raw/tweet/Favouriters.js +0 -3
- package/dist/types/raw/tweet/Favouriters.js.map +0 -1
- package/dist/types/raw/tweet/Retweeters.d.ts +0 -171
- package/dist/types/raw/tweet/Retweeters.js +0 -3
- package/dist/types/raw/tweet/Retweeters.js.map +0 -1
- package/dist/types/raw/tweet/Tweet.d.ts +0 -746
- package/dist/types/raw/tweet/Tweet.js +0 -3
- package/dist/types/raw/tweet/Tweet.js.map +0 -1
- package/dist/types/raw/tweet/Tweets.d.ts +0 -386
- package/dist/types/raw/tweet/Tweets.js +0 -3
- package/dist/types/raw/tweet/Tweets.js.map +0 -1
- package/dist/types/raw/user/Followers.d.ts +0 -176
- package/dist/types/raw/user/Followers.js +0 -3
- package/dist/types/raw/user/Followers.js.map +0 -1
- package/dist/types/raw/user/Following.d.ts +0 -176
- package/dist/types/raw/user/Following.js +0 -3
- package/dist/types/raw/user/Following.js.map +0 -1
- package/dist/types/raw/user/Likes.d.ts +0 -1059
- package/dist/types/raw/user/Likes.js +0 -3
- package/dist/types/raw/user/Likes.js.map +0 -1
- package/dist/types/raw/user/Tweets.d.ts +0 -1512
- package/dist/types/raw/user/Tweets.js +0 -3
- package/dist/types/raw/user/Tweets.js.map +0 -1
- package/dist/types/raw/user/User.d.ts +0 -117
- package/dist/types/raw/user/User.js +0 -3
- package/dist/types/raw/user/User.js.map +0 -1
- package/dist/types/services/args/TweetFilter.d.ts +0 -50
- package/dist/types/services/args/TweetFilter.js +0 -76
- package/dist/types/services/args/TweetFilter.js.map +0 -1
- package/src/models/args/TweetFilter.ts +0 -119
- package/src/models/errors/DataValidationError.ts +0 -29
- package/src/services/helper/urls/Tweets.ts +0 -46
- package/src/services/helper/urls/Users.ts +0 -78
- package/src/types/raw/tweet/Favouriters.ts +0 -193
- package/src/types/raw/tweet/Retweeters.ts +0 -201
- package/src/types/raw/tweet/Tweet.ts +0 -882
- package/src/types/raw/tweet/Tweets.ts +0 -444
- package/src/types/raw/user/Followers.ts +0 -208
- package/src/types/raw/user/Following.ts +0 -208
- package/src/types/raw/user/Likes.ts +0 -1247
- package/src/types/raw/user/Tweets.ts +0 -1747
- package/src/types/raw/user/User.ts +0 -135
|
@@ -1,214 +1,202 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
//
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
case
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
config
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
//
|
|
197
|
-
this.cache.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
*
|
|
203
|
-
* @param id The id of the data to be read from cache.
|
|
204
|
-
*
|
|
205
|
-
* @returns The data with the given id. If does not exists, returns undefined.
|
|
206
|
-
*/
|
|
207
|
-
FetcherService.prototype.readData = function (id) {
|
|
208
|
-
// Reading data from cache
|
|
209
|
-
return this.cache.read(id);
|
|
210
|
-
};
|
|
211
|
-
return FetcherService;
|
|
212
|
-
}());
|
|
213
|
-
exports.FetcherService = FetcherService;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
+
function step(op) {
|
|
39
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
+
while (_) try {
|
|
41
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
+
switch (op[0]) {
|
|
44
|
+
case 0: case 1: t = op; break;
|
|
45
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
+
default:
|
|
49
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
+
if (t[2]) _.ops.pop();
|
|
54
|
+
_.trys.pop(); continue;
|
|
55
|
+
}
|
|
56
|
+
op = body.call(thisArg, _);
|
|
57
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
+
};
|
|
64
|
+
exports.__esModule = true;
|
|
65
|
+
exports.FetcherService = exports.HttpMethods = void 0;
|
|
66
|
+
// PACKAGES
|
|
67
|
+
var axios_1 = __importDefault(require("axios"));
|
|
68
|
+
var CacheService_1 = require("./CacheService");
|
|
69
|
+
// MODELS
|
|
70
|
+
var Tweet_1 = require("../../models/data/Tweet");
|
|
71
|
+
var User_1 = require("../../models/data/User");
|
|
72
|
+
// ENUMS
|
|
73
|
+
var HTTP_1 = require("../../enums/HTTP");
|
|
74
|
+
// HELPERS
|
|
75
|
+
var Headers = __importStar(require("../helper/Headers"));
|
|
76
|
+
/**
|
|
77
|
+
* The different types of http requests.
|
|
78
|
+
*/
|
|
79
|
+
var HttpMethods;
|
|
80
|
+
(function (HttpMethods) {
|
|
81
|
+
HttpMethods["POST"] = "POST";
|
|
82
|
+
HttpMethods["GET"] = "GET";
|
|
83
|
+
})(HttpMethods = exports.HttpMethods || (exports.HttpMethods = {}));
|
|
84
|
+
;
|
|
85
|
+
/**
|
|
86
|
+
* Handles all HTTP requests.
|
|
87
|
+
* @internal
|
|
88
|
+
*
|
|
89
|
+
* This serves as the base service from which all other data services derive their behaviour.
|
|
90
|
+
*/
|
|
91
|
+
var FetcherService = /** @class */ (function () {
|
|
92
|
+
// MEMBER METHODS
|
|
93
|
+
/**
|
|
94
|
+
* @param auth The AuthService instance to use for authentication.
|
|
95
|
+
*/
|
|
96
|
+
function FetcherService(auth) {
|
|
97
|
+
this.auth = auth;
|
|
98
|
+
this.cache = CacheService_1.CacheService.getInstance();
|
|
99
|
+
this.isAuthenticated = this.auth.isAuthenticated;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The middleware for handling any HTTP error.
|
|
103
|
+
*
|
|
104
|
+
* @param res The response object received.
|
|
105
|
+
*
|
|
106
|
+
* @returns The received response, if no HTTP errors are found.
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link HttpStatus} error, if any HTTP error is found.
|
|
109
|
+
*/
|
|
110
|
+
FetcherService.prototype.handleHTTPError = function (res) {
|
|
111
|
+
/**
|
|
112
|
+
* If the status code is not 200 => the HTTP request was not successful. hence throwing error
|
|
113
|
+
*/
|
|
114
|
+
if (res.status != 200 && res.status in HTTP_1.HttpStatus) {
|
|
115
|
+
throw new Error(HTTP_1.HttpStatus[res.status]);
|
|
116
|
+
}
|
|
117
|
+
return res;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Creates an HTTP request according to the given parameters.
|
|
121
|
+
*
|
|
122
|
+
* This method internally uses node-libcurl library to make curl requests to the URL, instead of node-fetch.
|
|
123
|
+
* This has been done since that way it better mimics the HTTP requests made from browser.
|
|
124
|
+
*
|
|
125
|
+
* @param url The url to fetch data from.
|
|
126
|
+
* @param authenticate Whether to authenticate requests or not.
|
|
127
|
+
* @param method The HTTP method (from {@link HttpMethods}) to use.
|
|
128
|
+
* @param data The data to be sent along with the request (for POST request).
|
|
129
|
+
*
|
|
130
|
+
* @returns The {@link AxiosResponse} received.
|
|
131
|
+
*/
|
|
132
|
+
FetcherService.prototype.request = function (url, authenticate, method, data) {
|
|
133
|
+
if (authenticate === void 0) { authenticate = true; }
|
|
134
|
+
if (method === void 0) { method = HttpMethods.GET; }
|
|
135
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
136
|
+
var config, _a, _b, _c, _d, _e;
|
|
137
|
+
var _f;
|
|
138
|
+
var _this = this;
|
|
139
|
+
return __generator(this, function (_g) {
|
|
140
|
+
switch (_g.label) {
|
|
141
|
+
case 0:
|
|
142
|
+
_f = {};
|
|
143
|
+
if (!authenticate) return [3 /*break*/, 2];
|
|
144
|
+
_c = (_b = Headers).authorizedHeader;
|
|
145
|
+
return [4 /*yield*/, this.auth.getAuthCredentials()];
|
|
146
|
+
case 1:
|
|
147
|
+
_a = _c.apply(_b, [_g.sent()]);
|
|
148
|
+
return [3 /*break*/, 4];
|
|
149
|
+
case 2:
|
|
150
|
+
_e = (_d = Headers).guestHeader;
|
|
151
|
+
return [4 /*yield*/, this.auth.getGuestCredentials()];
|
|
152
|
+
case 3:
|
|
153
|
+
_a = _e.apply(_d, [_g.sent()]);
|
|
154
|
+
_g.label = 4;
|
|
155
|
+
case 4:
|
|
156
|
+
config = (
|
|
157
|
+
/**
|
|
158
|
+
* If authorization is required, using the authenticated header, using the authentication credentiials.
|
|
159
|
+
* Else, using the guest header, using the guest credentials.
|
|
160
|
+
*/
|
|
161
|
+
_f.headers = _a,
|
|
162
|
+
_f);
|
|
163
|
+
if (!(method == HttpMethods.POST)) return [3 /*break*/, 6];
|
|
164
|
+
return [4 /*yield*/, axios_1["default"].post(url, data, config).then(function (res) { return _this.handleHTTPError(res); })];
|
|
165
|
+
case 5: return [2 /*return*/, _g.sent()];
|
|
166
|
+
case 6: return [4 /*yield*/, axios_1["default"].get(url, config).then(function (res) { return _this.handleHTTPError(res); })];
|
|
167
|
+
case 7: return [2 /*return*/, _g.sent()];
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Caches the extracted data into the {@link CacheService} instance.
|
|
174
|
+
*
|
|
175
|
+
* @param data The extracted data to be cached.
|
|
176
|
+
*/
|
|
177
|
+
FetcherService.prototype.cacheData = function (data) {
|
|
178
|
+
/**
|
|
179
|
+
* The extracted data is in raw form.
|
|
180
|
+
* This raw data is deserialized into the respective known types.
|
|
181
|
+
*/
|
|
182
|
+
var users = data.users.map(function (user) { return new User_1.User(user); });
|
|
183
|
+
var tweets = data.tweets.map(function (tweet) { return new Tweet_1.Tweet(tweet); });
|
|
184
|
+
// Caching the data
|
|
185
|
+
this.cache.write(users);
|
|
186
|
+
this.cache.write(tweets);
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Fetches the data with the given id from the cache.
|
|
190
|
+
*
|
|
191
|
+
* @param id The id of the data to be read from cache.
|
|
192
|
+
*
|
|
193
|
+
* @returns The data with the given id. If does not exists, returns undefined.
|
|
194
|
+
*/
|
|
195
|
+
FetcherService.prototype.readData = function (id) {
|
|
196
|
+
// Reading data from cache
|
|
197
|
+
return this.cache.read(id);
|
|
198
|
+
};
|
|
199
|
+
return FetcherService;
|
|
200
|
+
}());
|
|
201
|
+
exports.FetcherService = FetcherService;
|
|
214
202
|
//# sourceMappingURL=FetcherService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetcherService.js","sourceRoot":"","sources":["../../../src/services/util/FetcherService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FetcherService.js","sourceRoot":"","sources":["../../../src/services/util/FetcherService.ts"],"names":[],"mappings":"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"}
|
package/dist/types/Args.d.ts
CHANGED
|
@@ -1,38 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The
|
|
3
|
-
*
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export interface
|
|
7
|
-
/** The
|
|
8
|
-
|
|
9
|
-
/** The
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
fromUsers?: string[];
|
|
13
|
-
/** The list of username to whom the tweets to be searched, are adressed. */
|
|
14
|
-
toUsers?: string[];
|
|
15
|
-
/** The list of username mentioned in the tweets to search. */
|
|
16
|
-
mentions?: string[];
|
|
17
|
-
/** The date starting from which tweets are to be searched. */
|
|
18
|
-
startDate?: string;
|
|
19
|
-
/** The date upto which tweets are to be searched. */
|
|
20
|
-
endDate?: string;
|
|
21
|
-
/** The id of the tweet, after which the tweets are to be searched. */
|
|
22
|
-
sinceId?: string;
|
|
23
|
-
/** The id of the tweet which is quoted in the tweets to search. */
|
|
24
|
-
quoted?: string;
|
|
25
|
-
/** Whether to fetch tweets that are links or not. */
|
|
26
|
-
links?: boolean;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* The arguments for fetching cursored list.
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
export interface IListArgs {
|
|
34
|
-
/** The number of data items to fetch. */
|
|
35
|
-
count?: number;
|
|
36
|
-
/** The cursor to the batch of data to fetch. */
|
|
37
|
-
cursor?: string;
|
|
38
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* The arguments for fetching cursored list.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface IListArgs {
|
|
7
|
+
/** The number of data items to fetch. */
|
|
8
|
+
count?: number;
|
|
9
|
+
/** The cursor to the batch of data to fetch. */
|
|
10
|
+
cursor?: string;
|
|
11
|
+
}
|
package/dist/types/Args.js
CHANGED
package/dist/types/Args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Args.js","sourceRoot":"","sources":["../../src/types/Args.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Args.js","sourceRoot":"","sources":["../../src/types/Args.ts"],"names":[],"mappings":";;AAWC,CAAC"}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The guest credentials for guest authentication.
|
|
3
|
-
*
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export interface IGuestCredentials {
|
|
7
|
-
/** The bearer token from twitter.com.
|
|
8
|
-
*
|
|
9
|
-
* @remarks This is a static bearer token from twitter.com.
|
|
10
|
-
*/
|
|
11
|
-
authToken: string;
|
|
12
|
-
/** The guest token.
|
|
13
|
-
*
|
|
14
|
-
* @remarks This is generated from twitter.com by calling GETTING https://api.twitter.com/1.1/guest/activate.json endpoint.
|
|
15
|
-
*/
|
|
16
|
-
guestToken: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The credentials for authenticated/logged in users.
|
|
20
|
-
*
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
|
-
export interface IAuthCredentials {
|
|
24
|
-
/** The bearer token from twitter.com.
|
|
25
|
-
*
|
|
26
|
-
* @remarks This is a static bearer token from twitter.com.
|
|
27
|
-
*/
|
|
28
|
-
authToken: string;
|
|
29
|
-
/** The guest token.
|
|
30
|
-
*
|
|
31
|
-
* @remarks This is generated from twitter.com by calling GETTING https://api.twitter.com/1.1/guest/activate.json endpoint.
|
|
32
|
-
*/
|
|
33
|
-
csrfToken: string;
|
|
34
|
-
/** The cookie of the twitter account, which is used to authenticate against twitter.
|
|
35
|
-
*
|
|
36
|
-
* @remarks The cookie can be obtained/scraped from any one of the outgoing HTTP request headers to twitter.com.
|
|
37
|
-
* It can also be obtained after logging in to twitter, from the 'set-cookie' field of response.
|
|
38
|
-
*/
|
|
39
|
-
cookie: string;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The cookie containing the tokens that are used to authenticate against Twitter.
|
|
43
|
-
*
|
|
44
|
-
* @public
|
|
45
|
-
*/
|
|
46
|
-
export interface IAuthCookie {
|
|
47
|
-
/** Token used to authenticate a device. */
|
|
48
|
-
kdt: string;
|
|
49
|
-
/** Token used to authenticate a user using a Twitter ID. */
|
|
50
|
-
twid: string;
|
|
51
|
-
/** The CSRF token of the session. */
|
|
52
|
-
ct0: string;
|
|
53
|
-
/** The authentication token used while logging in to the account. */
|
|
54
|
-
auth_token: string;
|
|
55
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* The guest credentials for guest authentication.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface IGuestCredentials {
|
|
7
|
+
/** The bearer token from twitter.com.
|
|
8
|
+
*
|
|
9
|
+
* @remarks This is a static bearer token from twitter.com.
|
|
10
|
+
*/
|
|
11
|
+
authToken: string;
|
|
12
|
+
/** The guest token.
|
|
13
|
+
*
|
|
14
|
+
* @remarks This is generated from twitter.com by calling GETTING https://api.twitter.com/1.1/guest/activate.json endpoint.
|
|
15
|
+
*/
|
|
16
|
+
guestToken: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The credentials for authenticated/logged in users.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export interface IAuthCredentials {
|
|
24
|
+
/** The bearer token from twitter.com.
|
|
25
|
+
*
|
|
26
|
+
* @remarks This is a static bearer token from twitter.com.
|
|
27
|
+
*/
|
|
28
|
+
authToken: string;
|
|
29
|
+
/** The guest token.
|
|
30
|
+
*
|
|
31
|
+
* @remarks This is generated from twitter.com by calling GETTING https://api.twitter.com/1.1/guest/activate.json endpoint.
|
|
32
|
+
*/
|
|
33
|
+
csrfToken: string;
|
|
34
|
+
/** The cookie of the twitter account, which is used to authenticate against twitter.
|
|
35
|
+
*
|
|
36
|
+
* @remarks The cookie can be obtained/scraped from any one of the outgoing HTTP request headers to twitter.com.
|
|
37
|
+
* It can also be obtained after logging in to twitter, from the 'set-cookie' field of response.
|
|
38
|
+
*/
|
|
39
|
+
cookie: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The cookie containing the tokens that are used to authenticate against Twitter.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export interface IAuthCookie {
|
|
47
|
+
/** Token used to authenticate a device. */
|
|
48
|
+
kdt: string;
|
|
49
|
+
/** Token used to authenticate a user using a Twitter ID. */
|
|
50
|
+
twid: string;
|
|
51
|
+
/** The CSRF token of the session. */
|
|
52
|
+
ct0: string;
|
|
53
|
+
/** The authentication token used while logging in to the account. */
|
|
54
|
+
auth_token: string;
|
|
55
|
+
}
|