twitter-openapi-typescript-generated 0.0.2 → 0.0.4
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/.openapi-generator/FILES +0 -1
- package/.openapi-generator/VERSION +1 -1
- package/.openapi-generator-ignore +2 -1
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/apis/DefaultApi.ts +4 -0
- package/src/apis/OtherApi.ts +4 -0
- package/src/apis/PostApi.ts +24 -0
- package/src/apis/TweetApi.ts +36 -0
- package/src/apis/UserApi.ts +4 -0
- package/src/apis/UserListApi.ts +8 -0
- package/src/apis/V11GetApi.ts +8 -0
- package/src/apis/V11PostApi.ts +8 -0
- package/src/apis/V20GetApi.ts +4 -0
- package/tools/openapi-generator-config.yaml +1 -1
- package/tools/win/replace.py +13 -0
- package/tsconfig.json +22 -20
- package/twitter-openapi/src/openapi/openapi-3.0.yaml +8 -1
- package/twitter-openapi/tools/__pycache__/build_config.cpython-310.pyc +0 -0
- package/twitter-openapi/tools/__pycache__/hooks.cpython-310.pyc +0 -0
- package/dist/apis/DefaultApi.d.ts +0 -31
- package/dist/apis/DefaultApi.js +0 -163
- package/dist/apis/OtherApi.d.ts +0 -26
- package/dist/apis/OtherApi.js +0 -145
- package/dist/apis/PostApi.d.ts +0 -84
- package/dist/apis/PostApi.js +0 -500
- package/dist/apis/TweetApi.d.ts +0 -135
- package/dist/apis/TweetApi.js +0 -827
- package/dist/apis/UserApi.d.ts +0 -31
- package/dist/apis/UserApi.js +0 -163
- package/dist/apis/UserListApi.d.ts +0 -44
- package/dist/apis/UserListApi.js +0 -246
- package/dist/apis/V11GetApi.d.ts +0 -60
- package/dist/apis/V11GetApi.js +0 -343
- package/dist/apis/V11PostApi.d.ts +0 -65
- package/dist/apis/V11PostApi.js +0 -399
- package/dist/apis/V20GetApi.d.ts +0 -64
- package/dist/apis/V20GetApi.js +0 -364
- package/dist/apis/index.d.ts +0 -9
- package/dist/apis/index.js +0 -27
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -21
- package/dist/models/BookmarksResponse.d.ts +0 -32
- package/dist/models/BookmarksResponse.js +0 -51
- package/dist/models/BookmarksResponseData.d.ts +0 -32
- package/dist/models/BookmarksResponseData.js +0 -51
- package/dist/models/BookmarksTimeline.d.ts +0 -32
- package/dist/models/BookmarksTimeline.js +0 -51
- package/dist/models/CommunitiesActions.d.ts +0 -31
- package/dist/models/CommunitiesActions.js +0 -50
- package/dist/models/ContentEntryType.d.ts +0 -24
- package/dist/models/ContentEntryType.js +0 -37
- package/dist/models/ContentItemType.d.ts +0 -24
- package/dist/models/ContentItemType.js +0 -37
- package/dist/models/ContentUnion.d.ts +0 -29
- package/dist/models/ContentUnion.js +0 -69
- package/dist/models/CreateRetweet.d.ts +0 -32
- package/dist/models/CreateRetweet.js +0 -51
- package/dist/models/CreateRetweetResponse.d.ts +0 -32
- package/dist/models/CreateRetweetResponse.js +0 -51
- package/dist/models/CreateRetweetResponseData.d.ts +0 -32
- package/dist/models/CreateRetweetResponseData.js +0 -51
- package/dist/models/CreateRetweetResponseResult.d.ts +0 -32
- package/dist/models/CreateRetweetResponseResult.js +0 -51
- package/dist/models/CreateTweet.d.ts +0 -32
- package/dist/models/CreateTweet.js +0 -51
- package/dist/models/CreateTweetResponse.d.ts +0 -32
- package/dist/models/CreateTweetResponse.js +0 -51
- package/dist/models/CreateTweetResponseData.d.ts +0 -32
- package/dist/models/CreateTweetResponseData.js +0 -51
- package/dist/models/CreateTweetResponseResult.d.ts +0 -32
- package/dist/models/CreateTweetResponseResult.js +0 -51
- package/dist/models/DeleteRetweetResponse.d.ts +0 -32
- package/dist/models/DeleteRetweetResponse.js +0 -51
- package/dist/models/DeleteRetweetResponseData.d.ts +0 -32
- package/dist/models/DeleteRetweetResponseData.js +0 -51
- package/dist/models/DeleteTweetResponse.d.ts +0 -32
- package/dist/models/DeleteTweetResponse.js +0 -51
- package/dist/models/DeleteTweetResponseData.d.ts +0 -32
- package/dist/models/DeleteTweetResponseData.js +0 -51
- package/dist/models/DeleteTweetResponseResult.d.ts +0 -31
- package/dist/models/DeleteTweetResponseResult.js +0 -50
- package/dist/models/Entities.d.ts +0 -56
- package/dist/models/Entities.js +0 -63
- package/dist/models/ExtendedEntities.d.ts +0 -32
- package/dist/models/ExtendedEntities.js +0 -51
- package/dist/models/FavoriteTweet.d.ts +0 -31
- package/dist/models/FavoriteTweet.js +0 -50
- package/dist/models/FavoriteTweetResponseData.d.ts +0 -32
- package/dist/models/FavoriteTweetResponseData.js +0 -51
- package/dist/models/FollowResponse.d.ts +0 -32
- package/dist/models/FollowResponse.js +0 -51
- package/dist/models/FollowResponseData.d.ts +0 -32
- package/dist/models/FollowResponseData.js +0 -51
- package/dist/models/FollowResponseResult.d.ts +0 -39
- package/dist/models/FollowResponseResult.js +0 -55
- package/dist/models/FollowResponseUser.d.ts +0 -32
- package/dist/models/FollowResponseUser.js +0 -51
- package/dist/models/FollowTimeline.d.ts +0 -32
- package/dist/models/FollowTimeline.js +0 -51
- package/dist/models/HomeTimelineHome.d.ts +0 -32
- package/dist/models/HomeTimelineHome.js +0 -51
- package/dist/models/HomeTimelineResponseData.d.ts +0 -32
- package/dist/models/HomeTimelineResponseData.js +0 -51
- package/dist/models/InstructionType.d.ts +0 -25
- package/dist/models/InstructionType.js +0 -38
- package/dist/models/InstructionUnion.d.ts +0 -32
- package/dist/models/InstructionUnion.js +0 -74
- package/dist/models/ItemContentUnion.d.ts +0 -29
- package/dist/models/ItemContentUnion.js +0 -69
- package/dist/models/ItemResult.d.ts +0 -39
- package/dist/models/ItemResult.js +0 -55
- package/dist/models/ListTweetsTimeline.d.ts +0 -32
- package/dist/models/ListTweetsTimeline.js +0 -51
- package/dist/models/ListTweetsTimelineData.d.ts +0 -32
- package/dist/models/ListTweetsTimelineData.js +0 -51
- package/dist/models/ListTweetsTimelineList.d.ts +0 -32
- package/dist/models/ListTweetsTimelineList.js +0 -51
- package/dist/models/ListTweetsTimelineResponse.d.ts +0 -32
- package/dist/models/ListTweetsTimelineResponse.js +0 -51
- package/dist/models/Media.d.ts +0 -92
- package/dist/models/Media.js +0 -80
- package/dist/models/MediaOriginalInfo.d.ts +0 -43
- package/dist/models/MediaOriginalInfo.js +0 -54
- package/dist/models/ModuleEntry.d.ts +0 -38
- package/dist/models/ModuleEntry.js +0 -54
- package/dist/models/ModuleItem.d.ts +0 -38
- package/dist/models/ModuleItem.js +0 -54
- package/dist/models/OneFactorLoginEligibility.d.ts +0 -31
- package/dist/models/OneFactorLoginEligibility.js +0 -50
- package/dist/models/OtherResponse.d.ts +0 -32
- package/dist/models/OtherResponse.js +0 -51
- package/dist/models/PostCreateRetweetRequest.d.ts +0 -38
- package/dist/models/PostCreateRetweetRequest.js +0 -54
- package/dist/models/PostCreateTweetRequest.d.ts +0 -45
- package/dist/models/PostCreateTweetRequest.js +0 -58
- package/dist/models/PostCreateTweetRequestFeatures.d.ts +0 -139
- package/dist/models/PostCreateTweetRequestFeatures.js +0 -104
- package/dist/models/PostCreateTweetRequestVariables.d.ts +0 -50
- package/dist/models/PostCreateTweetRequestVariables.js +0 -60
- package/dist/models/PostCreateTweetRequestVariablesMedia.d.ts +0 -37
- package/dist/models/PostCreateTweetRequestVariablesMedia.js +0 -53
- package/dist/models/PostDeleteRetweetRequest.d.ts +0 -38
- package/dist/models/PostDeleteRetweetRequest.js +0 -54
- package/dist/models/PostDeleteRetweetRequestVariables.d.ts +0 -37
- package/dist/models/PostDeleteRetweetRequestVariables.js +0 -53
- package/dist/models/PostDeleteTweetRequest.d.ts +0 -38
- package/dist/models/PostDeleteTweetRequest.js +0 -54
- package/dist/models/PostDeleteTweetRequestVariables.d.ts +0 -37
- package/dist/models/PostDeleteTweetRequestVariables.js +0 -53
- package/dist/models/PostFavoriteTweetRequest.d.ts +0 -38
- package/dist/models/PostFavoriteTweetRequest.js +0 -54
- package/dist/models/PostUnfavoriteTweetRequest.d.ts +0 -38
- package/dist/models/PostUnfavoriteTweetRequest.js +0 -54
- package/dist/models/ProfileResponse.d.ts +0 -32
- package/dist/models/ProfileResponse.js +0 -51
- package/dist/models/ProfileResponseData.d.ts +0 -32
- package/dist/models/ProfileResponseData.js +0 -51
- package/dist/models/Retweet.d.ts +0 -38
- package/dist/models/Retweet.js +0 -54
- package/dist/models/RetweetLegacy.d.ts +0 -31
- package/dist/models/RetweetLegacy.js +0 -50
- package/dist/models/Session.d.ts +0 -112
- package/dist/models/Session.js +0 -92
- package/dist/models/SocialContext.d.ts +0 -43
- package/dist/models/SocialContext.js +0 -54
- package/dist/models/Timeline.d.ts +0 -44
- package/dist/models/Timeline.js +0 -56
- package/dist/models/TimelineAddEntries.d.ts +0 -39
- package/dist/models/TimelineAddEntries.js +0 -55
- package/dist/models/TimelineAddEntry.d.ts +0 -44
- package/dist/models/TimelineAddEntry.js +0 -57
- package/dist/models/TimelineClearCache.d.ts +0 -32
- package/dist/models/TimelineClearCache.js +0 -51
- package/dist/models/TimelinePinEntry.d.ts +0 -39
- package/dist/models/TimelinePinEntry.js +0 -55
- package/dist/models/TimelineResponse.d.ts +0 -32
- package/dist/models/TimelineResponse.js +0 -51
- package/dist/models/TimelineTerminateTimeline.d.ts +0 -46
- package/dist/models/TimelineTerminateTimeline.js +0 -61
- package/dist/models/TimelineTimelineCursor.d.ts +0 -68
- package/dist/models/TimelineTimelineCursor.js +0 -73
- package/dist/models/TimelineTimelineItem.d.ts +0 -58
- package/dist/models/TimelineTimelineItem.js +0 -64
- package/dist/models/TimelineTimelineModule.d.ts +0 -70
- package/dist/models/TimelineTimelineModule.js +0 -69
- package/dist/models/TimelineTweet.d.ts +0 -65
- package/dist/models/TimelineTweet.js +0 -68
- package/dist/models/TimelineUser.d.ts +0 -59
- package/dist/models/TimelineUser.js +0 -66
- package/dist/models/TimelineV2.d.ts +0 -32
- package/dist/models/TimelineV2.js +0 -51
- package/dist/models/Tweet.d.ts +0 -92
- package/dist/models/Tweet.js +0 -82
- package/dist/models/TweetDetailResponse.d.ts +0 -32
- package/dist/models/TweetDetailResponse.js +0 -51
- package/dist/models/TweetDetailResponseData.d.ts +0 -32
- package/dist/models/TweetDetailResponseData.js +0 -51
- package/dist/models/TweetEditControl.d.ts +0 -49
- package/dist/models/TweetEditControl.js +0 -56
- package/dist/models/TweetEditPrespective.d.ts +0 -37
- package/dist/models/TweetEditPrespective.js +0 -52
- package/dist/models/TweetLegacy.d.ts +0 -154
- package/dist/models/TweetLegacy.js +0 -110
- package/dist/models/TweetTombstone.d.ts +0 -32
- package/dist/models/TweetTombstone.js +0 -51
- package/dist/models/TweetUnion.d.ts +0 -29
- package/dist/models/TweetUnion.js +0 -69
- package/dist/models/TweetViews.d.ts +0 -37
- package/dist/models/TweetViews.js +0 -52
- package/dist/models/TweetWithVisibilityResults.d.ts +0 -39
- package/dist/models/TweetWithVisibilityResults.js +0 -55
- package/dist/models/TypeName.d.ts +0 -30
- package/dist/models/TypeName.js +0 -43
- package/dist/models/UnfavoriteTweet.d.ts +0 -31
- package/dist/models/UnfavoriteTweet.js +0 -50
- package/dist/models/UnfavoriteTweetResponseData.d.ts +0 -32
- package/dist/models/UnfavoriteTweetResponseData.js +0 -51
- package/dist/models/User.d.ts +0 -99
- package/dist/models/User.js +0 -83
- package/dist/models/UserFeatures.d.ts +0 -31
- package/dist/models/UserFeatures.js +0 -50
- package/dist/models/UserLegacy.d.ts +0 -259
- package/dist/models/UserLegacy.js +0 -161
- package/dist/models/UserResponse.d.ts +0 -32
- package/dist/models/UserResponse.js +0 -51
- package/dist/models/UserResponseData.d.ts +0 -32
- package/dist/models/UserResponseData.js +0 -51
- package/dist/models/UserResultByScreenName.d.ts +0 -38
- package/dist/models/UserResultByScreenName.js +0 -54
- package/dist/models/UserResultByScreenNameLegacy.d.ts +0 -67
- package/dist/models/UserResultByScreenNameLegacy.js +0 -62
- package/dist/models/UserResultByScreenNameResult.d.ts +0 -57
- package/dist/models/UserResultByScreenNameResult.js +0 -64
- package/dist/models/UserResultCore.d.ts +0 -32
- package/dist/models/UserResultCore.js +0 -51
- package/dist/models/UserResults.d.ts +0 -32
- package/dist/models/UserResults.js +0 -51
- package/dist/models/UserTweetsData.d.ts +0 -32
- package/dist/models/UserTweetsData.js +0 -51
- package/dist/models/UserTweetsResponse.d.ts +0 -32
- package/dist/models/UserTweetsResponse.js +0 -51
- package/dist/models/UserTweetsResult.d.ts +0 -39
- package/dist/models/UserTweetsResult.js +0 -55
- package/dist/models/UserTweetsUser.d.ts +0 -32
- package/dist/models/UserTweetsUser.js +0 -51
- package/dist/models/index.d.ts +0 -102
- package/dist/models/index.js +0 -120
- package/dist/runtime.d.ts +0 -182
- package/dist/runtime.js +0 -555
- package/twitter-openapi/dist/dart/openapi-3.0.yaml +0 -111
- package/twitter-openapi/dist/dart/paths/bookmarks.yaml +0 -134
- package/twitter-openapi/dist/dart/paths/follow.yaml +0 -262
- package/twitter-openapi/dist/dart/paths/other.yaml +0 -96
- package/twitter-openapi/dist/dart/paths/post.yaml +0 -834
- package/twitter-openapi/dist/dart/paths/profile.yaml +0 -152
- package/twitter-openapi/dist/dart/paths/timeline.yaml +0 -380
- package/twitter-openapi/dist/dart/paths/tweet.yaml +0 -134
- package/twitter-openapi/dist/dart/paths/user.yaml +0 -112
- package/twitter-openapi/dist/dart/paths/usertweets.yaml +0 -484
- package/twitter-openapi/dist/dart/paths/v1.1-get.yaml +0 -300
- package/twitter-openapi/dist/dart/paths/v1.1-post.yaml +0 -295
- package/twitter-openapi/dist/dart/paths/v2.0-get.yaml +0 -331
- package/twitter-openapi/dist/dart/response/error.yaml +0 -90
- package/twitter-openapi/dist/dart/schemas/content.yaml +0 -181
- package/twitter-openapi/dist/dart/schemas/general.yaml +0 -13
- package/twitter-openapi/dist/dart/schemas/instruction.yaml +0 -83
- package/twitter-openapi/dist/dart/schemas/timeline.yaml +0 -25
- package/twitter-openapi/dist/dart/schemas/tweet.yaml +0 -251
- package/twitter-openapi/dist/dart/schemas/typename.yaml +0 -19
- package/twitter-openapi/dist/dart/schemas/user.yaml +0 -206
- package/twitter-openapi/dist/docs/openapi-3.0.yaml +0 -135
- package/twitter-openapi/dist/docs/paths/bookmarks.yaml +0 -248
- package/twitter-openapi/dist/docs/paths/follow.yaml +0 -486
- package/twitter-openapi/dist/docs/paths/other.yaml +0 -96
- package/twitter-openapi/dist/docs/paths/post.yaml +0 -638
- package/twitter-openapi/dist/docs/paths/profile.yaml +0 -159
- package/twitter-openapi/dist/docs/paths/timeline.yaml +0 -730
- package/twitter-openapi/dist/docs/paths/tweet.yaml +0 -272
- package/twitter-openapi/dist/docs/paths/user.yaml +0 -152
- package/twitter-openapi/dist/docs/paths/usertweets.yaml +0 -1010
- package/twitter-openapi/dist/docs/paths/v1.1-get.yaml +0 -242
- package/twitter-openapi/dist/docs/paths/v1.1-post.yaml +0 -237
- package/twitter-openapi/dist/docs/paths/v2.0-get.yaml +0 -302
- package/twitter-openapi/dist/docs/response/error.yaml +0 -90
- package/twitter-openapi/dist/docs/schemas/content.yaml +0 -181
- package/twitter-openapi/dist/docs/schemas/general.yaml +0 -13
- package/twitter-openapi/dist/docs/schemas/instruction.yaml +0 -83
- package/twitter-openapi/dist/docs/schemas/timeline.yaml +0 -25
- package/twitter-openapi/dist/docs/schemas/tweet.yaml +0 -251
- package/twitter-openapi/dist/docs/schemas/typename.yaml +0 -19
- package/twitter-openapi/dist/docs/schemas/user.yaml +0 -206
- package/twitter-openapi/dist/test/openapi-3.0.yaml +0 -135
- package/twitter-openapi/dist/test/paths/bookmarks.yaml +0 -105
- package/twitter-openapi/dist/test/paths/follow.yaml +0 -204
- package/twitter-openapi/dist/test/paths/other.yaml +0 -96
- package/twitter-openapi/dist/test/paths/post.yaml +0 -485
- package/twitter-openapi/dist/test/paths/profile.yaml +0 -123
- package/twitter-openapi/dist/test/paths/timeline.yaml +0 -293
- package/twitter-openapi/dist/test/paths/tweet.yaml +0 -105
- package/twitter-openapi/dist/test/paths/user.yaml +0 -83
- package/twitter-openapi/dist/test/paths/usertweets.yaml +0 -368
- package/twitter-openapi/dist/test/paths/v1.1-get.yaml +0 -242
- package/twitter-openapi/dist/test/paths/v1.1-post.yaml +0 -277
- package/twitter-openapi/dist/test/paths/v2.0-get.yaml +0 -302
- package/twitter-openapi/dist/test/response/error.yaml +0 -90
- package/twitter-openapi/dist/test/schemas/content.yaml +0 -181
- package/twitter-openapi/dist/test/schemas/general.yaml +0 -13
- package/twitter-openapi/dist/test/schemas/instruction.yaml +0 -83
- package/twitter-openapi/dist/test/schemas/timeline.yaml +0 -25
- package/twitter-openapi/dist/test/schemas/tweet.yaml +0 -251
- package/twitter-openapi/dist/test/schemas/typename.yaml +0 -19
- package/twitter-openapi/dist/test/schemas/user.yaml +0 -206
- package/twitter-openapi/dist/typescript/openapi-3.0.yaml +0 -135
- package/twitter-openapi/dist/typescript/paths/bookmarks.yaml +0 -105
- package/twitter-openapi/dist/typescript/paths/follow.yaml +0 -204
- package/twitter-openapi/dist/typescript/paths/other.yaml +0 -96
- package/twitter-openapi/dist/typescript/paths/post.yaml +0 -660
- package/twitter-openapi/dist/typescript/paths/profile.yaml +0 -123
- package/twitter-openapi/dist/typescript/paths/timeline.yaml +0 -293
- package/twitter-openapi/dist/typescript/paths/tweet.yaml +0 -105
- package/twitter-openapi/dist/typescript/paths/user.yaml +0 -83
- package/twitter-openapi/dist/typescript/paths/usertweets.yaml +0 -368
- package/twitter-openapi/dist/typescript/paths/v1.1-get.yaml +0 -242
- package/twitter-openapi/dist/typescript/paths/v1.1-post.yaml +0 -237
- package/twitter-openapi/dist/typescript/paths/v2.0-get.yaml +0 -302
- package/twitter-openapi/dist/typescript/response/error.yaml +0 -90
- package/twitter-openapi/dist/typescript/schemas/content.yaml +0 -181
- package/twitter-openapi/dist/typescript/schemas/general.yaml +0 -13
- package/twitter-openapi/dist/typescript/schemas/instruction.yaml +0 -83
- package/twitter-openapi/dist/typescript/schemas/timeline.yaml +0 -25
- package/twitter-openapi/dist/typescript/schemas/tweet.yaml +0 -251
- package/twitter-openapi/dist/typescript/schemas/typename.yaml +0 -19
- package/twitter-openapi/dist/typescript/schemas/user.yaml +0 -206
package/.openapi-generator/FILES
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.5.0
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## twitter-openapi-typescript-generated@0.0.
|
|
1
|
+
## twitter-openapi-typescript-generated@0.0.4
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install twitter-openapi-typescript-generated@0.0.
|
|
39
|
+
npm install twitter-openapi-typescript-generated@0.0.4 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/package.json
CHANGED
package/src/apis/DefaultApi.ts
CHANGED
|
@@ -85,6 +85,10 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
85
85
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
89
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
90
|
+
}
|
|
91
|
+
|
|
88
92
|
if (this.configuration && this.configuration.accessToken) {
|
|
89
93
|
const token = this.configuration.accessToken;
|
|
90
94
|
const tokenString = await token("BearerAuth", []);
|
package/src/apis/OtherApi.ts
CHANGED
|
@@ -55,6 +55,10 @@ export class OtherApi extends runtime.BaseAPI {
|
|
|
55
55
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
59
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
60
|
+
}
|
|
61
|
+
|
|
58
62
|
if (this.configuration && this.configuration.accessToken) {
|
|
59
63
|
const token = this.configuration.accessToken;
|
|
60
64
|
const tokenString = await token("BearerAuth", []);
|
package/src/apis/PostApi.ts
CHANGED
|
@@ -118,6 +118,10 @@ export class PostApi extends runtime.BaseAPI {
|
|
|
118
118
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
122
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
123
|
+
}
|
|
124
|
+
|
|
121
125
|
if (this.configuration && this.configuration.accessToken) {
|
|
122
126
|
const token = this.configuration.accessToken;
|
|
123
127
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -179,6 +183,10 @@ export class PostApi extends runtime.BaseAPI {
|
|
|
179
183
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
180
184
|
}
|
|
181
185
|
|
|
186
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
187
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
188
|
+
}
|
|
189
|
+
|
|
182
190
|
if (this.configuration && this.configuration.accessToken) {
|
|
183
191
|
const token = this.configuration.accessToken;
|
|
184
192
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -240,6 +248,10 @@ export class PostApi extends runtime.BaseAPI {
|
|
|
240
248
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
241
249
|
}
|
|
242
250
|
|
|
251
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
252
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
253
|
+
}
|
|
254
|
+
|
|
243
255
|
if (this.configuration && this.configuration.accessToken) {
|
|
244
256
|
const token = this.configuration.accessToken;
|
|
245
257
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -301,6 +313,10 @@ export class PostApi extends runtime.BaseAPI {
|
|
|
301
313
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
302
314
|
}
|
|
303
315
|
|
|
316
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
317
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
318
|
+
}
|
|
319
|
+
|
|
304
320
|
if (this.configuration && this.configuration.accessToken) {
|
|
305
321
|
const token = this.configuration.accessToken;
|
|
306
322
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -362,6 +378,10 @@ export class PostApi extends runtime.BaseAPI {
|
|
|
362
378
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
363
379
|
}
|
|
364
380
|
|
|
381
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
382
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
383
|
+
}
|
|
384
|
+
|
|
365
385
|
if (this.configuration && this.configuration.accessToken) {
|
|
366
386
|
const token = this.configuration.accessToken;
|
|
367
387
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -423,6 +443,10 @@ export class PostApi extends runtime.BaseAPI {
|
|
|
423
443
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
424
444
|
}
|
|
425
445
|
|
|
446
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
447
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
448
|
+
}
|
|
449
|
+
|
|
426
450
|
if (this.configuration && this.configuration.accessToken) {
|
|
427
451
|
const token = this.configuration.accessToken;
|
|
428
452
|
const tokenString = await token("BearerAuth", []);
|
package/src/apis/TweetApi.ts
CHANGED
|
@@ -145,6 +145,10 @@ export class TweetApi extends runtime.BaseAPI {
|
|
|
145
145
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
149
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
150
|
+
}
|
|
151
|
+
|
|
148
152
|
if (this.configuration && this.configuration.accessToken) {
|
|
149
153
|
const token = this.configuration.accessToken;
|
|
150
154
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -223,6 +227,10 @@ export class TweetApi extends runtime.BaseAPI {
|
|
|
223
227
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
224
228
|
}
|
|
225
229
|
|
|
230
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
231
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
232
|
+
}
|
|
233
|
+
|
|
226
234
|
if (this.configuration && this.configuration.accessToken) {
|
|
227
235
|
const token = this.configuration.accessToken;
|
|
228
236
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -301,6 +309,10 @@ export class TweetApi extends runtime.BaseAPI {
|
|
|
301
309
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
302
310
|
}
|
|
303
311
|
|
|
312
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
313
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
314
|
+
}
|
|
315
|
+
|
|
304
316
|
if (this.configuration && this.configuration.accessToken) {
|
|
305
317
|
const token = this.configuration.accessToken;
|
|
306
318
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -379,6 +391,10 @@ export class TweetApi extends runtime.BaseAPI {
|
|
|
379
391
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
380
392
|
}
|
|
381
393
|
|
|
394
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
395
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
396
|
+
}
|
|
397
|
+
|
|
382
398
|
if (this.configuration && this.configuration.accessToken) {
|
|
383
399
|
const token = this.configuration.accessToken;
|
|
384
400
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -457,6 +473,10 @@ export class TweetApi extends runtime.BaseAPI {
|
|
|
457
473
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
458
474
|
}
|
|
459
475
|
|
|
476
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
477
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
478
|
+
}
|
|
479
|
+
|
|
460
480
|
if (this.configuration && this.configuration.accessToken) {
|
|
461
481
|
const token = this.configuration.accessToken;
|
|
462
482
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -535,6 +555,10 @@ export class TweetApi extends runtime.BaseAPI {
|
|
|
535
555
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
536
556
|
}
|
|
537
557
|
|
|
558
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
559
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
560
|
+
}
|
|
561
|
+
|
|
538
562
|
if (this.configuration && this.configuration.accessToken) {
|
|
539
563
|
const token = this.configuration.accessToken;
|
|
540
564
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -613,6 +637,10 @@ export class TweetApi extends runtime.BaseAPI {
|
|
|
613
637
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
614
638
|
}
|
|
615
639
|
|
|
640
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
641
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
642
|
+
}
|
|
643
|
+
|
|
616
644
|
if (this.configuration && this.configuration.accessToken) {
|
|
617
645
|
const token = this.configuration.accessToken;
|
|
618
646
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -691,6 +719,10 @@ export class TweetApi extends runtime.BaseAPI {
|
|
|
691
719
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
692
720
|
}
|
|
693
721
|
|
|
722
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
723
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
724
|
+
}
|
|
725
|
+
|
|
694
726
|
if (this.configuration && this.configuration.accessToken) {
|
|
695
727
|
const token = this.configuration.accessToken;
|
|
696
728
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -769,6 +801,10 @@ export class TweetApi extends runtime.BaseAPI {
|
|
|
769
801
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
770
802
|
}
|
|
771
803
|
|
|
804
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
805
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
806
|
+
}
|
|
807
|
+
|
|
772
808
|
if (this.configuration && this.configuration.accessToken) {
|
|
773
809
|
const token = this.configuration.accessToken;
|
|
774
810
|
const tokenString = await token("BearerAuth", []);
|
package/src/apis/UserApi.ts
CHANGED
|
@@ -85,6 +85,10 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
85
85
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
89
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
90
|
+
}
|
|
91
|
+
|
|
88
92
|
if (this.configuration && this.configuration.accessToken) {
|
|
89
93
|
const token = this.configuration.accessToken;
|
|
90
94
|
const tokenString = await token("BearerAuth", []);
|
package/src/apis/UserListApi.ts
CHANGED
|
@@ -91,6 +91,10 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
91
91
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
95
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
96
|
+
}
|
|
97
|
+
|
|
94
98
|
if (this.configuration && this.configuration.accessToken) {
|
|
95
99
|
const token = this.configuration.accessToken;
|
|
96
100
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -169,6 +173,10 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
169
173
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
170
174
|
}
|
|
171
175
|
|
|
176
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
177
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
178
|
+
}
|
|
179
|
+
|
|
172
180
|
if (this.configuration && this.configuration.accessToken) {
|
|
173
181
|
const token = this.configuration.accessToken;
|
|
174
182
|
const tokenString = await token("BearerAuth", []);
|
package/src/apis/V11GetApi.ts
CHANGED
|
@@ -213,6 +213,10 @@ export class V11GetApi extends runtime.BaseAPI {
|
|
|
213
213
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
217
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
218
|
+
}
|
|
219
|
+
|
|
216
220
|
if (this.configuration && this.configuration.accessToken) {
|
|
217
221
|
const token = this.configuration.accessToken;
|
|
218
222
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -314,6 +318,10 @@ export class V11GetApi extends runtime.BaseAPI {
|
|
|
314
318
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
315
319
|
}
|
|
316
320
|
|
|
321
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
322
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
323
|
+
}
|
|
324
|
+
|
|
317
325
|
if (this.configuration && this.configuration.accessToken) {
|
|
318
326
|
const token = this.configuration.accessToken;
|
|
319
327
|
const tokenString = await token("BearerAuth", []);
|
package/src/apis/V11PostApi.ts
CHANGED
|
@@ -138,6 +138,10 @@ export class V11PostApi extends runtime.BaseAPI {
|
|
|
138
138
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
142
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
143
|
+
}
|
|
144
|
+
|
|
141
145
|
if (this.configuration && this.configuration.accessToken) {
|
|
142
146
|
const token = this.configuration.accessToken;
|
|
143
147
|
const tokenString = await token("BearerAuth", []);
|
|
@@ -318,6 +322,10 @@ export class V11PostApi extends runtime.BaseAPI {
|
|
|
318
322
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
319
323
|
}
|
|
320
324
|
|
|
325
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
326
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
327
|
+
}
|
|
328
|
+
|
|
321
329
|
if (this.configuration && this.configuration.accessToken) {
|
|
322
330
|
const token = this.configuration.accessToken;
|
|
323
331
|
const tokenString = await token("BearerAuth", []);
|
package/src/apis/V20GetApi.ts
CHANGED
|
@@ -384,6 +384,10 @@ export class V20GetApi extends runtime.BaseAPI {
|
|
|
384
384
|
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
388
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
389
|
+
}
|
|
390
|
+
|
|
387
391
|
if (this.configuration && this.configuration.accessToken) {
|
|
388
392
|
const token = this.configuration.accessToken;
|
|
389
393
|
const tokenString = await token("BearerAuth", []);
|
package/tools/win/replace.py
CHANGED
|
@@ -37,4 +37,17 @@ package.update({
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
with open("package.json", mode="w", encoding="utf-8") as f:
|
|
40
|
+
json.dump(package, f, ensure_ascii=False, indent=2)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
with open("tsconfig.json", mode="r", encoding="utf-8") as f:
|
|
44
|
+
package = json.load(f)
|
|
45
|
+
package["compilerOptions"].update({
|
|
46
|
+
"declaration": True,
|
|
47
|
+
"declarationMap": True,
|
|
48
|
+
"sourceMap": True,
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
with open("tsconfig.json", mode="w", encoding="utf-8") as f:
|
|
40
53
|
json.dump(package, f, ensure_ascii=False, indent=2)
|
package/tsconfig.json
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"target": "es5",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"outDir": "dist",
|
|
8
|
-
"lib": [
|
|
9
|
-
"es6",
|
|
10
|
-
"dom"
|
|
11
|
-
],
|
|
12
|
-
"typeRoots": [
|
|
13
|
-
"node_modules/@types"
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"declaration": true,
|
|
4
|
+
"target": "es5",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"outDir": "dist",
|
|
8
|
+
"lib": [
|
|
9
|
+
"es6",
|
|
10
|
+
"dom"
|
|
11
|
+
],
|
|
12
|
+
"typeRoots": [
|
|
13
|
+
"node_modules/@types"
|
|
14
|
+
],
|
|
15
|
+
"declarationMap": true,
|
|
16
|
+
"sourceMap": true
|
|
17
|
+
},
|
|
18
|
+
"exclude": [
|
|
19
|
+
"dist",
|
|
20
|
+
"node_modules"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -22,7 +22,7 @@ components:
|
|
|
22
22
|
type: apiKey
|
|
23
23
|
in: header
|
|
24
24
|
name: x-csrf-token
|
|
25
|
-
description: "
|
|
25
|
+
description: ""
|
|
26
26
|
|
|
27
27
|
CookieCt0:
|
|
28
28
|
type: apiKey
|
|
@@ -30,6 +30,12 @@ components:
|
|
|
30
30
|
name: ct0
|
|
31
31
|
description: "document.cookie.split('; ').find(row => row.startsWith('ct0='));"
|
|
32
32
|
|
|
33
|
+
GuestToken:
|
|
34
|
+
type: apiKey
|
|
35
|
+
in: header
|
|
36
|
+
name: x-guest-token
|
|
37
|
+
description: "document.cookie.split('; ').find(row => row.startsWith('gt='));"
|
|
38
|
+
|
|
33
39
|
CookieAuthToken:
|
|
34
40
|
type: apiKey
|
|
35
41
|
in: cookie
|
|
@@ -45,6 +51,7 @@ components:
|
|
|
45
51
|
security:
|
|
46
52
|
- CsrfToken: []
|
|
47
53
|
- CookieCt0: []
|
|
54
|
+
- GuestToken: []
|
|
48
55
|
- CookieAuthToken: []
|
|
49
56
|
- AuthType: []
|
|
50
57
|
tags:
|
|
Binary file
|
|
Binary file
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Twitter OpenAPI
|
|
3
|
-
* Twitter OpenAPI(Swagger) specification
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.0.1
|
|
6
|
-
* Contact: yuki@yuki0311.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import * as runtime from '../runtime';
|
|
13
|
-
import type { ProfileResponse } from '../models';
|
|
14
|
-
export interface GetProfileSpotlightsQueryRequest {
|
|
15
|
-
queryId: string;
|
|
16
|
-
variables: string;
|
|
17
|
-
features: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
export declare class DefaultApi extends runtime.BaseAPI {
|
|
23
|
-
/**
|
|
24
|
-
* get user by screen name
|
|
25
|
-
*/
|
|
26
|
-
getProfileSpotlightsQueryRaw(requestParameters: GetProfileSpotlightsQueryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProfileResponse>>;
|
|
27
|
-
/**
|
|
28
|
-
* get user by screen name
|
|
29
|
-
*/
|
|
30
|
-
getProfileSpotlightsQuery(requestParameters: GetProfileSpotlightsQueryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProfileResponse>;
|
|
31
|
-
}
|
package/dist/apis/DefaultApi.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Twitter OpenAPI
|
|
6
|
-
* Twitter OpenAPI(Swagger) specification
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.0.1
|
|
9
|
-
* Contact: yuki@yuki0311.com
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __extends = (this && this.__extends) || (function () {
|
|
16
|
-
var extendStatics = function (d, b) {
|
|
17
|
-
extendStatics = Object.setPrototypeOf ||
|
|
18
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
if (typeof b !== "function" && b !== null)
|
|
24
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
41
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
-
function step(op) {
|
|
44
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
46
|
-
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;
|
|
47
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
-
switch (op[0]) {
|
|
49
|
-
case 0: case 1: t = op; break;
|
|
50
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
-
default:
|
|
54
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
-
if (t[2]) _.ops.pop();
|
|
59
|
-
_.trys.pop(); continue;
|
|
60
|
-
}
|
|
61
|
-
op = body.call(thisArg, _);
|
|
62
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
-
exports.DefaultApi = void 0;
|
|
68
|
-
var runtime = require("../runtime");
|
|
69
|
-
var models_1 = require("../models");
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
var DefaultApi = /** @class */ (function (_super) {
|
|
74
|
-
__extends(DefaultApi, _super);
|
|
75
|
-
function DefaultApi() {
|
|
76
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* get user by screen name
|
|
80
|
-
*/
|
|
81
|
-
DefaultApi.prototype.getProfileSpotlightsQueryRaw = function (requestParameters, initOverrides) {
|
|
82
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
84
|
-
return __generator(this, function (_a) {
|
|
85
|
-
switch (_a.label) {
|
|
86
|
-
case 0:
|
|
87
|
-
if (requestParameters.queryId === null || requestParameters.queryId === undefined) {
|
|
88
|
-
throw new runtime.RequiredError('queryId', 'Required parameter requestParameters.queryId was null or undefined when calling getProfileSpotlightsQuery.');
|
|
89
|
-
}
|
|
90
|
-
if (requestParameters.variables === null || requestParameters.variables === undefined) {
|
|
91
|
-
throw new runtime.RequiredError('variables', 'Required parameter requestParameters.variables was null or undefined when calling getProfileSpotlightsQuery.');
|
|
92
|
-
}
|
|
93
|
-
if (requestParameters.features === null || requestParameters.features === undefined) {
|
|
94
|
-
throw new runtime.RequiredError('features', 'Required parameter requestParameters.features was null or undefined when calling getProfileSpotlightsQuery.');
|
|
95
|
-
}
|
|
96
|
-
queryParameters = {};
|
|
97
|
-
if (requestParameters.queryId !== undefined) {
|
|
98
|
-
queryParameters['queryId'] = requestParameters.queryId;
|
|
99
|
-
}
|
|
100
|
-
if (requestParameters.variables !== undefined) {
|
|
101
|
-
queryParameters['variables'] = requestParameters.variables;
|
|
102
|
-
}
|
|
103
|
-
if (requestParameters.features !== undefined) {
|
|
104
|
-
queryParameters['features'] = requestParameters.features;
|
|
105
|
-
}
|
|
106
|
-
headerParameters = {};
|
|
107
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
108
|
-
headerParameters["x-twitter-client-language"] = this.configuration.apiKey("x-twitter-client-language"); // ClientLanguage authentication
|
|
109
|
-
}
|
|
110
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
111
|
-
headerParameters["x-twitter-active-user"] = this.configuration.apiKey("x-twitter-active-user"); // ActiveUser authentication
|
|
112
|
-
}
|
|
113
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
114
|
-
headerParameters["user-agent"] = this.configuration.apiKey("user-agent"); // UserAgent authentication
|
|
115
|
-
}
|
|
116
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
117
|
-
headerParameters["x-twitter-auth-type"] = this.configuration.apiKey("x-twitter-auth-type"); // AuthType authentication
|
|
118
|
-
}
|
|
119
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
120
|
-
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
121
|
-
}
|
|
122
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
123
|
-
token = this.configuration.accessToken;
|
|
124
|
-
return [4 /*yield*/, token("BearerAuth", [])];
|
|
125
|
-
case 1:
|
|
126
|
-
tokenString = _a.sent();
|
|
127
|
-
if (tokenString) {
|
|
128
|
-
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
129
|
-
}
|
|
130
|
-
_a.label = 2;
|
|
131
|
-
case 2: return [4 /*yield*/, this.request({
|
|
132
|
-
path: "/graphql/9zwVLJ48lmVUk8u_Gh9DmA/ProfileSpotlightsQuery",
|
|
133
|
-
method: 'GET',
|
|
134
|
-
headers: headerParameters,
|
|
135
|
-
query: queryParameters,
|
|
136
|
-
}, initOverrides)];
|
|
137
|
-
case 3:
|
|
138
|
-
response = _a.sent();
|
|
139
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ProfileResponseFromJSON)(jsonValue); })];
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* get user by screen name
|
|
146
|
-
*/
|
|
147
|
-
DefaultApi.prototype.getProfileSpotlightsQuery = function (requestParameters, initOverrides) {
|
|
148
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
149
|
-
var response;
|
|
150
|
-
return __generator(this, function (_a) {
|
|
151
|
-
switch (_a.label) {
|
|
152
|
-
case 0: return [4 /*yield*/, this.getProfileSpotlightsQueryRaw(requestParameters, initOverrides)];
|
|
153
|
-
case 1:
|
|
154
|
-
response = _a.sent();
|
|
155
|
-
return [4 /*yield*/, response.value()];
|
|
156
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
};
|
|
161
|
-
return DefaultApi;
|
|
162
|
-
}(runtime.BaseAPI));
|
|
163
|
-
exports.DefaultApi = DefaultApi;
|
package/dist/apis/OtherApi.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Twitter OpenAPI
|
|
3
|
-
* Twitter OpenAPI(Swagger) specification
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.0.1
|
|
6
|
-
* Contact: yuki@yuki0311.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import * as runtime from '../runtime';
|
|
13
|
-
import type { OtherResponse } from '../models';
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
export declare class OtherApi extends runtime.BaseAPI {
|
|
18
|
-
/**
|
|
19
|
-
* This is not an actual endpoint
|
|
20
|
-
*/
|
|
21
|
-
otherRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OtherResponse>>;
|
|
22
|
-
/**
|
|
23
|
-
* This is not an actual endpoint
|
|
24
|
-
*/
|
|
25
|
-
other(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OtherResponse>;
|
|
26
|
-
}
|