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,137 +1,137 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.UserList = exports.User = void 0;
|
|
7
|
-
// PACKAGE
|
|
8
|
-
var graphql_1 = require("graphql");
|
|
9
|
-
// TYPES
|
|
10
|
-
var TweetTypes_1 = require("./TweetTypes");
|
|
11
|
-
var Global_1 = require("./Global");
|
|
12
|
-
// RESOLVERS
|
|
13
|
-
var UserResolver_1 = __importDefault(require("../resolvers/UserResolver"));
|
|
14
|
-
var TweetResolver_1 = __importDefault(require("../resolvers/TweetResolver"));
|
|
15
|
-
exports.User = new graphql_1.GraphQLObjectType({
|
|
16
|
-
name: 'User',
|
|
17
|
-
description: 'The details of a single target twitter user',
|
|
18
|
-
fields: function () { return ({
|
|
19
|
-
id: { type: graphql_1.GraphQLString },
|
|
20
|
-
userName: { type: graphql_1.GraphQLString },
|
|
21
|
-
fullName: { type: graphql_1.GraphQLString },
|
|
22
|
-
createdAt: { type: graphql_1.GraphQLString },
|
|
23
|
-
description: { type: graphql_1.GraphQLString },
|
|
24
|
-
isVerified: { type: graphql_1.GraphQLBoolean },
|
|
25
|
-
location: { type: graphql_1.GraphQLString },
|
|
26
|
-
pinnedTweet: {
|
|
27
|
-
type: TweetTypes_1.Tweet,
|
|
28
|
-
resolve: function (parent, args, context) { return (parent.pinnedTweet) ? new TweetResolver_1["default"](context).resolveTweet(parent.pinnedTweet) : undefined; }
|
|
29
|
-
},
|
|
30
|
-
profileBanner: { type: graphql_1.GraphQLString },
|
|
31
|
-
profileImage: { type: graphql_1.GraphQLString },
|
|
32
|
-
favouritesCount: { type: graphql_1.GraphQLInt },
|
|
33
|
-
likes: {
|
|
34
|
-
type: TweetTypes_1.TweetList,
|
|
35
|
-
args: {
|
|
36
|
-
count: {
|
|
37
|
-
description: "The number of liked tweets to fetch, must be >= 40 (when no cursor if provided)",
|
|
38
|
-
type: graphql_1.GraphQLInt,
|
|
39
|
-
defaultValue: 10
|
|
40
|
-
},
|
|
41
|
-
all: {
|
|
42
|
-
description: "Whether to fetch all tweets liked by user",
|
|
43
|
-
type: graphql_1.GraphQLBoolean,
|
|
44
|
-
defaultValue: false
|
|
45
|
-
},
|
|
46
|
-
cursor: {
|
|
47
|
-
type: graphql_1.GraphQLString,
|
|
48
|
-
description: 'The cursor to the batch of likes list to fetch',
|
|
49
|
-
defaultValue: ''
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
resolve: function (parent, args, context) { return new UserResolver_1["default"](context).resolveUserLikes(parent.id, args.count, args.all, args.cursor, parent.favouritesCount); }
|
|
53
|
-
},
|
|
54
|
-
followersCount: { type: graphql_1.GraphQLInt },
|
|
55
|
-
followers: {
|
|
56
|
-
type: exports.UserList,
|
|
57
|
-
args: {
|
|
58
|
-
count: {
|
|
59
|
-
description: "The number of followers to fetch, must be >= 40 (when no cursor is provided)",
|
|
60
|
-
type: graphql_1.GraphQLInt,
|
|
61
|
-
defaultValue: 40
|
|
62
|
-
},
|
|
63
|
-
all: {
|
|
64
|
-
description: "Whether to fetch all followers list",
|
|
65
|
-
type: graphql_1.GraphQLBoolean,
|
|
66
|
-
defaultValue: false
|
|
67
|
-
},
|
|
68
|
-
cursor: {
|
|
69
|
-
type: graphql_1.GraphQLString,
|
|
70
|
-
description: 'The cursor to the batch of followers list to fetch',
|
|
71
|
-
defaultValue: ''
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
resolve: function (parent, args, context) { return new UserResolver_1["default"](context).resolveUserFollowers(parent.id, args.count, args.all, args.cursor, parent.followersCount); }
|
|
75
|
-
},
|
|
76
|
-
followingsCount: { type: graphql_1.GraphQLInt },
|
|
77
|
-
following: {
|
|
78
|
-
type: exports.UserList,
|
|
79
|
-
args: {
|
|
80
|
-
count: {
|
|
81
|
-
type: graphql_1.GraphQLInt,
|
|
82
|
-
description: "The number of followings to fetch, must be >= 40 (when no cursor is provided)",
|
|
83
|
-
defaultValue: 40
|
|
84
|
-
},
|
|
85
|
-
all: {
|
|
86
|
-
description: "Whether to fetch all followings list",
|
|
87
|
-
type: graphql_1.GraphQLBoolean,
|
|
88
|
-
defaultValue: false
|
|
89
|
-
},
|
|
90
|
-
cursor: {
|
|
91
|
-
type: graphql_1.GraphQLString,
|
|
92
|
-
description: 'The cursor to the batch of followers list to fetch',
|
|
93
|
-
defaultValue: ''
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
resolve: function (parent, args, context) { return new UserResolver_1["default"](context).resolveUserFollowing(parent.id, args.count, args.all, args.cursor, parent.followingsCount); }
|
|
97
|
-
},
|
|
98
|
-
statusesCount: { type: graphql_1.GraphQLInt },
|
|
99
|
-
tweets: {
|
|
100
|
-
type: TweetTypes_1.TweetList,
|
|
101
|
-
args: {
|
|
102
|
-
count: {
|
|
103
|
-
description: "The number of tweets to fetch, must be >= 1",
|
|
104
|
-
type: graphql_1.GraphQLInt,
|
|
105
|
-
defaultValue: 10
|
|
106
|
-
},
|
|
107
|
-
all: {
|
|
108
|
-
description: "Whether to fetch all tweets made by user",
|
|
109
|
-
type: graphql_1.GraphQLBoolean,
|
|
110
|
-
defaultValue: false
|
|
111
|
-
},
|
|
112
|
-
cursor: {
|
|
113
|
-
type: graphql_1.GraphQLString,
|
|
114
|
-
description: 'The cursor to the batch of tweets list to fetch',
|
|
115
|
-
defaultValue: ''
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
resolve: function (parent, args, context) { return new UserResolver_1["default"](context).resolveUserTweets(parent.
|
|
119
|
-
}
|
|
120
|
-
}); }
|
|
121
|
-
});
|
|
122
|
-
exports.UserList = new graphql_1.GraphQLList(new graphql_1.GraphQLUnionType({
|
|
123
|
-
name: 'UserCursorUnion',
|
|
124
|
-
description: 'A union type which can either be a User or a Cursor, used in cursored User lists',
|
|
125
|
-
types: [exports.User, Global_1.Cursor],
|
|
126
|
-
resolveType: function (data) {
|
|
127
|
-
// If it has a userName field => this is a User object
|
|
128
|
-
if (data.userName) {
|
|
129
|
-
return exports.User;
|
|
130
|
-
}
|
|
131
|
-
// If it has a value field => this is a Cursor object
|
|
132
|
-
else if (data.value) {
|
|
133
|
-
return Global_1.Cursor;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}));
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.UserList = exports.User = void 0;
|
|
7
|
+
// PACKAGE
|
|
8
|
+
var graphql_1 = require("graphql");
|
|
9
|
+
// TYPES
|
|
10
|
+
var TweetTypes_1 = require("./TweetTypes");
|
|
11
|
+
var Global_1 = require("./Global");
|
|
12
|
+
// RESOLVERS
|
|
13
|
+
var UserResolver_1 = __importDefault(require("../resolvers/UserResolver"));
|
|
14
|
+
var TweetResolver_1 = __importDefault(require("../resolvers/TweetResolver"));
|
|
15
|
+
exports.User = new graphql_1.GraphQLObjectType({
|
|
16
|
+
name: 'User',
|
|
17
|
+
description: 'The details of a single target twitter user',
|
|
18
|
+
fields: function () { return ({
|
|
19
|
+
id: { type: graphql_1.GraphQLString },
|
|
20
|
+
userName: { type: graphql_1.GraphQLString },
|
|
21
|
+
fullName: { type: graphql_1.GraphQLString },
|
|
22
|
+
createdAt: { type: graphql_1.GraphQLString },
|
|
23
|
+
description: { type: graphql_1.GraphQLString },
|
|
24
|
+
isVerified: { type: graphql_1.GraphQLBoolean },
|
|
25
|
+
location: { type: graphql_1.GraphQLString },
|
|
26
|
+
pinnedTweet: {
|
|
27
|
+
type: TweetTypes_1.Tweet,
|
|
28
|
+
resolve: function (parent, args, context) { return (parent.pinnedTweet) ? new TweetResolver_1["default"](context).resolveTweet(parent.pinnedTweet) : undefined; }
|
|
29
|
+
},
|
|
30
|
+
profileBanner: { type: graphql_1.GraphQLString },
|
|
31
|
+
profileImage: { type: graphql_1.GraphQLString },
|
|
32
|
+
favouritesCount: { type: graphql_1.GraphQLInt },
|
|
33
|
+
likes: {
|
|
34
|
+
type: TweetTypes_1.TweetList,
|
|
35
|
+
args: {
|
|
36
|
+
count: {
|
|
37
|
+
description: "The number of liked tweets to fetch, must be >= 40 (when no cursor if provided)",
|
|
38
|
+
type: graphql_1.GraphQLInt,
|
|
39
|
+
defaultValue: 10
|
|
40
|
+
},
|
|
41
|
+
all: {
|
|
42
|
+
description: "Whether to fetch all tweets liked by user",
|
|
43
|
+
type: graphql_1.GraphQLBoolean,
|
|
44
|
+
defaultValue: false
|
|
45
|
+
},
|
|
46
|
+
cursor: {
|
|
47
|
+
type: graphql_1.GraphQLString,
|
|
48
|
+
description: 'The cursor to the batch of likes list to fetch',
|
|
49
|
+
defaultValue: ''
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
resolve: function (parent, args, context) { return new UserResolver_1["default"](context).resolveUserLikes(parent.id, args.count, args.all, args.cursor, parent.favouritesCount); }
|
|
53
|
+
},
|
|
54
|
+
followersCount: { type: graphql_1.GraphQLInt },
|
|
55
|
+
followers: {
|
|
56
|
+
type: exports.UserList,
|
|
57
|
+
args: {
|
|
58
|
+
count: {
|
|
59
|
+
description: "The number of followers to fetch, must be >= 40 (when no cursor is provided)",
|
|
60
|
+
type: graphql_1.GraphQLInt,
|
|
61
|
+
defaultValue: 40
|
|
62
|
+
},
|
|
63
|
+
all: {
|
|
64
|
+
description: "Whether to fetch all followers list",
|
|
65
|
+
type: graphql_1.GraphQLBoolean,
|
|
66
|
+
defaultValue: false
|
|
67
|
+
},
|
|
68
|
+
cursor: {
|
|
69
|
+
type: graphql_1.GraphQLString,
|
|
70
|
+
description: 'The cursor to the batch of followers list to fetch',
|
|
71
|
+
defaultValue: ''
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
resolve: function (parent, args, context) { return new UserResolver_1["default"](context).resolveUserFollowers(parent.id, args.count, args.all, args.cursor, parent.followersCount); }
|
|
75
|
+
},
|
|
76
|
+
followingsCount: { type: graphql_1.GraphQLInt },
|
|
77
|
+
following: {
|
|
78
|
+
type: exports.UserList,
|
|
79
|
+
args: {
|
|
80
|
+
count: {
|
|
81
|
+
type: graphql_1.GraphQLInt,
|
|
82
|
+
description: "The number of followings to fetch, must be >= 40 (when no cursor is provided)",
|
|
83
|
+
defaultValue: 40
|
|
84
|
+
},
|
|
85
|
+
all: {
|
|
86
|
+
description: "Whether to fetch all followings list",
|
|
87
|
+
type: graphql_1.GraphQLBoolean,
|
|
88
|
+
defaultValue: false
|
|
89
|
+
},
|
|
90
|
+
cursor: {
|
|
91
|
+
type: graphql_1.GraphQLString,
|
|
92
|
+
description: 'The cursor to the batch of followers list to fetch',
|
|
93
|
+
defaultValue: ''
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
resolve: function (parent, args, context) { return new UserResolver_1["default"](context).resolveUserFollowing(parent.id, args.count, args.all, args.cursor, parent.followingsCount); }
|
|
97
|
+
},
|
|
98
|
+
statusesCount: { type: graphql_1.GraphQLInt },
|
|
99
|
+
tweets: {
|
|
100
|
+
type: TweetTypes_1.TweetList,
|
|
101
|
+
args: {
|
|
102
|
+
count: {
|
|
103
|
+
description: "The number of tweets to fetch, must be >= 1",
|
|
104
|
+
type: graphql_1.GraphQLInt,
|
|
105
|
+
defaultValue: 10
|
|
106
|
+
},
|
|
107
|
+
all: {
|
|
108
|
+
description: "Whether to fetch all tweets made by user",
|
|
109
|
+
type: graphql_1.GraphQLBoolean,
|
|
110
|
+
defaultValue: false
|
|
111
|
+
},
|
|
112
|
+
cursor: {
|
|
113
|
+
type: graphql_1.GraphQLString,
|
|
114
|
+
description: 'The cursor to the batch of tweets list to fetch',
|
|
115
|
+
defaultValue: ''
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
resolve: function (parent, args, context) { return new UserResolver_1["default"](context).resolveUserTweets(parent.userName, args.count, args.all, args.cursor, parent.statusesCount); }
|
|
119
|
+
}
|
|
120
|
+
}); }
|
|
121
|
+
});
|
|
122
|
+
exports.UserList = new graphql_1.GraphQLList(new graphql_1.GraphQLUnionType({
|
|
123
|
+
name: 'UserCursorUnion',
|
|
124
|
+
description: 'A union type which can either be a User or a Cursor, used in cursored User lists',
|
|
125
|
+
types: [exports.User, Global_1.Cursor],
|
|
126
|
+
resolveType: function (data) {
|
|
127
|
+
// If it has a userName field => this is a User object
|
|
128
|
+
if (data.userName) {
|
|
129
|
+
return exports.User;
|
|
130
|
+
}
|
|
131
|
+
// If it has a value field => this is a Cursor object
|
|
132
|
+
else if (data.value) {
|
|
133
|
+
return Global_1.Cursor;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}));
|
|
137
137
|
//# sourceMappingURL=UserTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserTypes.js","sourceRoot":"","sources":["../../../src/graphql/types/UserTypes.ts"],"names":[],"mappings":";;;;;;AAAA,UAAU;AACV,mCAAmI;
|
|
1
|
+
{"version":3,"file":"UserTypes.js","sourceRoot":"","sources":["../../../src/graphql/types/UserTypes.ts"],"names":[],"mappings":";;;;;;AAAA,UAAU;AACV,mCAAmI;AAGnI,QAAQ;AACR,2CAA+C;AAC/C,mCAAkC;AAElC,YAAY;AACZ,2EAAqD;AACrD,6EAAuD;AAE1C,QAAA,IAAI,GAAsB,IAAI,2BAAiB,CAAC;IACzD,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,6CAA6C;IAC1D,MAAM,EAAE,cAAM,OAAA,CAAC;QACX,EAAE,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;QAC3B,QAAQ,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;QACjC,QAAQ,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;QACjC,SAAS,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;QAClC,WAAW,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;QACpC,UAAU,EAAE,EAAE,IAAI,EAAE,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2
|
-
import { UserService } from "./services/data/UserService";
|
|
3
|
-
import { TweetService } from "./services/data/TweetService";
|
|
4
|
-
import { AccountService } from "./services/auth/AccountService";
|
|
5
|
-
import { IAuthCookie } from './types/Authentication';
|
|
6
|
-
/**
|
|
7
|
-
* The instance for fetching data from Twitter.
|
|
8
|
-
*
|
|
9
|
-
* @public
|
|
10
|
-
*
|
|
11
|
-
* @param cookie The cookie to use to fetch data.
|
|
12
|
-
*
|
|
13
|
-
* @returns The API for fetching user and tweet data.
|
|
14
|
-
*
|
|
15
|
-
* @remarks The cookie can be obtained by using {@link AccountService.login} method.
|
|
16
|
-
* To use the {@link AccountService.login} method, create a {@link Rettiwt} instance without passing any cookie .
|
|
17
|
-
* Then use the {@link AccountService.login} method of {@link AccountService} to get the cookie.
|
|
18
|
-
*/
|
|
19
|
-
export declare const Rettiwt: (cookie?: IAuthCookie | undefined) => {
|
|
20
|
-
users: UserService;
|
|
21
|
-
tweets: TweetService;
|
|
22
|
-
account: AccountService;
|
|
23
|
-
};
|
|
24
|
-
export * from './services/auth/AuthService';
|
|
25
|
-
export * from './services/auth/AccountService';
|
|
26
|
-
export * from './services/data/TweetService';
|
|
27
|
-
export * from './services/data/UserService';
|
|
28
|
-
export * from './services/util/CacheService';
|
|
29
|
-
export * from './services/util/FetcherService';
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export * from './types/
|
|
34
|
-
export * from './types/
|
|
35
|
-
export * from './types/
|
|
36
|
-
export * from './
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export * from './models/
|
|
40
|
-
export * from './models/
|
|
41
|
-
export
|
|
42
|
-
export * from './models/data/
|
|
43
|
-
export * from './models/
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { UserService } from "./services/data/UserService";
|
|
3
|
+
import { TweetService } from "./services/data/TweetService";
|
|
4
|
+
import { AccountService } from "./services/auth/AccountService";
|
|
5
|
+
import { IAuthCookie } from './types/Authentication';
|
|
6
|
+
/**
|
|
7
|
+
* The instance for fetching data from Twitter.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*
|
|
11
|
+
* @param cookie The cookie to use to fetch data.
|
|
12
|
+
*
|
|
13
|
+
* @returns The API for fetching user and tweet data.
|
|
14
|
+
*
|
|
15
|
+
* @remarks The cookie can be obtained by using {@link AccountService.login} method.
|
|
16
|
+
* To use the {@link AccountService.login} method, create a {@link Rettiwt} instance without passing any cookie .
|
|
17
|
+
* Then use the {@link AccountService.login} method of {@link AccountService} to get the cookie.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Rettiwt: (cookie?: IAuthCookie | undefined) => {
|
|
20
|
+
users: UserService;
|
|
21
|
+
tweets: TweetService;
|
|
22
|
+
account: AccountService;
|
|
23
|
+
};
|
|
24
|
+
export * from './services/auth/AuthService';
|
|
25
|
+
export * from './services/auth/AccountService';
|
|
26
|
+
export * from './services/data/TweetService';
|
|
27
|
+
export * from './services/data/UserService';
|
|
28
|
+
export * from './services/util/CacheService';
|
|
29
|
+
export * from './services/util/FetcherService';
|
|
30
|
+
export { ITweetFilter } from 'rettiwt-core';
|
|
31
|
+
export * from './types/Args';
|
|
32
|
+
export { IAuthCookie } from './types/Authentication';
|
|
33
|
+
export * from './types/Rettiwt';
|
|
34
|
+
export * from './types/Service';
|
|
35
|
+
export * from './types/Tweet';
|
|
36
|
+
export * from './types/User';
|
|
37
|
+
export { IDataValidationError } from 'rettiwt-core';
|
|
38
|
+
export { TweetFilter } from 'rettiwt-core';
|
|
39
|
+
export * from './models/args/TweetListArgs';
|
|
40
|
+
export * from './models/args/UserListArgs';
|
|
41
|
+
export { AuthCookie } from './models/auth/AuthCookie';
|
|
42
|
+
export * from './models/data/CursoredData';
|
|
43
|
+
export * from './models/data/Tweet';
|
|
44
|
+
export * from './models/data/User';
|
|
45
|
+
export { DataValidationError } from 'rettiwt-core';
|
package/dist/index.js
CHANGED
|
@@ -1,71 +1,73 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
exports.__esModule = true;
|
|
17
|
-
exports.Rettiwt = void 0;
|
|
18
|
-
// PACKAGES
|
|
19
|
-
require("reflect-metadata");
|
|
20
|
-
// SERVICES
|
|
21
|
-
var AuthService_1 = require("./services/auth/AuthService");
|
|
22
|
-
var UserService_1 = require("./services/data/UserService");
|
|
23
|
-
var TweetService_1 = require("./services/data/TweetService");
|
|
24
|
-
var AccountService_1 = require("./services/auth/AccountService");
|
|
25
|
-
/**
|
|
26
|
-
* The instance for fetching data from Twitter.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*
|
|
30
|
-
* @param cookie The cookie to use to fetch data.
|
|
31
|
-
*
|
|
32
|
-
* @returns The API for fetching user and tweet data.
|
|
33
|
-
*
|
|
34
|
-
* @remarks The cookie can be obtained by using {@link AccountService.login} method.
|
|
35
|
-
* To use the {@link AccountService.login} method, create a {@link Rettiwt} instance without passing any cookie .
|
|
36
|
-
* Then use the {@link AccountService.login} method of {@link AccountService} to get the cookie.
|
|
37
|
-
*/
|
|
38
|
-
var Rettiwt = function (cookie) {
|
|
39
|
-
// Creating new auth service instance using the given cookie
|
|
40
|
-
var auth = new AuthService_1.AuthService(cookie);
|
|
41
|
-
// Using the auth service instance to create data services instances
|
|
42
|
-
return {
|
|
43
|
-
users: new UserService_1.UserService(auth),
|
|
44
|
-
tweets: new TweetService_1.TweetService(auth),
|
|
45
|
-
account: new AccountService_1.AccountService()
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
exports.Rettiwt = Rettiwt;
|
|
49
|
-
// Exporting classes
|
|
50
|
-
__exportStar(require("./services/auth/AuthService"), exports);
|
|
51
|
-
__exportStar(require("./services/auth/AccountService"), exports);
|
|
52
|
-
__exportStar(require("./services/data/TweetService"), exports);
|
|
53
|
-
__exportStar(require("./services/data/UserService"), exports);
|
|
54
|
-
__exportStar(require("./services/util/CacheService"), exports);
|
|
55
|
-
__exportStar(require("./services/util/FetcherService"), exports);
|
|
56
|
-
|
|
57
|
-
__exportStar(require("./types/
|
|
58
|
-
__exportStar(require("./types/
|
|
59
|
-
__exportStar(require("./types/
|
|
60
|
-
__exportStar(require("./types/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
__exportStar(require("./models/args/TweetListArgs"), exports);
|
|
65
|
-
__exportStar(require("./models/args/UserListArgs"), exports);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
__exportStar(require("./models/data/
|
|
69
|
-
__exportStar(require("./models/data/
|
|
70
|
-
__exportStar(require("./models/
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
exports.__esModule = true;
|
|
17
|
+
exports.DataValidationError = exports.AuthCookie = exports.TweetFilter = exports.Rettiwt = void 0;
|
|
18
|
+
// PACKAGES
|
|
19
|
+
require("reflect-metadata");
|
|
20
|
+
// SERVICES
|
|
21
|
+
var AuthService_1 = require("./services/auth/AuthService");
|
|
22
|
+
var UserService_1 = require("./services/data/UserService");
|
|
23
|
+
var TweetService_1 = require("./services/data/TweetService");
|
|
24
|
+
var AccountService_1 = require("./services/auth/AccountService");
|
|
25
|
+
/**
|
|
26
|
+
* The instance for fetching data from Twitter.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*
|
|
30
|
+
* @param cookie The cookie to use to fetch data.
|
|
31
|
+
*
|
|
32
|
+
* @returns The API for fetching user and tweet data.
|
|
33
|
+
*
|
|
34
|
+
* @remarks The cookie can be obtained by using {@link AccountService.login} method.
|
|
35
|
+
* To use the {@link AccountService.login} method, create a {@link Rettiwt} instance without passing any cookie .
|
|
36
|
+
* Then use the {@link AccountService.login} method of {@link AccountService} to get the cookie.
|
|
37
|
+
*/
|
|
38
|
+
var Rettiwt = function (cookie) {
|
|
39
|
+
// Creating new auth service instance using the given cookie
|
|
40
|
+
var auth = new AuthService_1.AuthService(cookie);
|
|
41
|
+
// Using the auth service instance to create data services instances
|
|
42
|
+
return {
|
|
43
|
+
users: new UserService_1.UserService(auth),
|
|
44
|
+
tweets: new TweetService_1.TweetService(auth),
|
|
45
|
+
account: new AccountService_1.AccountService()
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
exports.Rettiwt = Rettiwt;
|
|
49
|
+
// Exporting classes
|
|
50
|
+
__exportStar(require("./services/auth/AuthService"), exports);
|
|
51
|
+
__exportStar(require("./services/auth/AccountService"), exports);
|
|
52
|
+
__exportStar(require("./services/data/TweetService"), exports);
|
|
53
|
+
__exportStar(require("./services/data/UserService"), exports);
|
|
54
|
+
__exportStar(require("./services/util/CacheService"), exports);
|
|
55
|
+
__exportStar(require("./services/util/FetcherService"), exports);
|
|
56
|
+
__exportStar(require("./types/Args"), exports);
|
|
57
|
+
__exportStar(require("./types/Rettiwt"), exports);
|
|
58
|
+
__exportStar(require("./types/Service"), exports);
|
|
59
|
+
__exportStar(require("./types/Tweet"), exports);
|
|
60
|
+
__exportStar(require("./types/User"), exports);
|
|
61
|
+
// Exporting models
|
|
62
|
+
var rettiwt_core_1 = require("rettiwt-core");
|
|
63
|
+
__createBinding(exports, rettiwt_core_1, "TweetFilter");
|
|
64
|
+
__exportStar(require("./models/args/TweetListArgs"), exports);
|
|
65
|
+
__exportStar(require("./models/args/UserListArgs"), exports);
|
|
66
|
+
var AuthCookie_1 = require("./models/auth/AuthCookie");
|
|
67
|
+
__createBinding(exports, AuthCookie_1, "AuthCookie");
|
|
68
|
+
__exportStar(require("./models/data/CursoredData"), exports);
|
|
69
|
+
__exportStar(require("./models/data/Tweet"), exports);
|
|
70
|
+
__exportStar(require("./models/data/User"), exports);
|
|
71
|
+
var rettiwt_core_2 = require("rettiwt-core");
|
|
72
|
+
__createBinding(exports, rettiwt_core_2, "DataValidationError");
|
|
71
73
|
//# 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,WAAW;AACX,4BAA0B;AAE1B,WAAW;AACX,2DAA0D;AAC1D,2DAA0D;AAC1D,6DAA4D;AAC5D,iEAAgE;AAKhE;;;;;;;;;;;;GAYG;AACI,IAAM,OAAO,GAAG,UAAC,MAAoB;IACxC,4DAA4D;IAC5D,IAAM,IAAI,GAAgB,IAAI,y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ACnC,6CAAmD;AAA1C,gEAAmB"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { IListArgs } from '../../types/Args';
|
|
2
|
-
/**
|
|
3
|
-
* The arguments for fetching cursored list in TweetService.
|
|
4
|
-
*
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
export declare class TweetListArgs implements IListArgs {
|
|
8
|
-
/** The number of data items to fetch.
|
|
9
|
-
*
|
|
10
|
-
* @defaultValue 10
|
|
11
|
-
* @remarks Must be >= 10 and <= 100
|
|
12
|
-
*/
|
|
13
|
-
count: number;
|
|
14
|
-
/** The cursor to the batch of data to fetch. */
|
|
15
|
-
cursor: string;
|
|
16
|
-
/**
|
|
17
|
-
* @param count The number of data items to fetch.
|
|
18
|
-
* @param cursor The cursor to the batch of data to fetch.
|
|
19
|
-
*/
|
|
20
|
-
constructor(count?: number, cursor?: string);
|
|
21
|
-
}
|
|
1
|
+
import { IListArgs } from '../../types/Args';
|
|
2
|
+
/**
|
|
3
|
+
* The arguments for fetching cursored list in TweetService.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class TweetListArgs implements IListArgs {
|
|
8
|
+
/** The number of data items to fetch.
|
|
9
|
+
*
|
|
10
|
+
* @defaultValue 10
|
|
11
|
+
* @remarks Must be >= 10 and <= 100
|
|
12
|
+
*/
|
|
13
|
+
count: number;
|
|
14
|
+
/** The cursor to the batch of data to fetch. */
|
|
15
|
+
cursor: string;
|
|
16
|
+
/**
|
|
17
|
+
* @param count The number of data items to fetch.
|
|
18
|
+
* @param cursor The cursor to the batch of data to fetch.
|
|
19
|
+
*/
|
|
20
|
+
constructor(count?: number, cursor?: string);
|
|
21
|
+
}
|