twitter-openapi-typescript-generated 0.0.21 → 0.0.22
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/README.md +2 -2
- package/dist/apis/PostApi.d.ts +25 -1
- package/dist/apis/PostApi.d.ts.map +1 -1
- package/dist/apis/PostApi.js +388 -0
- package/dist/apis/PostApi.js.map +1 -1
- package/dist/models/AllowDownloadStatus.d.ts +32 -0
- package/dist/models/AllowDownloadStatus.d.ts.map +1 -0
- package/dist/models/AllowDownloadStatus.js +48 -0
- package/dist/models/AllowDownloadStatus.js.map +1 -0
- package/dist/models/ArticleLifecycleState.d.ts +32 -0
- package/dist/models/ArticleLifecycleState.d.ts.map +1 -0
- package/dist/models/ArticleLifecycleState.js +48 -0
- package/dist/models/ArticleLifecycleState.js.map +1 -0
- package/dist/models/ArticleMetadata.d.ts +32 -0
- package/dist/models/ArticleMetadata.d.ts.map +1 -0
- package/dist/models/ArticleMetadata.js +48 -0
- package/dist/models/ArticleMetadata.js.map +1 -0
- package/dist/models/ArticleResult.d.ts +14 -0
- package/dist/models/ArticleResult.d.ts.map +1 -1
- package/dist/models/ArticleResult.js +8 -0
- package/dist/models/ArticleResult.js.map +1 -1
- package/dist/models/CreateBookmarkResponse.d.ts +33 -0
- package/dist/models/CreateBookmarkResponse.d.ts.map +1 -0
- package/dist/models/CreateBookmarkResponse.js +49 -0
- package/dist/models/CreateBookmarkResponse.js.map +1 -0
- package/dist/models/CreateBookmarkResponseData.d.ts +32 -0
- package/dist/models/CreateBookmarkResponseData.d.ts.map +1 -0
- package/dist/models/CreateBookmarkResponseData.js +48 -0
- package/dist/models/CreateBookmarkResponseData.js.map +1 -0
- package/dist/models/DeleteBookmarkResponse.d.ts +33 -0
- package/dist/models/DeleteBookmarkResponse.d.ts.map +1 -0
- package/dist/models/DeleteBookmarkResponse.js +49 -0
- package/dist/models/DeleteBookmarkResponse.js.map +1 -0
- package/dist/models/DeleteBookmarkResponseData.d.ts +32 -0
- package/dist/models/DeleteBookmarkResponseData.d.ts.map +1 -0
- package/dist/models/DeleteBookmarkResponseData.js +48 -0
- package/dist/models/DeleteBookmarkResponseData.js.map +1 -0
- package/dist/models/Media.d.ts +20 -8
- package/dist/models/Media.d.ts.map +1 -1
- package/dist/models/Media.js +12 -4
- package/dist/models/Media.js.map +1 -1
- package/dist/models/MediaExtended.d.ts +14 -0
- package/dist/models/MediaExtended.d.ts.map +1 -1
- package/dist/models/MediaExtended.js +6 -0
- package/dist/models/MediaExtended.js.map +1 -1
- package/dist/models/MediaResult.d.ts +32 -0
- package/dist/models/MediaResult.d.ts.map +1 -0
- package/dist/models/MediaResult.js +48 -0
- package/dist/models/MediaResult.js.map +1 -0
- package/dist/models/MediaResults.d.ts +33 -0
- package/dist/models/MediaResults.d.ts.map +1 -0
- package/dist/models/MediaResults.js +49 -0
- package/dist/models/MediaResults.js.map +1 -0
- package/dist/models/MediaVisibilityResults.d.ts +33 -0
- package/dist/models/MediaVisibilityResults.d.ts.map +1 -0
- package/dist/models/MediaVisibilityResults.js +49 -0
- package/dist/models/MediaVisibilityResults.js.map +1 -0
- package/dist/models/MediaVisibilityResultsBlurredImageInterstitial.d.ts +45 -0
- package/dist/models/MediaVisibilityResultsBlurredImageInterstitial.d.ts.map +1 -0
- package/dist/models/MediaVisibilityResultsBlurredImageInterstitial.js +57 -0
- package/dist/models/MediaVisibilityResultsBlurredImageInterstitial.js.map +1 -0
- package/dist/models/PostCreateBookmark200Response.d.ts +23 -0
- package/dist/models/PostCreateBookmark200Response.d.ts.map +1 -0
- package/dist/models/PostCreateBookmark200Response.js +54 -0
- package/dist/models/PostCreateBookmark200Response.js.map +1 -0
- package/dist/models/PostCreateBookmarkRequest.d.ts +39 -0
- package/dist/models/PostCreateBookmarkRequest.d.ts.map +1 -0
- package/dist/models/PostCreateBookmarkRequest.js +53 -0
- package/dist/models/PostCreateBookmarkRequest.js.map +1 -0
- package/dist/models/PostCreateBookmarkRequestVariables.d.ts +32 -0
- package/dist/models/PostCreateBookmarkRequestVariables.d.ts.map +1 -0
- package/dist/models/PostCreateBookmarkRequestVariables.js +48 -0
- package/dist/models/PostCreateBookmarkRequestVariables.js.map +1 -0
- package/dist/models/PostDeleteBookmark200Response.d.ts +23 -0
- package/dist/models/PostDeleteBookmark200Response.d.ts.map +1 -0
- package/dist/models/PostDeleteBookmark200Response.js +54 -0
- package/dist/models/PostDeleteBookmark200Response.js.map +1 -0
- package/dist/models/PostDeleteBookmarkRequest.d.ts +39 -0
- package/dist/models/PostDeleteBookmarkRequest.d.ts.map +1 -0
- package/dist/models/PostDeleteBookmarkRequest.js +53 -0
- package/dist/models/PostDeleteBookmarkRequest.js.map +1 -0
- package/dist/models/TweetWithVisibilityResults.d.ts +7 -0
- package/dist/models/TweetWithVisibilityResults.d.ts.map +1 -1
- package/dist/models/TweetWithVisibilityResults.js +3 -0
- package/dist/models/TweetWithVisibilityResults.js.map +1 -1
- package/dist/models/Url.d.ts +1 -1
- package/dist/models/Url.d.ts.map +1 -1
- package/dist/models/Url.js +1 -3
- package/dist/models/Url.js.map +1 -1
- package/dist/models/User.d.ts +14 -0
- package/dist/models/User.d.ts.map +1 -1
- package/dist/models/User.js +6 -0
- package/dist/models/User.js.map +1 -1
- package/dist/models/UserLegacyExtendedProfile.d.ts +33 -0
- package/dist/models/UserLegacyExtendedProfile.d.ts.map +1 -0
- package/dist/models/UserLegacyExtendedProfile.js +47 -0
- package/dist/models/UserLegacyExtendedProfile.js.map +1 -0
- package/dist/models/UserLegacyExtendedProfileBirthdate.d.ts +78 -0
- package/dist/models/UserLegacyExtendedProfileBirthdate.d.ts.map +1 -0
- package/dist/models/UserLegacyExtendedProfileBirthdate.js +84 -0
- package/dist/models/UserLegacyExtendedProfileBirthdate.js.map +1 -0
- package/dist/models/UserTipJarSettings.d.ts +68 -0
- package/dist/models/UserTipJarSettings.d.ts.map +1 -0
- package/dist/models/UserTipJarSettings.js +58 -0
- package/dist/models/UserTipJarSettings.js.map +1 -0
- package/dist/models/index.d.ts +19 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +19 -0
- package/dist/models/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## twitter-openapi-typescript-generated@0.0.
|
|
1
|
+
## twitter-openapi-typescript-generated@0.0.22
|
|
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.22 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/dist/apis/PostApi.d.ts
CHANGED
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { PostCreateRetweet200Response, PostCreateRetweetRequest, PostCreateTweet200Response, PostCreateTweetRequest, PostDeleteRetweet200Response, PostDeleteRetweetRequest, PostDeleteTweet200Response, PostDeleteTweetRequest, PostFavoriteTweet200Response, PostFavoriteTweetRequest, PostUnfavoriteTweet200Response, PostUnfavoriteTweetRequest } from '../models/index';
|
|
13
|
+
import type { PostCreateBookmark200Response, PostCreateBookmarkRequest, PostCreateRetweet200Response, PostCreateRetweetRequest, PostCreateTweet200Response, PostCreateTweetRequest, PostDeleteBookmark200Response, PostDeleteBookmarkRequest, PostDeleteRetweet200Response, PostDeleteRetweetRequest, PostDeleteTweet200Response, PostDeleteTweetRequest, PostFavoriteTweet200Response, PostFavoriteTweetRequest, PostUnfavoriteTweet200Response, PostUnfavoriteTweetRequest } from '../models/index';
|
|
14
|
+
export interface PostCreateBookmarkOperationRequest {
|
|
15
|
+
pathQueryId: string;
|
|
16
|
+
postCreateBookmarkRequest: PostCreateBookmarkRequest;
|
|
17
|
+
}
|
|
14
18
|
export interface PostCreateRetweetOperationRequest {
|
|
15
19
|
pathQueryId: string;
|
|
16
20
|
postCreateRetweetRequest: PostCreateRetweetRequest;
|
|
@@ -19,6 +23,10 @@ export interface PostCreateTweetOperationRequest {
|
|
|
19
23
|
pathQueryId: string;
|
|
20
24
|
postCreateTweetRequest: PostCreateTweetRequest;
|
|
21
25
|
}
|
|
26
|
+
export interface PostDeleteBookmarkOperationRequest {
|
|
27
|
+
pathQueryId: string;
|
|
28
|
+
postDeleteBookmarkRequest: PostDeleteBookmarkRequest;
|
|
29
|
+
}
|
|
22
30
|
export interface PostDeleteRetweetOperationRequest {
|
|
23
31
|
pathQueryId: string;
|
|
24
32
|
postDeleteRetweetRequest: PostDeleteRetweetRequest;
|
|
@@ -39,6 +47,14 @@ export interface PostUnfavoriteTweetOperationRequest {
|
|
|
39
47
|
*
|
|
40
48
|
*/
|
|
41
49
|
export declare class PostApi extends runtime.BaseAPI {
|
|
50
|
+
/**
|
|
51
|
+
* create Bookmark
|
|
52
|
+
*/
|
|
53
|
+
postCreateBookmarkRaw(requestParameters: PostCreateBookmarkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostCreateBookmark200Response>>;
|
|
54
|
+
/**
|
|
55
|
+
* create Bookmark
|
|
56
|
+
*/
|
|
57
|
+
postCreateBookmark(requestParameters: PostCreateBookmarkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostCreateBookmark200Response>;
|
|
42
58
|
/**
|
|
43
59
|
* create Retweet
|
|
44
60
|
*/
|
|
@@ -55,6 +71,14 @@ export declare class PostApi extends runtime.BaseAPI {
|
|
|
55
71
|
* create Tweet
|
|
56
72
|
*/
|
|
57
73
|
postCreateTweet(requestParameters: PostCreateTweetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostCreateTweet200Response>;
|
|
74
|
+
/**
|
|
75
|
+
* delete Bookmark
|
|
76
|
+
*/
|
|
77
|
+
postDeleteBookmarkRaw(requestParameters: PostDeleteBookmarkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostDeleteBookmark200Response>>;
|
|
78
|
+
/**
|
|
79
|
+
* delete Bookmark
|
|
80
|
+
*/
|
|
81
|
+
postDeleteBookmark(requestParameters: PostDeleteBookmarkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostDeleteBookmark200Response>;
|
|
58
82
|
/**
|
|
59
83
|
* delete Retweet
|
|
60
84
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostApi.d.ts","sourceRoot":"","sources":["../../src/apis/PostApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,4BAA4B,EAC5B,wBAAwB,EACxB,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"PostApi.d.ts","sourceRoot":"","sources":["../../src/apis/PostApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EACV,6BAA6B,EAC7B,yBAAyB,EACzB,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,6BAA6B,EAC7B,yBAAyB,EACzB,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,4BAA4B,EAC5B,wBAAwB,EACxB,8BAA8B,EAC9B,0BAA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,4BAA4B,CAAC;IAKhL;;OAEG;IACG,kBAAkB,CAAC,iBAAiB,EAAE,+BAA+B,EAAE,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,0BAA0B,CAAC,CAAC;IA4GlM;;OAEG;IACG,eAAe,CAAC,iBAAiB,EAAE,+BAA+B,EAAE,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAK1K;;OAEG;IACG,oBAAoB,CAAC,iBAAiB,EAAE,iCAAiC,EAAE,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;IA4GxM;;OAEG;IACG,iBAAiB,CAAC,iBAAiB,EAAE,iCAAiC,EAAE,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,4BAA4B,CAAC;IAKhL;;OAEG;IACG,sBAAsB,CAAC,iBAAiB,EAAE,mCAAmC,EAAE,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,8BAA8B,CAAC,CAAC;IA4G9M;;OAEG;IACG,mBAAmB,CAAC,iBAAiB,EAAE,mCAAmC,EAAE,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,8BAA8B,CAAC;CAKzL"}
|
package/dist/apis/PostApi.js
CHANGED
|
@@ -75,6 +75,200 @@ var PostApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function PostApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* create Bookmark
|
|
80
|
+
*/
|
|
81
|
+
PostApi.prototype.postCreateBookmarkRaw = function (requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, token, tokenString, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, response;
|
|
84
|
+
return __generator(this, function (_10) {
|
|
85
|
+
switch (_10.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters['pathQueryId'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling postCreateBookmark().');
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters['postCreateBookmarkRequest'] == null) {
|
|
91
|
+
throw new runtime.RequiredError('postCreateBookmarkRequest', 'Required parameter "postCreateBookmarkRequest" was null or undefined when calling postCreateBookmark().');
|
|
92
|
+
}
|
|
93
|
+
queryParameters = {};
|
|
94
|
+
headerParameters = {};
|
|
95
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
96
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
97
|
+
_a = headerParameters;
|
|
98
|
+
_b = "x-twitter-client-language";
|
|
99
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
100
|
+
case 1:
|
|
101
|
+
_a[_b] = _10.sent(); // ClientLanguage authentication
|
|
102
|
+
_10.label = 2;
|
|
103
|
+
case 2:
|
|
104
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
105
|
+
_c = headerParameters;
|
|
106
|
+
_d = "Accept";
|
|
107
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
108
|
+
case 3:
|
|
109
|
+
_c[_d] = _10.sent(); // Accept authentication
|
|
110
|
+
_10.label = 4;
|
|
111
|
+
case 4:
|
|
112
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
113
|
+
_e = headerParameters;
|
|
114
|
+
_f = "Priority";
|
|
115
|
+
return [4 /*yield*/, this.configuration.apiKey("Priority")];
|
|
116
|
+
case 5:
|
|
117
|
+
_e[_f] = _10.sent(); // Priority authentication
|
|
118
|
+
_10.label = 6;
|
|
119
|
+
case 6:
|
|
120
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
121
|
+
_g = headerParameters;
|
|
122
|
+
_h = "Sec-Fetch-Dest";
|
|
123
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
124
|
+
case 7:
|
|
125
|
+
_g[_h] = _10.sent(); // SecFetchDest authentication
|
|
126
|
+
_10.label = 8;
|
|
127
|
+
case 8:
|
|
128
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
129
|
+
_j = headerParameters;
|
|
130
|
+
_k = "Referer";
|
|
131
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
132
|
+
case 9:
|
|
133
|
+
_j[_k] = _10.sent(); // Referer authentication
|
|
134
|
+
_10.label = 10;
|
|
135
|
+
case 10:
|
|
136
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
137
|
+
_l = headerParameters;
|
|
138
|
+
_m = "Sec-Ch-Ua-Platform";
|
|
139
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
140
|
+
case 11:
|
|
141
|
+
_l[_m] = _10.sent(); // SecChUaPlatform authentication
|
|
142
|
+
_10.label = 12;
|
|
143
|
+
case 12:
|
|
144
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
145
|
+
_o = headerParameters;
|
|
146
|
+
_p = "Sec-Fetch-Mode";
|
|
147
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
148
|
+
case 13:
|
|
149
|
+
_o[_p] = _10.sent(); // SecFetchMode authentication
|
|
150
|
+
_10.label = 14;
|
|
151
|
+
case 14:
|
|
152
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
153
|
+
_q = headerParameters;
|
|
154
|
+
_r = "x-csrf-token";
|
|
155
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
156
|
+
case 15:
|
|
157
|
+
_q[_r] = _10.sent(); // CsrfToken authentication
|
|
158
|
+
_10.label = 16;
|
|
159
|
+
case 16:
|
|
160
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 18];
|
|
161
|
+
_s = headerParameters;
|
|
162
|
+
_t = "x-guest-token";
|
|
163
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
164
|
+
case 17:
|
|
165
|
+
_s[_t] = _10.sent(); // GuestToken authentication
|
|
166
|
+
_10.label = 18;
|
|
167
|
+
case 18:
|
|
168
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
169
|
+
token = this.configuration.accessToken;
|
|
170
|
+
return [4 /*yield*/, token("BearerAuth", [])];
|
|
171
|
+
case 19:
|
|
172
|
+
tokenString = _10.sent();
|
|
173
|
+
if (tokenString) {
|
|
174
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
175
|
+
}
|
|
176
|
+
_10.label = 20;
|
|
177
|
+
case 20:
|
|
178
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
179
|
+
_u = headerParameters;
|
|
180
|
+
_v = "Sec-Ch-Ua";
|
|
181
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
182
|
+
case 21:
|
|
183
|
+
_u[_v] = _10.sent(); // SecChUa authentication
|
|
184
|
+
_10.label = 22;
|
|
185
|
+
case 22:
|
|
186
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
187
|
+
_w = headerParameters;
|
|
188
|
+
_x = "x-twitter-active-user";
|
|
189
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
190
|
+
case 23:
|
|
191
|
+
_w[_x] = _10.sent(); // ActiveUser authentication
|
|
192
|
+
_10.label = 24;
|
|
193
|
+
case 24:
|
|
194
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
195
|
+
_y = headerParameters;
|
|
196
|
+
_z = "user-agent";
|
|
197
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
198
|
+
case 25:
|
|
199
|
+
_y[_z] = _10.sent(); // UserAgent authentication
|
|
200
|
+
_10.label = 26;
|
|
201
|
+
case 26:
|
|
202
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
203
|
+
_0 = headerParameters;
|
|
204
|
+
_1 = "Accept-Language";
|
|
205
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
206
|
+
case 27:
|
|
207
|
+
_0[_1] = _10.sent(); // AcceptLanguage authentication
|
|
208
|
+
_10.label = 28;
|
|
209
|
+
case 28:
|
|
210
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
211
|
+
_2 = headerParameters;
|
|
212
|
+
_3 = "Sec-Fetch-Site";
|
|
213
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
214
|
+
case 29:
|
|
215
|
+
_2[_3] = _10.sent(); // SecFetchSite authentication
|
|
216
|
+
_10.label = 30;
|
|
217
|
+
case 30:
|
|
218
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
219
|
+
_4 = headerParameters;
|
|
220
|
+
_5 = "x-twitter-auth-type";
|
|
221
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
222
|
+
case 31:
|
|
223
|
+
_4[_5] = _10.sent(); // AuthType authentication
|
|
224
|
+
_10.label = 32;
|
|
225
|
+
case 32:
|
|
226
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
227
|
+
_6 = headerParameters;
|
|
228
|
+
_7 = "Sec-Ch-Ua-Mobile";
|
|
229
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
230
|
+
case 33:
|
|
231
|
+
_6[_7] = _10.sent(); // SecChUaMobile authentication
|
|
232
|
+
_10.label = 34;
|
|
233
|
+
case 34:
|
|
234
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
235
|
+
_8 = headerParameters;
|
|
236
|
+
_9 = "Accept-Encoding";
|
|
237
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
238
|
+
case 35:
|
|
239
|
+
_8[_9] = _10.sent(); // AcceptEncoding authentication
|
|
240
|
+
_10.label = 36;
|
|
241
|
+
case 36: return [4 /*yield*/, this.request({
|
|
242
|
+
path: "/graphql/{pathQueryId}/CreateBookmark".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
243
|
+
method: 'POST',
|
|
244
|
+
headers: headerParameters,
|
|
245
|
+
query: queryParameters,
|
|
246
|
+
body: (0, index_1.PostCreateBookmarkRequestToJSON)(requestParameters['postCreateBookmarkRequest']),
|
|
247
|
+
}, initOverrides)];
|
|
248
|
+
case 37:
|
|
249
|
+
response = _10.sent();
|
|
250
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PostCreateBookmark200ResponseFromJSON)(jsonValue); })];
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* create Bookmark
|
|
257
|
+
*/
|
|
258
|
+
PostApi.prototype.postCreateBookmark = function (requestParameters, initOverrides) {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
260
|
+
var response;
|
|
261
|
+
return __generator(this, function (_a) {
|
|
262
|
+
switch (_a.label) {
|
|
263
|
+
case 0: return [4 /*yield*/, this.postCreateBookmarkRaw(requestParameters, initOverrides)];
|
|
264
|
+
case 1:
|
|
265
|
+
response = _a.sent();
|
|
266
|
+
return [4 /*yield*/, response.value()];
|
|
267
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
};
|
|
78
272
|
/**
|
|
79
273
|
* create Retweet
|
|
80
274
|
*/
|
|
@@ -463,6 +657,200 @@ var PostApi = /** @class */ (function (_super) {
|
|
|
463
657
|
});
|
|
464
658
|
});
|
|
465
659
|
};
|
|
660
|
+
/**
|
|
661
|
+
* delete Bookmark
|
|
662
|
+
*/
|
|
663
|
+
PostApi.prototype.postDeleteBookmarkRaw = function (requestParameters, initOverrides) {
|
|
664
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
665
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, token, tokenString, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, response;
|
|
666
|
+
return __generator(this, function (_10) {
|
|
667
|
+
switch (_10.label) {
|
|
668
|
+
case 0:
|
|
669
|
+
if (requestParameters['pathQueryId'] == null) {
|
|
670
|
+
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling postDeleteBookmark().');
|
|
671
|
+
}
|
|
672
|
+
if (requestParameters['postDeleteBookmarkRequest'] == null) {
|
|
673
|
+
throw new runtime.RequiredError('postDeleteBookmarkRequest', 'Required parameter "postDeleteBookmarkRequest" was null or undefined when calling postDeleteBookmark().');
|
|
674
|
+
}
|
|
675
|
+
queryParameters = {};
|
|
676
|
+
headerParameters = {};
|
|
677
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
678
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
679
|
+
_a = headerParameters;
|
|
680
|
+
_b = "x-twitter-client-language";
|
|
681
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
682
|
+
case 1:
|
|
683
|
+
_a[_b] = _10.sent(); // ClientLanguage authentication
|
|
684
|
+
_10.label = 2;
|
|
685
|
+
case 2:
|
|
686
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
687
|
+
_c = headerParameters;
|
|
688
|
+
_d = "Accept";
|
|
689
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
690
|
+
case 3:
|
|
691
|
+
_c[_d] = _10.sent(); // Accept authentication
|
|
692
|
+
_10.label = 4;
|
|
693
|
+
case 4:
|
|
694
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
695
|
+
_e = headerParameters;
|
|
696
|
+
_f = "Priority";
|
|
697
|
+
return [4 /*yield*/, this.configuration.apiKey("Priority")];
|
|
698
|
+
case 5:
|
|
699
|
+
_e[_f] = _10.sent(); // Priority authentication
|
|
700
|
+
_10.label = 6;
|
|
701
|
+
case 6:
|
|
702
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
703
|
+
_g = headerParameters;
|
|
704
|
+
_h = "Sec-Fetch-Dest";
|
|
705
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
706
|
+
case 7:
|
|
707
|
+
_g[_h] = _10.sent(); // SecFetchDest authentication
|
|
708
|
+
_10.label = 8;
|
|
709
|
+
case 8:
|
|
710
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
711
|
+
_j = headerParameters;
|
|
712
|
+
_k = "Referer";
|
|
713
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
714
|
+
case 9:
|
|
715
|
+
_j[_k] = _10.sent(); // Referer authentication
|
|
716
|
+
_10.label = 10;
|
|
717
|
+
case 10:
|
|
718
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
719
|
+
_l = headerParameters;
|
|
720
|
+
_m = "Sec-Ch-Ua-Platform";
|
|
721
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
722
|
+
case 11:
|
|
723
|
+
_l[_m] = _10.sent(); // SecChUaPlatform authentication
|
|
724
|
+
_10.label = 12;
|
|
725
|
+
case 12:
|
|
726
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
727
|
+
_o = headerParameters;
|
|
728
|
+
_p = "Sec-Fetch-Mode";
|
|
729
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
730
|
+
case 13:
|
|
731
|
+
_o[_p] = _10.sent(); // SecFetchMode authentication
|
|
732
|
+
_10.label = 14;
|
|
733
|
+
case 14:
|
|
734
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
735
|
+
_q = headerParameters;
|
|
736
|
+
_r = "x-csrf-token";
|
|
737
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
738
|
+
case 15:
|
|
739
|
+
_q[_r] = _10.sent(); // CsrfToken authentication
|
|
740
|
+
_10.label = 16;
|
|
741
|
+
case 16:
|
|
742
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 18];
|
|
743
|
+
_s = headerParameters;
|
|
744
|
+
_t = "x-guest-token";
|
|
745
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
746
|
+
case 17:
|
|
747
|
+
_s[_t] = _10.sent(); // GuestToken authentication
|
|
748
|
+
_10.label = 18;
|
|
749
|
+
case 18:
|
|
750
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
751
|
+
token = this.configuration.accessToken;
|
|
752
|
+
return [4 /*yield*/, token("BearerAuth", [])];
|
|
753
|
+
case 19:
|
|
754
|
+
tokenString = _10.sent();
|
|
755
|
+
if (tokenString) {
|
|
756
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
757
|
+
}
|
|
758
|
+
_10.label = 20;
|
|
759
|
+
case 20:
|
|
760
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
761
|
+
_u = headerParameters;
|
|
762
|
+
_v = "Sec-Ch-Ua";
|
|
763
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
764
|
+
case 21:
|
|
765
|
+
_u[_v] = _10.sent(); // SecChUa authentication
|
|
766
|
+
_10.label = 22;
|
|
767
|
+
case 22:
|
|
768
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
769
|
+
_w = headerParameters;
|
|
770
|
+
_x = "x-twitter-active-user";
|
|
771
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
772
|
+
case 23:
|
|
773
|
+
_w[_x] = _10.sent(); // ActiveUser authentication
|
|
774
|
+
_10.label = 24;
|
|
775
|
+
case 24:
|
|
776
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
777
|
+
_y = headerParameters;
|
|
778
|
+
_z = "user-agent";
|
|
779
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
780
|
+
case 25:
|
|
781
|
+
_y[_z] = _10.sent(); // UserAgent authentication
|
|
782
|
+
_10.label = 26;
|
|
783
|
+
case 26:
|
|
784
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
785
|
+
_0 = headerParameters;
|
|
786
|
+
_1 = "Accept-Language";
|
|
787
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
788
|
+
case 27:
|
|
789
|
+
_0[_1] = _10.sent(); // AcceptLanguage authentication
|
|
790
|
+
_10.label = 28;
|
|
791
|
+
case 28:
|
|
792
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
793
|
+
_2 = headerParameters;
|
|
794
|
+
_3 = "Sec-Fetch-Site";
|
|
795
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
796
|
+
case 29:
|
|
797
|
+
_2[_3] = _10.sent(); // SecFetchSite authentication
|
|
798
|
+
_10.label = 30;
|
|
799
|
+
case 30:
|
|
800
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
801
|
+
_4 = headerParameters;
|
|
802
|
+
_5 = "x-twitter-auth-type";
|
|
803
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
804
|
+
case 31:
|
|
805
|
+
_4[_5] = _10.sent(); // AuthType authentication
|
|
806
|
+
_10.label = 32;
|
|
807
|
+
case 32:
|
|
808
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
809
|
+
_6 = headerParameters;
|
|
810
|
+
_7 = "Sec-Ch-Ua-Mobile";
|
|
811
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
812
|
+
case 33:
|
|
813
|
+
_6[_7] = _10.sent(); // SecChUaMobile authentication
|
|
814
|
+
_10.label = 34;
|
|
815
|
+
case 34:
|
|
816
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
817
|
+
_8 = headerParameters;
|
|
818
|
+
_9 = "Accept-Encoding";
|
|
819
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
820
|
+
case 35:
|
|
821
|
+
_8[_9] = _10.sent(); // AcceptEncoding authentication
|
|
822
|
+
_10.label = 36;
|
|
823
|
+
case 36: return [4 /*yield*/, this.request({
|
|
824
|
+
path: "/graphql/{pathQueryId}/DeleteBookmark".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
825
|
+
method: 'POST',
|
|
826
|
+
headers: headerParameters,
|
|
827
|
+
query: queryParameters,
|
|
828
|
+
body: (0, index_1.PostDeleteBookmarkRequestToJSON)(requestParameters['postDeleteBookmarkRequest']),
|
|
829
|
+
}, initOverrides)];
|
|
830
|
+
case 37:
|
|
831
|
+
response = _10.sent();
|
|
832
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PostDeleteBookmark200ResponseFromJSON)(jsonValue); })];
|
|
833
|
+
}
|
|
834
|
+
});
|
|
835
|
+
});
|
|
836
|
+
};
|
|
837
|
+
/**
|
|
838
|
+
* delete Bookmark
|
|
839
|
+
*/
|
|
840
|
+
PostApi.prototype.postDeleteBookmark = function (requestParameters, initOverrides) {
|
|
841
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
842
|
+
var response;
|
|
843
|
+
return __generator(this, function (_a) {
|
|
844
|
+
switch (_a.label) {
|
|
845
|
+
case 0: return [4 /*yield*/, this.postDeleteBookmarkRaw(requestParameters, initOverrides)];
|
|
846
|
+
case 1:
|
|
847
|
+
response = _a.sent();
|
|
848
|
+
return [4 /*yield*/, response.value()];
|
|
849
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
850
|
+
}
|
|
851
|
+
});
|
|
852
|
+
});
|
|
853
|
+
};
|
|
466
854
|
/**
|
|
467
855
|
* delete Retweet
|
|
468
856
|
*/
|