twitter-openapi-typescript-generated 0.0.25 → 0.0.27
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/DefaultApi.d.ts.map +1 -1
- package/dist/apis/DefaultApi.js +172 -156
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/apis/OtherApi.d.ts.map +1 -1
- package/dist/apis/OtherApi.js +86 -78
- package/dist/apis/OtherApi.js.map +1 -1
- package/dist/apis/PostApi.d.ts.map +1 -1
- package/dist/apis/PostApi.js +688 -624
- package/dist/apis/PostApi.js.map +1 -1
- package/dist/apis/TweetApi.d.ts +4 -0
- package/dist/apis/TweetApi.d.ts.map +1 -1
- package/dist/apis/TweetApi.js +970 -858
- package/dist/apis/TweetApi.js.map +1 -1
- package/dist/apis/UserApi.d.ts.map +1 -1
- package/dist/apis/UserApi.js +172 -156
- package/dist/apis/UserApi.js.map +1 -1
- package/dist/apis/UserListApi.d.ts.map +1 -1
- package/dist/apis/UserListApi.js +430 -390
- package/dist/apis/UserListApi.js.map +1 -1
- package/dist/apis/UsersApi.d.ts.map +1 -1
- package/dist/apis/UsersApi.js +86 -78
- package/dist/apis/UsersApi.js.map +1 -1
- package/dist/apis/V11GetApi.d.ts.map +1 -1
- package/dist/apis/V11GetApi.js +172 -156
- package/dist/apis/V11GetApi.js.map +1 -1
- package/dist/apis/V11PostApi.d.ts.map +1 -1
- package/dist/apis/V11PostApi.js +170 -154
- package/dist/apis/V11PostApi.js.map +1 -1
- package/dist/apis/V20GetApi.d.ts.map +1 -1
- package/dist/apis/V20GetApi.js +86 -78
- package/dist/apis/V20GetApi.js.map +1 -1
- package/dist/models/AuthorCommunityRelationship.d.ts +1 -0
- package/dist/models/AuthorCommunityRelationship.d.ts.map +1 -1
- package/dist/models/AuthorCommunityRelationship.js +2 -1
- package/dist/models/AuthorCommunityRelationship.js.map +1 -1
- package/dist/models/CommunityActions.d.ts +11 -4
- package/dist/models/CommunityActions.d.ts.map +1 -1
- package/dist/models/CommunityActions.js +7 -12
- package/dist/models/CommunityActions.js.map +1 -1
- package/dist/models/CommunityData.d.ts +1 -1
- package/dist/models/CommunityData.d.ts.map +1 -1
- package/dist/models/CommunityData.js +1 -3
- package/dist/models/CommunityData.js.map +1 -1
- package/dist/models/CommunityRelationship.d.ts +53 -0
- package/dist/models/CommunityRelationship.d.ts.map +1 -0
- package/dist/models/CommunityRelationship.js +61 -0
- package/dist/models/CommunityRelationship.js.map +1 -0
- package/dist/models/CommunityUnpinActionResult.d.ts +33 -0
- package/dist/models/CommunityUnpinActionResult.d.ts.map +1 -0
- package/dist/models/CommunityUnpinActionResult.js +49 -0
- package/dist/models/CommunityUnpinActionResult.js.map +1 -0
- package/dist/models/CursorType.d.ts +1 -0
- package/dist/models/CursorType.d.ts.map +1 -1
- package/dist/models/CursorType.js +2 -1
- package/dist/models/CursorType.js.map +1 -1
- package/dist/models/DisplayTreatment.d.ts +6 -0
- package/dist/models/DisplayTreatment.d.ts.map +1 -1
- package/dist/models/DisplayTreatment.js +2 -0
- package/dist/models/DisplayTreatment.js.map +1 -1
- package/dist/models/PostCreateTweetRequestVariablesMedia.d.ts +1 -1
- package/dist/models/PostCreateTweetRequestVariablesMedia.d.ts.map +1 -1
- package/dist/models/PostCreateTweetRequestVariablesMedia.js +2 -4
- package/dist/models/PostCreateTweetRequestVariablesMedia.js.map +1 -1
- package/dist/models/TimelineGeneralContext.d.ts +1 -0
- package/dist/models/TimelineGeneralContext.d.ts.map +1 -1
- package/dist/models/TimelineGeneralContext.js +2 -1
- package/dist/models/TimelineGeneralContext.js.map +1 -1
- package/dist/models/Tweet.d.ts +7 -0
- package/dist/models/Tweet.d.ts.map +1 -1
- package/dist/models/Tweet.js +3 -0
- package/dist/models/Tweet.js.map +1 -1
- package/dist/models/TypeName.d.ts +1 -0
- package/dist/models/TypeName.d.ts.map +1 -1
- package/dist/models/TypeName.js +1 -0
- package/dist/models/TypeName.js.map +1 -1
- package/dist/models/UserResponseData.d.ts +1 -1
- package/dist/models/UserResponseData.d.ts.map +1 -1
- package/dist/models/UserResponseData.js +1 -3
- package/dist/models/UserResponseData.js.map +1 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +2 -0
- package/dist/models/index.js.map +1 -1
- package/package.json +1 -1
package/dist/apis/TweetApi.js
CHANGED
|
@@ -80,9 +80,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
80
80
|
*/
|
|
81
81
|
TweetApi.prototype.getBookmarksRaw = function (requestParameters, initOverrides) {
|
|
82
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,
|
|
84
|
-
return __generator(this, function (
|
|
85
|
-
switch (
|
|
83
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, token, tokenString, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, response;
|
|
84
|
+
return __generator(this, function (_12) {
|
|
85
|
+
switch (_12.label) {
|
|
86
86
|
case 0:
|
|
87
87
|
if (requestParameters['pathQueryId'] == null) {
|
|
88
88
|
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling getBookmarks().');
|
|
@@ -103,157 +103,165 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
103
103
|
headerParameters = {};
|
|
104
104
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
105
105
|
_a = headerParameters;
|
|
106
|
-
_b = "
|
|
107
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
106
|
+
_b = "Accept";
|
|
107
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
108
108
|
case 1:
|
|
109
|
-
_a[_b] =
|
|
110
|
-
|
|
109
|
+
_a[_b] = _12.sent(); // Accept authentication
|
|
110
|
+
_12.label = 2;
|
|
111
111
|
case 2:
|
|
112
112
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
113
113
|
_c = headerParameters;
|
|
114
|
-
_d = "
|
|
115
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
114
|
+
_d = "x-twitter-client-language";
|
|
115
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
116
116
|
case 3:
|
|
117
|
-
_c[_d] =
|
|
118
|
-
|
|
117
|
+
_c[_d] = _12.sent(); // ClientLanguage authentication
|
|
118
|
+
_12.label = 4;
|
|
119
119
|
case 4:
|
|
120
120
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
121
121
|
_e = headerParameters;
|
|
122
|
-
_f = "
|
|
123
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
122
|
+
_f = "Referer";
|
|
123
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
124
124
|
case 5:
|
|
125
|
-
_e[_f] =
|
|
126
|
-
|
|
125
|
+
_e[_f] = _12.sent(); // Referer authentication
|
|
126
|
+
_12.label = 6;
|
|
127
127
|
case 6:
|
|
128
128
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
129
129
|
_g = headerParameters;
|
|
130
130
|
_h = "Sec-Fetch-Dest";
|
|
131
131
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
132
132
|
case 7:
|
|
133
|
-
_g[_h] =
|
|
134
|
-
|
|
133
|
+
_g[_h] = _12.sent(); // SecFetchDest authentication
|
|
134
|
+
_12.label = 8;
|
|
135
135
|
case 8:
|
|
136
136
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
137
137
|
_j = headerParameters;
|
|
138
|
-
_k = "
|
|
139
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
138
|
+
_k = "Sec-Ch-Ua-Platform";
|
|
139
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
140
140
|
case 9:
|
|
141
|
-
_j[_k] =
|
|
142
|
-
|
|
141
|
+
_j[_k] = _12.sent(); // SecChUaPlatform authentication
|
|
142
|
+
_12.label = 10;
|
|
143
143
|
case 10:
|
|
144
144
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
145
145
|
_l = headerParameters;
|
|
146
|
-
_m = "Sec-
|
|
147
|
-
return [4 /*yield*/, this.configuration.apiKey("Sec-
|
|
146
|
+
_m = "Sec-Fetch-Mode";
|
|
147
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
148
148
|
case 11:
|
|
149
|
-
_l[_m] =
|
|
150
|
-
|
|
149
|
+
_l[_m] = _12.sent(); // SecFetchMode authentication
|
|
150
|
+
_12.label = 12;
|
|
151
151
|
case 12:
|
|
152
152
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
153
153
|
_o = headerParameters;
|
|
154
|
-
_p = "
|
|
155
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
154
|
+
_p = "x-csrf-token";
|
|
155
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
156
156
|
case 13:
|
|
157
|
-
_o[_p] =
|
|
158
|
-
|
|
157
|
+
_o[_p] = _12.sent(); // CsrfToken authentication
|
|
158
|
+
_12.label = 14;
|
|
159
159
|
case 14:
|
|
160
160
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
161
161
|
_q = headerParameters;
|
|
162
|
-
_r = "x-
|
|
163
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
162
|
+
_r = "x-client-uuid";
|
|
163
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-uuid")];
|
|
164
164
|
case 15:
|
|
165
|
-
_q[_r] =
|
|
166
|
-
|
|
165
|
+
_q[_r] = _12.sent(); // ClientUuid authentication
|
|
166
|
+
_12.label = 16;
|
|
167
167
|
case 16:
|
|
168
|
-
if (!(this.configuration && this.configuration.
|
|
169
|
-
_s = headerParameters;
|
|
170
|
-
_t = "x-guest-token";
|
|
171
|
-
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
172
|
-
case 17:
|
|
173
|
-
_s[_t] = _10.sent(); // GuestToken authentication
|
|
174
|
-
_10.label = 18;
|
|
175
|
-
case 18:
|
|
176
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
168
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 18];
|
|
177
169
|
token = this.configuration.accessToken;
|
|
178
170
|
return [4 /*yield*/, token("BearerAuth", [])];
|
|
179
|
-
case
|
|
180
|
-
tokenString =
|
|
171
|
+
case 17:
|
|
172
|
+
tokenString = _12.sent();
|
|
181
173
|
if (tokenString) {
|
|
182
174
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
183
175
|
}
|
|
184
|
-
|
|
176
|
+
_12.label = 18;
|
|
177
|
+
case 18:
|
|
178
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 20];
|
|
179
|
+
_s = headerParameters;
|
|
180
|
+
_t = "x-guest-token";
|
|
181
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
182
|
+
case 19:
|
|
183
|
+
_s[_t] = _12.sent(); // GuestToken authentication
|
|
184
|
+
_12.label = 20;
|
|
185
185
|
case 20:
|
|
186
186
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
187
187
|
_u = headerParameters;
|
|
188
188
|
_v = "Sec-Ch-Ua";
|
|
189
189
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
190
190
|
case 21:
|
|
191
|
-
_u[_v] =
|
|
192
|
-
|
|
191
|
+
_u[_v] = _12.sent(); // SecChUa authentication
|
|
192
|
+
_12.label = 22;
|
|
193
193
|
case 22:
|
|
194
194
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
195
195
|
_w = headerParameters;
|
|
196
|
-
_x = "x-
|
|
197
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
196
|
+
_x = "x-client-transaction-id";
|
|
197
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-transaction-id")];
|
|
198
198
|
case 23:
|
|
199
|
-
_w[_x] =
|
|
200
|
-
|
|
199
|
+
_w[_x] = _12.sent(); // ClientTransactionId authentication
|
|
200
|
+
_12.label = 24;
|
|
201
201
|
case 24:
|
|
202
202
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
203
203
|
_y = headerParameters;
|
|
204
|
-
_z = "user
|
|
205
|
-
return [4 /*yield*/, this.configuration.apiKey("user
|
|
204
|
+
_z = "x-twitter-active-user";
|
|
205
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
206
206
|
case 25:
|
|
207
|
-
_y[_z] =
|
|
208
|
-
|
|
207
|
+
_y[_z] = _12.sent(); // ActiveUser authentication
|
|
208
|
+
_12.label = 26;
|
|
209
209
|
case 26:
|
|
210
210
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
211
211
|
_0 = headerParameters;
|
|
212
|
-
_1 = "
|
|
213
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
212
|
+
_1 = "user-agent";
|
|
213
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
214
214
|
case 27:
|
|
215
|
-
_0[_1] =
|
|
216
|
-
|
|
215
|
+
_0[_1] = _12.sent(); // UserAgent authentication
|
|
216
|
+
_12.label = 28;
|
|
217
217
|
case 28:
|
|
218
218
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
219
219
|
_2 = headerParameters;
|
|
220
|
-
_3 = "
|
|
221
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
220
|
+
_3 = "Accept-Language";
|
|
221
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
222
222
|
case 29:
|
|
223
|
-
_2[_3] =
|
|
224
|
-
|
|
223
|
+
_2[_3] = _12.sent(); // AcceptLanguage authentication
|
|
224
|
+
_12.label = 30;
|
|
225
225
|
case 30:
|
|
226
226
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
227
227
|
_4 = headerParameters;
|
|
228
|
-
_5 = "
|
|
229
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
228
|
+
_5 = "Sec-Fetch-Site";
|
|
229
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
230
230
|
case 31:
|
|
231
|
-
_4[_5] =
|
|
232
|
-
|
|
231
|
+
_4[_5] = _12.sent(); // SecFetchSite authentication
|
|
232
|
+
_12.label = 32;
|
|
233
233
|
case 32:
|
|
234
234
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
235
235
|
_6 = headerParameters;
|
|
236
|
-
_7 = "
|
|
237
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
236
|
+
_7 = "x-twitter-auth-type";
|
|
237
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
238
238
|
case 33:
|
|
239
|
-
_6[_7] =
|
|
240
|
-
|
|
239
|
+
_6[_7] = _12.sent(); // AuthType authentication
|
|
240
|
+
_12.label = 34;
|
|
241
241
|
case 34:
|
|
242
242
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
243
243
|
_8 = headerParameters;
|
|
244
|
-
_9 = "
|
|
245
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
244
|
+
_9 = "Sec-Ch-Ua-Mobile";
|
|
245
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
246
246
|
case 35:
|
|
247
|
-
_8[_9] =
|
|
248
|
-
|
|
249
|
-
case 36:
|
|
247
|
+
_8[_9] = _12.sent(); // SecChUaMobile authentication
|
|
248
|
+
_12.label = 36;
|
|
249
|
+
case 36:
|
|
250
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 38];
|
|
251
|
+
_10 = headerParameters;
|
|
252
|
+
_11 = "Accept-Encoding";
|
|
253
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
254
|
+
case 37:
|
|
255
|
+
_10[_11] = _12.sent(); // AcceptEncoding authentication
|
|
256
|
+
_12.label = 38;
|
|
257
|
+
case 38: return [4 /*yield*/, this.request({
|
|
250
258
|
path: "/graphql/{pathQueryId}/Bookmarks".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
251
259
|
method: 'GET',
|
|
252
260
|
headers: headerParameters,
|
|
253
261
|
query: queryParameters,
|
|
254
262
|
}, initOverrides)];
|
|
255
|
-
case
|
|
256
|
-
response =
|
|
263
|
+
case 39:
|
|
264
|
+
response = _12.sent();
|
|
257
265
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetBookmarks200ResponseFromJSON)(jsonValue); })];
|
|
258
266
|
}
|
|
259
267
|
});
|
|
@@ -281,9 +289,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
281
289
|
*/
|
|
282
290
|
TweetApi.prototype.getHomeLatestTimelineRaw = function (requestParameters, initOverrides) {
|
|
283
291
|
return __awaiter(this, void 0, void 0, function () {
|
|
284
|
-
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r,
|
|
285
|
-
return __generator(this, function (
|
|
286
|
-
switch (
|
|
292
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, token, tokenString, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, response;
|
|
293
|
+
return __generator(this, function (_12) {
|
|
294
|
+
switch (_12.label) {
|
|
287
295
|
case 0:
|
|
288
296
|
if (requestParameters['pathQueryId'] == null) {
|
|
289
297
|
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling getHomeLatestTimeline().');
|
|
@@ -304,157 +312,165 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
304
312
|
headerParameters = {};
|
|
305
313
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
306
314
|
_a = headerParameters;
|
|
307
|
-
_b = "
|
|
308
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
315
|
+
_b = "Accept";
|
|
316
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
309
317
|
case 1:
|
|
310
|
-
_a[_b] =
|
|
311
|
-
|
|
318
|
+
_a[_b] = _12.sent(); // Accept authentication
|
|
319
|
+
_12.label = 2;
|
|
312
320
|
case 2:
|
|
313
321
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
314
322
|
_c = headerParameters;
|
|
315
|
-
_d = "
|
|
316
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
323
|
+
_d = "x-twitter-client-language";
|
|
324
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
317
325
|
case 3:
|
|
318
|
-
_c[_d] =
|
|
319
|
-
|
|
326
|
+
_c[_d] = _12.sent(); // ClientLanguage authentication
|
|
327
|
+
_12.label = 4;
|
|
320
328
|
case 4:
|
|
321
329
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
322
330
|
_e = headerParameters;
|
|
323
|
-
_f = "
|
|
324
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
331
|
+
_f = "Referer";
|
|
332
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
325
333
|
case 5:
|
|
326
|
-
_e[_f] =
|
|
327
|
-
|
|
334
|
+
_e[_f] = _12.sent(); // Referer authentication
|
|
335
|
+
_12.label = 6;
|
|
328
336
|
case 6:
|
|
329
337
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
330
338
|
_g = headerParameters;
|
|
331
339
|
_h = "Sec-Fetch-Dest";
|
|
332
340
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
333
341
|
case 7:
|
|
334
|
-
_g[_h] =
|
|
335
|
-
|
|
342
|
+
_g[_h] = _12.sent(); // SecFetchDest authentication
|
|
343
|
+
_12.label = 8;
|
|
336
344
|
case 8:
|
|
337
345
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
338
346
|
_j = headerParameters;
|
|
339
|
-
_k = "
|
|
340
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
347
|
+
_k = "Sec-Ch-Ua-Platform";
|
|
348
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
341
349
|
case 9:
|
|
342
|
-
_j[_k] =
|
|
343
|
-
|
|
350
|
+
_j[_k] = _12.sent(); // SecChUaPlatform authentication
|
|
351
|
+
_12.label = 10;
|
|
344
352
|
case 10:
|
|
345
353
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
346
354
|
_l = headerParameters;
|
|
347
|
-
_m = "Sec-
|
|
348
|
-
return [4 /*yield*/, this.configuration.apiKey("Sec-
|
|
355
|
+
_m = "Sec-Fetch-Mode";
|
|
356
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
349
357
|
case 11:
|
|
350
|
-
_l[_m] =
|
|
351
|
-
|
|
358
|
+
_l[_m] = _12.sent(); // SecFetchMode authentication
|
|
359
|
+
_12.label = 12;
|
|
352
360
|
case 12:
|
|
353
361
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
354
362
|
_o = headerParameters;
|
|
355
|
-
_p = "
|
|
356
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
363
|
+
_p = "x-csrf-token";
|
|
364
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
357
365
|
case 13:
|
|
358
|
-
_o[_p] =
|
|
359
|
-
|
|
366
|
+
_o[_p] = _12.sent(); // CsrfToken authentication
|
|
367
|
+
_12.label = 14;
|
|
360
368
|
case 14:
|
|
361
369
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
362
370
|
_q = headerParameters;
|
|
363
|
-
_r = "x-
|
|
364
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
371
|
+
_r = "x-client-uuid";
|
|
372
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-uuid")];
|
|
365
373
|
case 15:
|
|
366
|
-
_q[_r] =
|
|
367
|
-
|
|
374
|
+
_q[_r] = _12.sent(); // ClientUuid authentication
|
|
375
|
+
_12.label = 16;
|
|
368
376
|
case 16:
|
|
369
|
-
if (!(this.configuration && this.configuration.
|
|
370
|
-
_s = headerParameters;
|
|
371
|
-
_t = "x-guest-token";
|
|
372
|
-
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
373
|
-
case 17:
|
|
374
|
-
_s[_t] = _10.sent(); // GuestToken authentication
|
|
375
|
-
_10.label = 18;
|
|
376
|
-
case 18:
|
|
377
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
377
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 18];
|
|
378
378
|
token = this.configuration.accessToken;
|
|
379
379
|
return [4 /*yield*/, token("BearerAuth", [])];
|
|
380
|
-
case
|
|
381
|
-
tokenString =
|
|
380
|
+
case 17:
|
|
381
|
+
tokenString = _12.sent();
|
|
382
382
|
if (tokenString) {
|
|
383
383
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
384
384
|
}
|
|
385
|
-
|
|
385
|
+
_12.label = 18;
|
|
386
|
+
case 18:
|
|
387
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 20];
|
|
388
|
+
_s = headerParameters;
|
|
389
|
+
_t = "x-guest-token";
|
|
390
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
391
|
+
case 19:
|
|
392
|
+
_s[_t] = _12.sent(); // GuestToken authentication
|
|
393
|
+
_12.label = 20;
|
|
386
394
|
case 20:
|
|
387
395
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
388
396
|
_u = headerParameters;
|
|
389
397
|
_v = "Sec-Ch-Ua";
|
|
390
398
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
391
399
|
case 21:
|
|
392
|
-
_u[_v] =
|
|
393
|
-
|
|
400
|
+
_u[_v] = _12.sent(); // SecChUa authentication
|
|
401
|
+
_12.label = 22;
|
|
394
402
|
case 22:
|
|
395
403
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
396
404
|
_w = headerParameters;
|
|
397
|
-
_x = "x-
|
|
398
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
405
|
+
_x = "x-client-transaction-id";
|
|
406
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-transaction-id")];
|
|
399
407
|
case 23:
|
|
400
|
-
_w[_x] =
|
|
401
|
-
|
|
408
|
+
_w[_x] = _12.sent(); // ClientTransactionId authentication
|
|
409
|
+
_12.label = 24;
|
|
402
410
|
case 24:
|
|
403
411
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
404
412
|
_y = headerParameters;
|
|
405
|
-
_z = "user
|
|
406
|
-
return [4 /*yield*/, this.configuration.apiKey("user
|
|
413
|
+
_z = "x-twitter-active-user";
|
|
414
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
407
415
|
case 25:
|
|
408
|
-
_y[_z] =
|
|
409
|
-
|
|
416
|
+
_y[_z] = _12.sent(); // ActiveUser authentication
|
|
417
|
+
_12.label = 26;
|
|
410
418
|
case 26:
|
|
411
419
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
412
420
|
_0 = headerParameters;
|
|
413
|
-
_1 = "
|
|
414
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
421
|
+
_1 = "user-agent";
|
|
422
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
415
423
|
case 27:
|
|
416
|
-
_0[_1] =
|
|
417
|
-
|
|
424
|
+
_0[_1] = _12.sent(); // UserAgent authentication
|
|
425
|
+
_12.label = 28;
|
|
418
426
|
case 28:
|
|
419
427
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
420
428
|
_2 = headerParameters;
|
|
421
|
-
_3 = "
|
|
422
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
429
|
+
_3 = "Accept-Language";
|
|
430
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
423
431
|
case 29:
|
|
424
|
-
_2[_3] =
|
|
425
|
-
|
|
432
|
+
_2[_3] = _12.sent(); // AcceptLanguage authentication
|
|
433
|
+
_12.label = 30;
|
|
426
434
|
case 30:
|
|
427
435
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
428
436
|
_4 = headerParameters;
|
|
429
|
-
_5 = "
|
|
430
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
437
|
+
_5 = "Sec-Fetch-Site";
|
|
438
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
431
439
|
case 31:
|
|
432
|
-
_4[_5] =
|
|
433
|
-
|
|
440
|
+
_4[_5] = _12.sent(); // SecFetchSite authentication
|
|
441
|
+
_12.label = 32;
|
|
434
442
|
case 32:
|
|
435
443
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
436
444
|
_6 = headerParameters;
|
|
437
|
-
_7 = "
|
|
438
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
445
|
+
_7 = "x-twitter-auth-type";
|
|
446
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
439
447
|
case 33:
|
|
440
|
-
_6[_7] =
|
|
441
|
-
|
|
448
|
+
_6[_7] = _12.sent(); // AuthType authentication
|
|
449
|
+
_12.label = 34;
|
|
442
450
|
case 34:
|
|
443
451
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
444
452
|
_8 = headerParameters;
|
|
445
|
-
_9 = "
|
|
446
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
453
|
+
_9 = "Sec-Ch-Ua-Mobile";
|
|
454
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
447
455
|
case 35:
|
|
448
|
-
_8[_9] =
|
|
449
|
-
|
|
450
|
-
case 36:
|
|
456
|
+
_8[_9] = _12.sent(); // SecChUaMobile authentication
|
|
457
|
+
_12.label = 36;
|
|
458
|
+
case 36:
|
|
459
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 38];
|
|
460
|
+
_10 = headerParameters;
|
|
461
|
+
_11 = "Accept-Encoding";
|
|
462
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
463
|
+
case 37:
|
|
464
|
+
_10[_11] = _12.sent(); // AcceptEncoding authentication
|
|
465
|
+
_12.label = 38;
|
|
466
|
+
case 38: return [4 /*yield*/, this.request({
|
|
451
467
|
path: "/graphql/{pathQueryId}/HomeLatestTimeline".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
452
468
|
method: 'GET',
|
|
453
469
|
headers: headerParameters,
|
|
454
470
|
query: queryParameters,
|
|
455
471
|
}, initOverrides)];
|
|
456
|
-
case
|
|
457
|
-
response =
|
|
472
|
+
case 39:
|
|
473
|
+
response = _12.sent();
|
|
458
474
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetHomeLatestTimeline200ResponseFromJSON)(jsonValue); })];
|
|
459
475
|
}
|
|
460
476
|
});
|
|
@@ -482,9 +498,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
482
498
|
*/
|
|
483
499
|
TweetApi.prototype.getHomeTimelineRaw = function (requestParameters, initOverrides) {
|
|
484
500
|
return __awaiter(this, void 0, void 0, function () {
|
|
485
|
-
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r,
|
|
486
|
-
return __generator(this, function (
|
|
487
|
-
switch (
|
|
501
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, token, tokenString, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, response;
|
|
502
|
+
return __generator(this, function (_12) {
|
|
503
|
+
switch (_12.label) {
|
|
488
504
|
case 0:
|
|
489
505
|
if (requestParameters['pathQueryId'] == null) {
|
|
490
506
|
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling getHomeTimeline().');
|
|
@@ -505,157 +521,165 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
505
521
|
headerParameters = {};
|
|
506
522
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
507
523
|
_a = headerParameters;
|
|
508
|
-
_b = "
|
|
509
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
524
|
+
_b = "Accept";
|
|
525
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
510
526
|
case 1:
|
|
511
|
-
_a[_b] =
|
|
512
|
-
|
|
527
|
+
_a[_b] = _12.sent(); // Accept authentication
|
|
528
|
+
_12.label = 2;
|
|
513
529
|
case 2:
|
|
514
530
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
515
531
|
_c = headerParameters;
|
|
516
|
-
_d = "
|
|
517
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
532
|
+
_d = "x-twitter-client-language";
|
|
533
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
518
534
|
case 3:
|
|
519
|
-
_c[_d] =
|
|
520
|
-
|
|
535
|
+
_c[_d] = _12.sent(); // ClientLanguage authentication
|
|
536
|
+
_12.label = 4;
|
|
521
537
|
case 4:
|
|
522
538
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
523
539
|
_e = headerParameters;
|
|
524
|
-
_f = "
|
|
525
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
540
|
+
_f = "Referer";
|
|
541
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
526
542
|
case 5:
|
|
527
|
-
_e[_f] =
|
|
528
|
-
|
|
543
|
+
_e[_f] = _12.sent(); // Referer authentication
|
|
544
|
+
_12.label = 6;
|
|
529
545
|
case 6:
|
|
530
546
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
531
547
|
_g = headerParameters;
|
|
532
548
|
_h = "Sec-Fetch-Dest";
|
|
533
549
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
534
550
|
case 7:
|
|
535
|
-
_g[_h] =
|
|
536
|
-
|
|
551
|
+
_g[_h] = _12.sent(); // SecFetchDest authentication
|
|
552
|
+
_12.label = 8;
|
|
537
553
|
case 8:
|
|
538
554
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
539
555
|
_j = headerParameters;
|
|
540
|
-
_k = "
|
|
541
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
556
|
+
_k = "Sec-Ch-Ua-Platform";
|
|
557
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
542
558
|
case 9:
|
|
543
|
-
_j[_k] =
|
|
544
|
-
|
|
559
|
+
_j[_k] = _12.sent(); // SecChUaPlatform authentication
|
|
560
|
+
_12.label = 10;
|
|
545
561
|
case 10:
|
|
546
562
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
547
563
|
_l = headerParameters;
|
|
548
|
-
_m = "Sec-
|
|
549
|
-
return [4 /*yield*/, this.configuration.apiKey("Sec-
|
|
564
|
+
_m = "Sec-Fetch-Mode";
|
|
565
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
550
566
|
case 11:
|
|
551
|
-
_l[_m] =
|
|
552
|
-
|
|
567
|
+
_l[_m] = _12.sent(); // SecFetchMode authentication
|
|
568
|
+
_12.label = 12;
|
|
553
569
|
case 12:
|
|
554
570
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
555
571
|
_o = headerParameters;
|
|
556
|
-
_p = "
|
|
557
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
572
|
+
_p = "x-csrf-token";
|
|
573
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
558
574
|
case 13:
|
|
559
|
-
_o[_p] =
|
|
560
|
-
|
|
575
|
+
_o[_p] = _12.sent(); // CsrfToken authentication
|
|
576
|
+
_12.label = 14;
|
|
561
577
|
case 14:
|
|
562
578
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
563
579
|
_q = headerParameters;
|
|
564
|
-
_r = "x-
|
|
565
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
580
|
+
_r = "x-client-uuid";
|
|
581
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-uuid")];
|
|
566
582
|
case 15:
|
|
567
|
-
_q[_r] =
|
|
568
|
-
|
|
583
|
+
_q[_r] = _12.sent(); // ClientUuid authentication
|
|
584
|
+
_12.label = 16;
|
|
569
585
|
case 16:
|
|
570
|
-
if (!(this.configuration && this.configuration.
|
|
571
|
-
_s = headerParameters;
|
|
572
|
-
_t = "x-guest-token";
|
|
573
|
-
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
574
|
-
case 17:
|
|
575
|
-
_s[_t] = _10.sent(); // GuestToken authentication
|
|
576
|
-
_10.label = 18;
|
|
577
|
-
case 18:
|
|
578
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
586
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 18];
|
|
579
587
|
token = this.configuration.accessToken;
|
|
580
588
|
return [4 /*yield*/, token("BearerAuth", [])];
|
|
581
|
-
case
|
|
582
|
-
tokenString =
|
|
589
|
+
case 17:
|
|
590
|
+
tokenString = _12.sent();
|
|
583
591
|
if (tokenString) {
|
|
584
592
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
585
593
|
}
|
|
586
|
-
|
|
594
|
+
_12.label = 18;
|
|
595
|
+
case 18:
|
|
596
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 20];
|
|
597
|
+
_s = headerParameters;
|
|
598
|
+
_t = "x-guest-token";
|
|
599
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
600
|
+
case 19:
|
|
601
|
+
_s[_t] = _12.sent(); // GuestToken authentication
|
|
602
|
+
_12.label = 20;
|
|
587
603
|
case 20:
|
|
588
604
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
589
605
|
_u = headerParameters;
|
|
590
606
|
_v = "Sec-Ch-Ua";
|
|
591
607
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
592
608
|
case 21:
|
|
593
|
-
_u[_v] =
|
|
594
|
-
|
|
609
|
+
_u[_v] = _12.sent(); // SecChUa authentication
|
|
610
|
+
_12.label = 22;
|
|
595
611
|
case 22:
|
|
596
612
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
597
613
|
_w = headerParameters;
|
|
598
|
-
_x = "x-
|
|
599
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
614
|
+
_x = "x-client-transaction-id";
|
|
615
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-transaction-id")];
|
|
600
616
|
case 23:
|
|
601
|
-
_w[_x] =
|
|
602
|
-
|
|
617
|
+
_w[_x] = _12.sent(); // ClientTransactionId authentication
|
|
618
|
+
_12.label = 24;
|
|
603
619
|
case 24:
|
|
604
620
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
605
621
|
_y = headerParameters;
|
|
606
|
-
_z = "user
|
|
607
|
-
return [4 /*yield*/, this.configuration.apiKey("user
|
|
622
|
+
_z = "x-twitter-active-user";
|
|
623
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
608
624
|
case 25:
|
|
609
|
-
_y[_z] =
|
|
610
|
-
|
|
625
|
+
_y[_z] = _12.sent(); // ActiveUser authentication
|
|
626
|
+
_12.label = 26;
|
|
611
627
|
case 26:
|
|
612
628
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
613
629
|
_0 = headerParameters;
|
|
614
|
-
_1 = "
|
|
615
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
630
|
+
_1 = "user-agent";
|
|
631
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
616
632
|
case 27:
|
|
617
|
-
_0[_1] =
|
|
618
|
-
|
|
633
|
+
_0[_1] = _12.sent(); // UserAgent authentication
|
|
634
|
+
_12.label = 28;
|
|
619
635
|
case 28:
|
|
620
636
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
621
637
|
_2 = headerParameters;
|
|
622
|
-
_3 = "
|
|
623
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
638
|
+
_3 = "Accept-Language";
|
|
639
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
624
640
|
case 29:
|
|
625
|
-
_2[_3] =
|
|
626
|
-
|
|
641
|
+
_2[_3] = _12.sent(); // AcceptLanguage authentication
|
|
642
|
+
_12.label = 30;
|
|
627
643
|
case 30:
|
|
628
644
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
629
645
|
_4 = headerParameters;
|
|
630
|
-
_5 = "
|
|
631
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
646
|
+
_5 = "Sec-Fetch-Site";
|
|
647
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
632
648
|
case 31:
|
|
633
|
-
_4[_5] =
|
|
634
|
-
|
|
649
|
+
_4[_5] = _12.sent(); // SecFetchSite authentication
|
|
650
|
+
_12.label = 32;
|
|
635
651
|
case 32:
|
|
636
652
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
637
653
|
_6 = headerParameters;
|
|
638
|
-
_7 = "
|
|
639
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
654
|
+
_7 = "x-twitter-auth-type";
|
|
655
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
640
656
|
case 33:
|
|
641
|
-
_6[_7] =
|
|
642
|
-
|
|
657
|
+
_6[_7] = _12.sent(); // AuthType authentication
|
|
658
|
+
_12.label = 34;
|
|
643
659
|
case 34:
|
|
644
660
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
645
661
|
_8 = headerParameters;
|
|
646
|
-
_9 = "
|
|
647
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
662
|
+
_9 = "Sec-Ch-Ua-Mobile";
|
|
663
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
648
664
|
case 35:
|
|
649
|
-
_8[_9] =
|
|
650
|
-
|
|
651
|
-
case 36:
|
|
665
|
+
_8[_9] = _12.sent(); // SecChUaMobile authentication
|
|
666
|
+
_12.label = 36;
|
|
667
|
+
case 36:
|
|
668
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 38];
|
|
669
|
+
_10 = headerParameters;
|
|
670
|
+
_11 = "Accept-Encoding";
|
|
671
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
672
|
+
case 37:
|
|
673
|
+
_10[_11] = _12.sent(); // AcceptEncoding authentication
|
|
674
|
+
_12.label = 38;
|
|
675
|
+
case 38: return [4 /*yield*/, this.request({
|
|
652
676
|
path: "/graphql/{pathQueryId}/HomeTimeline".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
653
677
|
method: 'GET',
|
|
654
678
|
headers: headerParameters,
|
|
655
679
|
query: queryParameters,
|
|
656
680
|
}, initOverrides)];
|
|
657
|
-
case
|
|
658
|
-
response =
|
|
681
|
+
case 39:
|
|
682
|
+
response = _12.sent();
|
|
659
683
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetHomeLatestTimeline200ResponseFromJSON)(jsonValue); })];
|
|
660
684
|
}
|
|
661
685
|
});
|
|
@@ -683,9 +707,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
683
707
|
*/
|
|
684
708
|
TweetApi.prototype.getLikesRaw = function (requestParameters, initOverrides) {
|
|
685
709
|
return __awaiter(this, void 0, void 0, function () {
|
|
686
|
-
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r,
|
|
687
|
-
return __generator(this, function (
|
|
688
|
-
switch (
|
|
710
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, token, tokenString, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, response;
|
|
711
|
+
return __generator(this, function (_12) {
|
|
712
|
+
switch (_12.label) {
|
|
689
713
|
case 0:
|
|
690
714
|
if (requestParameters['pathQueryId'] == null) {
|
|
691
715
|
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling getLikes().');
|
|
@@ -696,6 +720,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
696
720
|
if (requestParameters['features'] == null) {
|
|
697
721
|
throw new runtime.RequiredError('features', 'Required parameter "features" was null or undefined when calling getLikes().');
|
|
698
722
|
}
|
|
723
|
+
if (requestParameters['fieldToggles'] == null) {
|
|
724
|
+
throw new runtime.RequiredError('fieldToggles', 'Required parameter "fieldToggles" was null or undefined when calling getLikes().');
|
|
725
|
+
}
|
|
699
726
|
queryParameters = {};
|
|
700
727
|
if (requestParameters['variables'] != null) {
|
|
701
728
|
queryParameters['variables'] = requestParameters['variables'];
|
|
@@ -703,160 +730,171 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
703
730
|
if (requestParameters['features'] != null) {
|
|
704
731
|
queryParameters['features'] = requestParameters['features'];
|
|
705
732
|
}
|
|
733
|
+
if (requestParameters['fieldToggles'] != null) {
|
|
734
|
+
queryParameters['fieldToggles'] = requestParameters['fieldToggles'];
|
|
735
|
+
}
|
|
706
736
|
headerParameters = {};
|
|
707
737
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
708
738
|
_a = headerParameters;
|
|
709
|
-
_b = "
|
|
710
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
739
|
+
_b = "Accept";
|
|
740
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
711
741
|
case 1:
|
|
712
|
-
_a[_b] =
|
|
713
|
-
|
|
742
|
+
_a[_b] = _12.sent(); // Accept authentication
|
|
743
|
+
_12.label = 2;
|
|
714
744
|
case 2:
|
|
715
745
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
716
746
|
_c = headerParameters;
|
|
717
|
-
_d = "
|
|
718
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
747
|
+
_d = "x-twitter-client-language";
|
|
748
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
719
749
|
case 3:
|
|
720
|
-
_c[_d] =
|
|
721
|
-
|
|
750
|
+
_c[_d] = _12.sent(); // ClientLanguage authentication
|
|
751
|
+
_12.label = 4;
|
|
722
752
|
case 4:
|
|
723
753
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
724
754
|
_e = headerParameters;
|
|
725
|
-
_f = "
|
|
726
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
755
|
+
_f = "Referer";
|
|
756
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
727
757
|
case 5:
|
|
728
|
-
_e[_f] =
|
|
729
|
-
|
|
758
|
+
_e[_f] = _12.sent(); // Referer authentication
|
|
759
|
+
_12.label = 6;
|
|
730
760
|
case 6:
|
|
731
761
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
732
762
|
_g = headerParameters;
|
|
733
763
|
_h = "Sec-Fetch-Dest";
|
|
734
764
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
735
765
|
case 7:
|
|
736
|
-
_g[_h] =
|
|
737
|
-
|
|
766
|
+
_g[_h] = _12.sent(); // SecFetchDest authentication
|
|
767
|
+
_12.label = 8;
|
|
738
768
|
case 8:
|
|
739
769
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
740
770
|
_j = headerParameters;
|
|
741
|
-
_k = "
|
|
742
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
771
|
+
_k = "Sec-Ch-Ua-Platform";
|
|
772
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
743
773
|
case 9:
|
|
744
|
-
_j[_k] =
|
|
745
|
-
|
|
774
|
+
_j[_k] = _12.sent(); // SecChUaPlatform authentication
|
|
775
|
+
_12.label = 10;
|
|
746
776
|
case 10:
|
|
747
777
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
748
778
|
_l = headerParameters;
|
|
749
|
-
_m = "Sec-
|
|
750
|
-
return [4 /*yield*/, this.configuration.apiKey("Sec-
|
|
779
|
+
_m = "Sec-Fetch-Mode";
|
|
780
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
751
781
|
case 11:
|
|
752
|
-
_l[_m] =
|
|
753
|
-
|
|
782
|
+
_l[_m] = _12.sent(); // SecFetchMode authentication
|
|
783
|
+
_12.label = 12;
|
|
754
784
|
case 12:
|
|
755
785
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
756
786
|
_o = headerParameters;
|
|
757
|
-
_p = "
|
|
758
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
787
|
+
_p = "x-csrf-token";
|
|
788
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
759
789
|
case 13:
|
|
760
|
-
_o[_p] =
|
|
761
|
-
|
|
790
|
+
_o[_p] = _12.sent(); // CsrfToken authentication
|
|
791
|
+
_12.label = 14;
|
|
762
792
|
case 14:
|
|
763
793
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
764
794
|
_q = headerParameters;
|
|
765
|
-
_r = "x-
|
|
766
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
795
|
+
_r = "x-client-uuid";
|
|
796
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-uuid")];
|
|
767
797
|
case 15:
|
|
768
|
-
_q[_r] =
|
|
769
|
-
|
|
798
|
+
_q[_r] = _12.sent(); // ClientUuid authentication
|
|
799
|
+
_12.label = 16;
|
|
770
800
|
case 16:
|
|
771
|
-
if (!(this.configuration && this.configuration.
|
|
772
|
-
_s = headerParameters;
|
|
773
|
-
_t = "x-guest-token";
|
|
774
|
-
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
775
|
-
case 17:
|
|
776
|
-
_s[_t] = _10.sent(); // GuestToken authentication
|
|
777
|
-
_10.label = 18;
|
|
778
|
-
case 18:
|
|
779
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
801
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 18];
|
|
780
802
|
token = this.configuration.accessToken;
|
|
781
803
|
return [4 /*yield*/, token("BearerAuth", [])];
|
|
782
|
-
case
|
|
783
|
-
tokenString =
|
|
804
|
+
case 17:
|
|
805
|
+
tokenString = _12.sent();
|
|
784
806
|
if (tokenString) {
|
|
785
807
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
786
808
|
}
|
|
787
|
-
|
|
809
|
+
_12.label = 18;
|
|
810
|
+
case 18:
|
|
811
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 20];
|
|
812
|
+
_s = headerParameters;
|
|
813
|
+
_t = "x-guest-token";
|
|
814
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
815
|
+
case 19:
|
|
816
|
+
_s[_t] = _12.sent(); // GuestToken authentication
|
|
817
|
+
_12.label = 20;
|
|
788
818
|
case 20:
|
|
789
819
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
790
820
|
_u = headerParameters;
|
|
791
821
|
_v = "Sec-Ch-Ua";
|
|
792
822
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
793
823
|
case 21:
|
|
794
|
-
_u[_v] =
|
|
795
|
-
|
|
824
|
+
_u[_v] = _12.sent(); // SecChUa authentication
|
|
825
|
+
_12.label = 22;
|
|
796
826
|
case 22:
|
|
797
827
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
798
828
|
_w = headerParameters;
|
|
799
|
-
_x = "x-
|
|
800
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
829
|
+
_x = "x-client-transaction-id";
|
|
830
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-transaction-id")];
|
|
801
831
|
case 23:
|
|
802
|
-
_w[_x] =
|
|
803
|
-
|
|
832
|
+
_w[_x] = _12.sent(); // ClientTransactionId authentication
|
|
833
|
+
_12.label = 24;
|
|
804
834
|
case 24:
|
|
805
835
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
806
836
|
_y = headerParameters;
|
|
807
|
-
_z = "user
|
|
808
|
-
return [4 /*yield*/, this.configuration.apiKey("user
|
|
837
|
+
_z = "x-twitter-active-user";
|
|
838
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
809
839
|
case 25:
|
|
810
|
-
_y[_z] =
|
|
811
|
-
|
|
840
|
+
_y[_z] = _12.sent(); // ActiveUser authentication
|
|
841
|
+
_12.label = 26;
|
|
812
842
|
case 26:
|
|
813
843
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
814
844
|
_0 = headerParameters;
|
|
815
|
-
_1 = "
|
|
816
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
845
|
+
_1 = "user-agent";
|
|
846
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
817
847
|
case 27:
|
|
818
|
-
_0[_1] =
|
|
819
|
-
|
|
848
|
+
_0[_1] = _12.sent(); // UserAgent authentication
|
|
849
|
+
_12.label = 28;
|
|
820
850
|
case 28:
|
|
821
851
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
822
852
|
_2 = headerParameters;
|
|
823
|
-
_3 = "
|
|
824
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
853
|
+
_3 = "Accept-Language";
|
|
854
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
825
855
|
case 29:
|
|
826
|
-
_2[_3] =
|
|
827
|
-
|
|
856
|
+
_2[_3] = _12.sent(); // AcceptLanguage authentication
|
|
857
|
+
_12.label = 30;
|
|
828
858
|
case 30:
|
|
829
859
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
830
860
|
_4 = headerParameters;
|
|
831
|
-
_5 = "
|
|
832
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
861
|
+
_5 = "Sec-Fetch-Site";
|
|
862
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
833
863
|
case 31:
|
|
834
|
-
_4[_5] =
|
|
835
|
-
|
|
864
|
+
_4[_5] = _12.sent(); // SecFetchSite authentication
|
|
865
|
+
_12.label = 32;
|
|
836
866
|
case 32:
|
|
837
867
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
838
868
|
_6 = headerParameters;
|
|
839
|
-
_7 = "
|
|
840
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
869
|
+
_7 = "x-twitter-auth-type";
|
|
870
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
841
871
|
case 33:
|
|
842
|
-
_6[_7] =
|
|
843
|
-
|
|
872
|
+
_6[_7] = _12.sent(); // AuthType authentication
|
|
873
|
+
_12.label = 34;
|
|
844
874
|
case 34:
|
|
845
875
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
846
876
|
_8 = headerParameters;
|
|
847
|
-
_9 = "
|
|
848
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
877
|
+
_9 = "Sec-Ch-Ua-Mobile";
|
|
878
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
849
879
|
case 35:
|
|
850
|
-
_8[_9] =
|
|
851
|
-
|
|
852
|
-
case 36:
|
|
880
|
+
_8[_9] = _12.sent(); // SecChUaMobile authentication
|
|
881
|
+
_12.label = 36;
|
|
882
|
+
case 36:
|
|
883
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 38];
|
|
884
|
+
_10 = headerParameters;
|
|
885
|
+
_11 = "Accept-Encoding";
|
|
886
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
887
|
+
case 37:
|
|
888
|
+
_10[_11] = _12.sent(); // AcceptEncoding authentication
|
|
889
|
+
_12.label = 38;
|
|
890
|
+
case 38: return [4 /*yield*/, this.request({
|
|
853
891
|
path: "/graphql/{pathQueryId}/Likes".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
854
892
|
method: 'GET',
|
|
855
893
|
headers: headerParameters,
|
|
856
894
|
query: queryParameters,
|
|
857
895
|
}, initOverrides)];
|
|
858
|
-
case
|
|
859
|
-
response =
|
|
896
|
+
case 39:
|
|
897
|
+
response = _12.sent();
|
|
860
898
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetLikes200ResponseFromJSON)(jsonValue); })];
|
|
861
899
|
}
|
|
862
900
|
});
|
|
@@ -884,9 +922,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
884
922
|
*/
|
|
885
923
|
TweetApi.prototype.getListLatestTweetsTimelineRaw = function (requestParameters, initOverrides) {
|
|
886
924
|
return __awaiter(this, void 0, void 0, function () {
|
|
887
|
-
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r,
|
|
888
|
-
return __generator(this, function (
|
|
889
|
-
switch (
|
|
925
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, token, tokenString, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, response;
|
|
926
|
+
return __generator(this, function (_12) {
|
|
927
|
+
switch (_12.label) {
|
|
890
928
|
case 0:
|
|
891
929
|
if (requestParameters['pathQueryId'] == null) {
|
|
892
930
|
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling getListLatestTweetsTimeline().');
|
|
@@ -907,157 +945,165 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
907
945
|
headerParameters = {};
|
|
908
946
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
909
947
|
_a = headerParameters;
|
|
910
|
-
_b = "
|
|
911
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
948
|
+
_b = "Accept";
|
|
949
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
912
950
|
case 1:
|
|
913
|
-
_a[_b] =
|
|
914
|
-
|
|
951
|
+
_a[_b] = _12.sent(); // Accept authentication
|
|
952
|
+
_12.label = 2;
|
|
915
953
|
case 2:
|
|
916
954
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
917
955
|
_c = headerParameters;
|
|
918
|
-
_d = "
|
|
919
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
956
|
+
_d = "x-twitter-client-language";
|
|
957
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
920
958
|
case 3:
|
|
921
|
-
_c[_d] =
|
|
922
|
-
|
|
959
|
+
_c[_d] = _12.sent(); // ClientLanguage authentication
|
|
960
|
+
_12.label = 4;
|
|
923
961
|
case 4:
|
|
924
962
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
925
963
|
_e = headerParameters;
|
|
926
|
-
_f = "
|
|
927
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
964
|
+
_f = "Referer";
|
|
965
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
928
966
|
case 5:
|
|
929
|
-
_e[_f] =
|
|
930
|
-
|
|
967
|
+
_e[_f] = _12.sent(); // Referer authentication
|
|
968
|
+
_12.label = 6;
|
|
931
969
|
case 6:
|
|
932
970
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
933
971
|
_g = headerParameters;
|
|
934
972
|
_h = "Sec-Fetch-Dest";
|
|
935
973
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
936
974
|
case 7:
|
|
937
|
-
_g[_h] =
|
|
938
|
-
|
|
975
|
+
_g[_h] = _12.sent(); // SecFetchDest authentication
|
|
976
|
+
_12.label = 8;
|
|
939
977
|
case 8:
|
|
940
978
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
941
979
|
_j = headerParameters;
|
|
942
|
-
_k = "
|
|
943
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
980
|
+
_k = "Sec-Ch-Ua-Platform";
|
|
981
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
944
982
|
case 9:
|
|
945
|
-
_j[_k] =
|
|
946
|
-
|
|
983
|
+
_j[_k] = _12.sent(); // SecChUaPlatform authentication
|
|
984
|
+
_12.label = 10;
|
|
947
985
|
case 10:
|
|
948
986
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
949
987
|
_l = headerParameters;
|
|
950
|
-
_m = "Sec-
|
|
951
|
-
return [4 /*yield*/, this.configuration.apiKey("Sec-
|
|
988
|
+
_m = "Sec-Fetch-Mode";
|
|
989
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
952
990
|
case 11:
|
|
953
|
-
_l[_m] =
|
|
954
|
-
|
|
991
|
+
_l[_m] = _12.sent(); // SecFetchMode authentication
|
|
992
|
+
_12.label = 12;
|
|
955
993
|
case 12:
|
|
956
994
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
957
995
|
_o = headerParameters;
|
|
958
|
-
_p = "
|
|
959
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
996
|
+
_p = "x-csrf-token";
|
|
997
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
960
998
|
case 13:
|
|
961
|
-
_o[_p] =
|
|
962
|
-
|
|
999
|
+
_o[_p] = _12.sent(); // CsrfToken authentication
|
|
1000
|
+
_12.label = 14;
|
|
963
1001
|
case 14:
|
|
964
1002
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
965
1003
|
_q = headerParameters;
|
|
966
|
-
_r = "x-
|
|
967
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
1004
|
+
_r = "x-client-uuid";
|
|
1005
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-uuid")];
|
|
968
1006
|
case 15:
|
|
969
|
-
_q[_r] =
|
|
970
|
-
|
|
1007
|
+
_q[_r] = _12.sent(); // ClientUuid authentication
|
|
1008
|
+
_12.label = 16;
|
|
971
1009
|
case 16:
|
|
972
|
-
if (!(this.configuration && this.configuration.
|
|
973
|
-
_s = headerParameters;
|
|
974
|
-
_t = "x-guest-token";
|
|
975
|
-
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
976
|
-
case 17:
|
|
977
|
-
_s[_t] = _10.sent(); // GuestToken authentication
|
|
978
|
-
_10.label = 18;
|
|
979
|
-
case 18:
|
|
980
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
1010
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 18];
|
|
981
1011
|
token = this.configuration.accessToken;
|
|
982
1012
|
return [4 /*yield*/, token("BearerAuth", [])];
|
|
983
|
-
case
|
|
984
|
-
tokenString =
|
|
1013
|
+
case 17:
|
|
1014
|
+
tokenString = _12.sent();
|
|
985
1015
|
if (tokenString) {
|
|
986
1016
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
987
1017
|
}
|
|
988
|
-
|
|
1018
|
+
_12.label = 18;
|
|
1019
|
+
case 18:
|
|
1020
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 20];
|
|
1021
|
+
_s = headerParameters;
|
|
1022
|
+
_t = "x-guest-token";
|
|
1023
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
1024
|
+
case 19:
|
|
1025
|
+
_s[_t] = _12.sent(); // GuestToken authentication
|
|
1026
|
+
_12.label = 20;
|
|
989
1027
|
case 20:
|
|
990
1028
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
991
1029
|
_u = headerParameters;
|
|
992
1030
|
_v = "Sec-Ch-Ua";
|
|
993
1031
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
994
1032
|
case 21:
|
|
995
|
-
_u[_v] =
|
|
996
|
-
|
|
1033
|
+
_u[_v] = _12.sent(); // SecChUa authentication
|
|
1034
|
+
_12.label = 22;
|
|
997
1035
|
case 22:
|
|
998
1036
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
999
1037
|
_w = headerParameters;
|
|
1000
|
-
_x = "x-
|
|
1001
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
1038
|
+
_x = "x-client-transaction-id";
|
|
1039
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-transaction-id")];
|
|
1002
1040
|
case 23:
|
|
1003
|
-
_w[_x] =
|
|
1004
|
-
|
|
1041
|
+
_w[_x] = _12.sent(); // ClientTransactionId authentication
|
|
1042
|
+
_12.label = 24;
|
|
1005
1043
|
case 24:
|
|
1006
1044
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
1007
1045
|
_y = headerParameters;
|
|
1008
|
-
_z = "user
|
|
1009
|
-
return [4 /*yield*/, this.configuration.apiKey("user
|
|
1046
|
+
_z = "x-twitter-active-user";
|
|
1047
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
1010
1048
|
case 25:
|
|
1011
|
-
_y[_z] =
|
|
1012
|
-
|
|
1049
|
+
_y[_z] = _12.sent(); // ActiveUser authentication
|
|
1050
|
+
_12.label = 26;
|
|
1013
1051
|
case 26:
|
|
1014
1052
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
1015
1053
|
_0 = headerParameters;
|
|
1016
|
-
_1 = "
|
|
1017
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1054
|
+
_1 = "user-agent";
|
|
1055
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
1018
1056
|
case 27:
|
|
1019
|
-
_0[_1] =
|
|
1020
|
-
|
|
1057
|
+
_0[_1] = _12.sent(); // UserAgent authentication
|
|
1058
|
+
_12.label = 28;
|
|
1021
1059
|
case 28:
|
|
1022
1060
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
1023
1061
|
_2 = headerParameters;
|
|
1024
|
-
_3 = "
|
|
1025
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1062
|
+
_3 = "Accept-Language";
|
|
1063
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
1026
1064
|
case 29:
|
|
1027
|
-
_2[_3] =
|
|
1028
|
-
|
|
1065
|
+
_2[_3] = _12.sent(); // AcceptLanguage authentication
|
|
1066
|
+
_12.label = 30;
|
|
1029
1067
|
case 30:
|
|
1030
1068
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
1031
1069
|
_4 = headerParameters;
|
|
1032
|
-
_5 = "
|
|
1033
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1070
|
+
_5 = "Sec-Fetch-Site";
|
|
1071
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
1034
1072
|
case 31:
|
|
1035
|
-
_4[_5] =
|
|
1036
|
-
|
|
1073
|
+
_4[_5] = _12.sent(); // SecFetchSite authentication
|
|
1074
|
+
_12.label = 32;
|
|
1037
1075
|
case 32:
|
|
1038
1076
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
1039
1077
|
_6 = headerParameters;
|
|
1040
|
-
_7 = "
|
|
1041
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1078
|
+
_7 = "x-twitter-auth-type";
|
|
1079
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
1042
1080
|
case 33:
|
|
1043
|
-
_6[_7] =
|
|
1044
|
-
|
|
1081
|
+
_6[_7] = _12.sent(); // AuthType authentication
|
|
1082
|
+
_12.label = 34;
|
|
1045
1083
|
case 34:
|
|
1046
1084
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
1047
1085
|
_8 = headerParameters;
|
|
1048
|
-
_9 = "
|
|
1049
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1086
|
+
_9 = "Sec-Ch-Ua-Mobile";
|
|
1087
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
1050
1088
|
case 35:
|
|
1051
|
-
_8[_9] =
|
|
1052
|
-
|
|
1053
|
-
case 36:
|
|
1089
|
+
_8[_9] = _12.sent(); // SecChUaMobile authentication
|
|
1090
|
+
_12.label = 36;
|
|
1091
|
+
case 36:
|
|
1092
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 38];
|
|
1093
|
+
_10 = headerParameters;
|
|
1094
|
+
_11 = "Accept-Encoding";
|
|
1095
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
1096
|
+
case 37:
|
|
1097
|
+
_10[_11] = _12.sent(); // AcceptEncoding authentication
|
|
1098
|
+
_12.label = 38;
|
|
1099
|
+
case 38: return [4 /*yield*/, this.request({
|
|
1054
1100
|
path: "/graphql/{pathQueryId}/ListLatestTweetsTimeline".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
1055
1101
|
method: 'GET',
|
|
1056
1102
|
headers: headerParameters,
|
|
1057
1103
|
query: queryParameters,
|
|
1058
1104
|
}, initOverrides)];
|
|
1059
|
-
case
|
|
1060
|
-
response =
|
|
1105
|
+
case 39:
|
|
1106
|
+
response = _12.sent();
|
|
1061
1107
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetListLatestTweetsTimeline200ResponseFromJSON)(jsonValue); })];
|
|
1062
1108
|
}
|
|
1063
1109
|
});
|
|
@@ -1085,9 +1131,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1085
1131
|
*/
|
|
1086
1132
|
TweetApi.prototype.getSearchTimelineRaw = function (requestParameters, initOverrides) {
|
|
1087
1133
|
return __awaiter(this, void 0, void 0, function () {
|
|
1088
|
-
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r,
|
|
1089
|
-
return __generator(this, function (
|
|
1090
|
-
switch (
|
|
1134
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, token, tokenString, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, response;
|
|
1135
|
+
return __generator(this, function (_12) {
|
|
1136
|
+
switch (_12.label) {
|
|
1091
1137
|
case 0:
|
|
1092
1138
|
if (requestParameters['pathQueryId'] == null) {
|
|
1093
1139
|
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling getSearchTimeline().');
|
|
@@ -1108,157 +1154,165 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1108
1154
|
headerParameters = {};
|
|
1109
1155
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1110
1156
|
_a = headerParameters;
|
|
1111
|
-
_b = "
|
|
1112
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1157
|
+
_b = "Accept";
|
|
1158
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
1113
1159
|
case 1:
|
|
1114
|
-
_a[_b] =
|
|
1115
|
-
|
|
1160
|
+
_a[_b] = _12.sent(); // Accept authentication
|
|
1161
|
+
_12.label = 2;
|
|
1116
1162
|
case 2:
|
|
1117
1163
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
1118
1164
|
_c = headerParameters;
|
|
1119
|
-
_d = "
|
|
1120
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1165
|
+
_d = "x-twitter-client-language";
|
|
1166
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
1121
1167
|
case 3:
|
|
1122
|
-
_c[_d] =
|
|
1123
|
-
|
|
1168
|
+
_c[_d] = _12.sent(); // ClientLanguage authentication
|
|
1169
|
+
_12.label = 4;
|
|
1124
1170
|
case 4:
|
|
1125
1171
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
1126
1172
|
_e = headerParameters;
|
|
1127
|
-
_f = "
|
|
1128
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1173
|
+
_f = "Referer";
|
|
1174
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
1129
1175
|
case 5:
|
|
1130
|
-
_e[_f] =
|
|
1131
|
-
|
|
1176
|
+
_e[_f] = _12.sent(); // Referer authentication
|
|
1177
|
+
_12.label = 6;
|
|
1132
1178
|
case 6:
|
|
1133
1179
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
1134
1180
|
_g = headerParameters;
|
|
1135
1181
|
_h = "Sec-Fetch-Dest";
|
|
1136
1182
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
1137
1183
|
case 7:
|
|
1138
|
-
_g[_h] =
|
|
1139
|
-
|
|
1184
|
+
_g[_h] = _12.sent(); // SecFetchDest authentication
|
|
1185
|
+
_12.label = 8;
|
|
1140
1186
|
case 8:
|
|
1141
1187
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
1142
1188
|
_j = headerParameters;
|
|
1143
|
-
_k = "
|
|
1144
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1189
|
+
_k = "Sec-Ch-Ua-Platform";
|
|
1190
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
1145
1191
|
case 9:
|
|
1146
|
-
_j[_k] =
|
|
1147
|
-
|
|
1192
|
+
_j[_k] = _12.sent(); // SecChUaPlatform authentication
|
|
1193
|
+
_12.label = 10;
|
|
1148
1194
|
case 10:
|
|
1149
1195
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
1150
1196
|
_l = headerParameters;
|
|
1151
|
-
_m = "Sec-
|
|
1152
|
-
return [4 /*yield*/, this.configuration.apiKey("Sec-
|
|
1197
|
+
_m = "Sec-Fetch-Mode";
|
|
1198
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
1153
1199
|
case 11:
|
|
1154
|
-
_l[_m] =
|
|
1155
|
-
|
|
1200
|
+
_l[_m] = _12.sent(); // SecFetchMode authentication
|
|
1201
|
+
_12.label = 12;
|
|
1156
1202
|
case 12:
|
|
1157
1203
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
1158
1204
|
_o = headerParameters;
|
|
1159
|
-
_p = "
|
|
1160
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1205
|
+
_p = "x-csrf-token";
|
|
1206
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
1161
1207
|
case 13:
|
|
1162
|
-
_o[_p] =
|
|
1163
|
-
|
|
1208
|
+
_o[_p] = _12.sent(); // CsrfToken authentication
|
|
1209
|
+
_12.label = 14;
|
|
1164
1210
|
case 14:
|
|
1165
1211
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
1166
1212
|
_q = headerParameters;
|
|
1167
|
-
_r = "x-
|
|
1168
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
1213
|
+
_r = "x-client-uuid";
|
|
1214
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-uuid")];
|
|
1169
1215
|
case 15:
|
|
1170
|
-
_q[_r] =
|
|
1171
|
-
|
|
1216
|
+
_q[_r] = _12.sent(); // ClientUuid authentication
|
|
1217
|
+
_12.label = 16;
|
|
1172
1218
|
case 16:
|
|
1173
|
-
if (!(this.configuration && this.configuration.
|
|
1174
|
-
_s = headerParameters;
|
|
1175
|
-
_t = "x-guest-token";
|
|
1176
|
-
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
1177
|
-
case 17:
|
|
1178
|
-
_s[_t] = _10.sent(); // GuestToken authentication
|
|
1179
|
-
_10.label = 18;
|
|
1180
|
-
case 18:
|
|
1181
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
1219
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 18];
|
|
1182
1220
|
token = this.configuration.accessToken;
|
|
1183
1221
|
return [4 /*yield*/, token("BearerAuth", [])];
|
|
1184
|
-
case
|
|
1185
|
-
tokenString =
|
|
1222
|
+
case 17:
|
|
1223
|
+
tokenString = _12.sent();
|
|
1186
1224
|
if (tokenString) {
|
|
1187
1225
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1188
1226
|
}
|
|
1189
|
-
|
|
1227
|
+
_12.label = 18;
|
|
1228
|
+
case 18:
|
|
1229
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 20];
|
|
1230
|
+
_s = headerParameters;
|
|
1231
|
+
_t = "x-guest-token";
|
|
1232
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
1233
|
+
case 19:
|
|
1234
|
+
_s[_t] = _12.sent(); // GuestToken authentication
|
|
1235
|
+
_12.label = 20;
|
|
1190
1236
|
case 20:
|
|
1191
1237
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
1192
1238
|
_u = headerParameters;
|
|
1193
1239
|
_v = "Sec-Ch-Ua";
|
|
1194
1240
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
1195
1241
|
case 21:
|
|
1196
|
-
_u[_v] =
|
|
1197
|
-
|
|
1242
|
+
_u[_v] = _12.sent(); // SecChUa authentication
|
|
1243
|
+
_12.label = 22;
|
|
1198
1244
|
case 22:
|
|
1199
1245
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
1200
1246
|
_w = headerParameters;
|
|
1201
|
-
_x = "x-
|
|
1202
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
1247
|
+
_x = "x-client-transaction-id";
|
|
1248
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-transaction-id")];
|
|
1203
1249
|
case 23:
|
|
1204
|
-
_w[_x] =
|
|
1205
|
-
|
|
1250
|
+
_w[_x] = _12.sent(); // ClientTransactionId authentication
|
|
1251
|
+
_12.label = 24;
|
|
1206
1252
|
case 24:
|
|
1207
1253
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
1208
1254
|
_y = headerParameters;
|
|
1209
|
-
_z = "user
|
|
1210
|
-
return [4 /*yield*/, this.configuration.apiKey("user
|
|
1255
|
+
_z = "x-twitter-active-user";
|
|
1256
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
1211
1257
|
case 25:
|
|
1212
|
-
_y[_z] =
|
|
1213
|
-
|
|
1258
|
+
_y[_z] = _12.sent(); // ActiveUser authentication
|
|
1259
|
+
_12.label = 26;
|
|
1214
1260
|
case 26:
|
|
1215
1261
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
1216
1262
|
_0 = headerParameters;
|
|
1217
|
-
_1 = "
|
|
1218
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1263
|
+
_1 = "user-agent";
|
|
1264
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
1219
1265
|
case 27:
|
|
1220
|
-
_0[_1] =
|
|
1221
|
-
|
|
1266
|
+
_0[_1] = _12.sent(); // UserAgent authentication
|
|
1267
|
+
_12.label = 28;
|
|
1222
1268
|
case 28:
|
|
1223
1269
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
1224
1270
|
_2 = headerParameters;
|
|
1225
|
-
_3 = "
|
|
1226
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1271
|
+
_3 = "Accept-Language";
|
|
1272
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
1227
1273
|
case 29:
|
|
1228
|
-
_2[_3] =
|
|
1229
|
-
|
|
1274
|
+
_2[_3] = _12.sent(); // AcceptLanguage authentication
|
|
1275
|
+
_12.label = 30;
|
|
1230
1276
|
case 30:
|
|
1231
1277
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
1232
1278
|
_4 = headerParameters;
|
|
1233
|
-
_5 = "
|
|
1234
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1279
|
+
_5 = "Sec-Fetch-Site";
|
|
1280
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
1235
1281
|
case 31:
|
|
1236
|
-
_4[_5] =
|
|
1237
|
-
|
|
1282
|
+
_4[_5] = _12.sent(); // SecFetchSite authentication
|
|
1283
|
+
_12.label = 32;
|
|
1238
1284
|
case 32:
|
|
1239
1285
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
1240
1286
|
_6 = headerParameters;
|
|
1241
|
-
_7 = "
|
|
1242
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1287
|
+
_7 = "x-twitter-auth-type";
|
|
1288
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
1243
1289
|
case 33:
|
|
1244
|
-
_6[_7] =
|
|
1245
|
-
|
|
1290
|
+
_6[_7] = _12.sent(); // AuthType authentication
|
|
1291
|
+
_12.label = 34;
|
|
1246
1292
|
case 34:
|
|
1247
1293
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
1248
1294
|
_8 = headerParameters;
|
|
1249
|
-
_9 = "
|
|
1250
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1295
|
+
_9 = "Sec-Ch-Ua-Mobile";
|
|
1296
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
1251
1297
|
case 35:
|
|
1252
|
-
_8[_9] =
|
|
1253
|
-
|
|
1254
|
-
case 36:
|
|
1298
|
+
_8[_9] = _12.sent(); // SecChUaMobile authentication
|
|
1299
|
+
_12.label = 36;
|
|
1300
|
+
case 36:
|
|
1301
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 38];
|
|
1302
|
+
_10 = headerParameters;
|
|
1303
|
+
_11 = "Accept-Encoding";
|
|
1304
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
1305
|
+
case 37:
|
|
1306
|
+
_10[_11] = _12.sent(); // AcceptEncoding authentication
|
|
1307
|
+
_12.label = 38;
|
|
1308
|
+
case 38: return [4 /*yield*/, this.request({
|
|
1255
1309
|
path: "/graphql/{pathQueryId}/SearchTimeline".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
1256
1310
|
method: 'GET',
|
|
1257
1311
|
headers: headerParameters,
|
|
1258
1312
|
query: queryParameters,
|
|
1259
1313
|
}, initOverrides)];
|
|
1260
|
-
case
|
|
1261
|
-
response =
|
|
1314
|
+
case 39:
|
|
1315
|
+
response = _12.sent();
|
|
1262
1316
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetSearchTimeline200ResponseFromJSON)(jsonValue); })];
|
|
1263
1317
|
}
|
|
1264
1318
|
});
|
|
@@ -1286,9 +1340,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1286
1340
|
*/
|
|
1287
1341
|
TweetApi.prototype.getTweetDetailRaw = function (requestParameters, initOverrides) {
|
|
1288
1342
|
return __awaiter(this, void 0, void 0, function () {
|
|
1289
|
-
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r,
|
|
1290
|
-
return __generator(this, function (
|
|
1291
|
-
switch (
|
|
1343
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, token, tokenString, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, response;
|
|
1344
|
+
return __generator(this, function (_12) {
|
|
1345
|
+
switch (_12.label) {
|
|
1292
1346
|
case 0:
|
|
1293
1347
|
if (requestParameters['pathQueryId'] == null) {
|
|
1294
1348
|
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling getTweetDetail().');
|
|
@@ -1315,157 +1369,165 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1315
1369
|
headerParameters = {};
|
|
1316
1370
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1317
1371
|
_a = headerParameters;
|
|
1318
|
-
_b = "
|
|
1319
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1372
|
+
_b = "Accept";
|
|
1373
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
1320
1374
|
case 1:
|
|
1321
|
-
_a[_b] =
|
|
1322
|
-
|
|
1375
|
+
_a[_b] = _12.sent(); // Accept authentication
|
|
1376
|
+
_12.label = 2;
|
|
1323
1377
|
case 2:
|
|
1324
1378
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
1325
1379
|
_c = headerParameters;
|
|
1326
|
-
_d = "
|
|
1327
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1380
|
+
_d = "x-twitter-client-language";
|
|
1381
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
1328
1382
|
case 3:
|
|
1329
|
-
_c[_d] =
|
|
1330
|
-
|
|
1383
|
+
_c[_d] = _12.sent(); // ClientLanguage authentication
|
|
1384
|
+
_12.label = 4;
|
|
1331
1385
|
case 4:
|
|
1332
1386
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
1333
1387
|
_e = headerParameters;
|
|
1334
|
-
_f = "
|
|
1335
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1388
|
+
_f = "Referer";
|
|
1389
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
1336
1390
|
case 5:
|
|
1337
|
-
_e[_f] =
|
|
1338
|
-
|
|
1391
|
+
_e[_f] = _12.sent(); // Referer authentication
|
|
1392
|
+
_12.label = 6;
|
|
1339
1393
|
case 6:
|
|
1340
1394
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
1341
1395
|
_g = headerParameters;
|
|
1342
1396
|
_h = "Sec-Fetch-Dest";
|
|
1343
1397
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
1344
1398
|
case 7:
|
|
1345
|
-
_g[_h] =
|
|
1346
|
-
|
|
1399
|
+
_g[_h] = _12.sent(); // SecFetchDest authentication
|
|
1400
|
+
_12.label = 8;
|
|
1347
1401
|
case 8:
|
|
1348
1402
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
1349
1403
|
_j = headerParameters;
|
|
1350
|
-
_k = "
|
|
1351
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1404
|
+
_k = "Sec-Ch-Ua-Platform";
|
|
1405
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
1352
1406
|
case 9:
|
|
1353
|
-
_j[_k] =
|
|
1354
|
-
|
|
1407
|
+
_j[_k] = _12.sent(); // SecChUaPlatform authentication
|
|
1408
|
+
_12.label = 10;
|
|
1355
1409
|
case 10:
|
|
1356
1410
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
1357
1411
|
_l = headerParameters;
|
|
1358
|
-
_m = "Sec-
|
|
1359
|
-
return [4 /*yield*/, this.configuration.apiKey("Sec-
|
|
1412
|
+
_m = "Sec-Fetch-Mode";
|
|
1413
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
1360
1414
|
case 11:
|
|
1361
|
-
_l[_m] =
|
|
1362
|
-
|
|
1415
|
+
_l[_m] = _12.sent(); // SecFetchMode authentication
|
|
1416
|
+
_12.label = 12;
|
|
1363
1417
|
case 12:
|
|
1364
1418
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
1365
1419
|
_o = headerParameters;
|
|
1366
|
-
_p = "
|
|
1367
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1420
|
+
_p = "x-csrf-token";
|
|
1421
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
1368
1422
|
case 13:
|
|
1369
|
-
_o[_p] =
|
|
1370
|
-
|
|
1423
|
+
_o[_p] = _12.sent(); // CsrfToken authentication
|
|
1424
|
+
_12.label = 14;
|
|
1371
1425
|
case 14:
|
|
1372
1426
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
1373
1427
|
_q = headerParameters;
|
|
1374
|
-
_r = "x-
|
|
1375
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
1428
|
+
_r = "x-client-uuid";
|
|
1429
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-uuid")];
|
|
1376
1430
|
case 15:
|
|
1377
|
-
_q[_r] =
|
|
1378
|
-
|
|
1431
|
+
_q[_r] = _12.sent(); // ClientUuid authentication
|
|
1432
|
+
_12.label = 16;
|
|
1379
1433
|
case 16:
|
|
1380
|
-
if (!(this.configuration && this.configuration.
|
|
1381
|
-
_s = headerParameters;
|
|
1382
|
-
_t = "x-guest-token";
|
|
1383
|
-
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
1384
|
-
case 17:
|
|
1385
|
-
_s[_t] = _10.sent(); // GuestToken authentication
|
|
1386
|
-
_10.label = 18;
|
|
1387
|
-
case 18:
|
|
1388
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
1434
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 18];
|
|
1389
1435
|
token = this.configuration.accessToken;
|
|
1390
1436
|
return [4 /*yield*/, token("BearerAuth", [])];
|
|
1391
|
-
case
|
|
1392
|
-
tokenString =
|
|
1437
|
+
case 17:
|
|
1438
|
+
tokenString = _12.sent();
|
|
1393
1439
|
if (tokenString) {
|
|
1394
1440
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1395
1441
|
}
|
|
1396
|
-
|
|
1442
|
+
_12.label = 18;
|
|
1443
|
+
case 18:
|
|
1444
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 20];
|
|
1445
|
+
_s = headerParameters;
|
|
1446
|
+
_t = "x-guest-token";
|
|
1447
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
1448
|
+
case 19:
|
|
1449
|
+
_s[_t] = _12.sent(); // GuestToken authentication
|
|
1450
|
+
_12.label = 20;
|
|
1397
1451
|
case 20:
|
|
1398
1452
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
1399
1453
|
_u = headerParameters;
|
|
1400
1454
|
_v = "Sec-Ch-Ua";
|
|
1401
1455
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
1402
1456
|
case 21:
|
|
1403
|
-
_u[_v] =
|
|
1404
|
-
|
|
1457
|
+
_u[_v] = _12.sent(); // SecChUa authentication
|
|
1458
|
+
_12.label = 22;
|
|
1405
1459
|
case 22:
|
|
1406
1460
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
1407
1461
|
_w = headerParameters;
|
|
1408
|
-
_x = "x-
|
|
1409
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
1462
|
+
_x = "x-client-transaction-id";
|
|
1463
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-transaction-id")];
|
|
1410
1464
|
case 23:
|
|
1411
|
-
_w[_x] =
|
|
1412
|
-
|
|
1465
|
+
_w[_x] = _12.sent(); // ClientTransactionId authentication
|
|
1466
|
+
_12.label = 24;
|
|
1413
1467
|
case 24:
|
|
1414
1468
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
1415
1469
|
_y = headerParameters;
|
|
1416
|
-
_z = "user
|
|
1417
|
-
return [4 /*yield*/, this.configuration.apiKey("user
|
|
1470
|
+
_z = "x-twitter-active-user";
|
|
1471
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
1418
1472
|
case 25:
|
|
1419
|
-
_y[_z] =
|
|
1420
|
-
|
|
1473
|
+
_y[_z] = _12.sent(); // ActiveUser authentication
|
|
1474
|
+
_12.label = 26;
|
|
1421
1475
|
case 26:
|
|
1422
1476
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
1423
1477
|
_0 = headerParameters;
|
|
1424
|
-
_1 = "
|
|
1425
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1478
|
+
_1 = "user-agent";
|
|
1479
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
1426
1480
|
case 27:
|
|
1427
|
-
_0[_1] =
|
|
1428
|
-
|
|
1481
|
+
_0[_1] = _12.sent(); // UserAgent authentication
|
|
1482
|
+
_12.label = 28;
|
|
1429
1483
|
case 28:
|
|
1430
1484
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
1431
1485
|
_2 = headerParameters;
|
|
1432
|
-
_3 = "
|
|
1433
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1486
|
+
_3 = "Accept-Language";
|
|
1487
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
1434
1488
|
case 29:
|
|
1435
|
-
_2[_3] =
|
|
1436
|
-
|
|
1489
|
+
_2[_3] = _12.sent(); // AcceptLanguage authentication
|
|
1490
|
+
_12.label = 30;
|
|
1437
1491
|
case 30:
|
|
1438
1492
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
1439
1493
|
_4 = headerParameters;
|
|
1440
|
-
_5 = "
|
|
1441
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1494
|
+
_5 = "Sec-Fetch-Site";
|
|
1495
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
1442
1496
|
case 31:
|
|
1443
|
-
_4[_5] =
|
|
1444
|
-
|
|
1497
|
+
_4[_5] = _12.sent(); // SecFetchSite authentication
|
|
1498
|
+
_12.label = 32;
|
|
1445
1499
|
case 32:
|
|
1446
1500
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
1447
1501
|
_6 = headerParameters;
|
|
1448
|
-
_7 = "
|
|
1449
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1502
|
+
_7 = "x-twitter-auth-type";
|
|
1503
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
1450
1504
|
case 33:
|
|
1451
|
-
_6[_7] =
|
|
1452
|
-
|
|
1505
|
+
_6[_7] = _12.sent(); // AuthType authentication
|
|
1506
|
+
_12.label = 34;
|
|
1453
1507
|
case 34:
|
|
1454
1508
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
1455
1509
|
_8 = headerParameters;
|
|
1456
|
-
_9 = "
|
|
1457
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1510
|
+
_9 = "Sec-Ch-Ua-Mobile";
|
|
1511
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
1458
1512
|
case 35:
|
|
1459
|
-
_8[_9] =
|
|
1460
|
-
|
|
1461
|
-
case 36:
|
|
1513
|
+
_8[_9] = _12.sent(); // SecChUaMobile authentication
|
|
1514
|
+
_12.label = 36;
|
|
1515
|
+
case 36:
|
|
1516
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 38];
|
|
1517
|
+
_10 = headerParameters;
|
|
1518
|
+
_11 = "Accept-Encoding";
|
|
1519
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
1520
|
+
case 37:
|
|
1521
|
+
_10[_11] = _12.sent(); // AcceptEncoding authentication
|
|
1522
|
+
_12.label = 38;
|
|
1523
|
+
case 38: return [4 /*yield*/, this.request({
|
|
1462
1524
|
path: "/graphql/{pathQueryId}/TweetDetail".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
1463
1525
|
method: 'GET',
|
|
1464
1526
|
headers: headerParameters,
|
|
1465
1527
|
query: queryParameters,
|
|
1466
1528
|
}, initOverrides)];
|
|
1467
|
-
case
|
|
1468
|
-
response =
|
|
1529
|
+
case 39:
|
|
1530
|
+
response = _12.sent();
|
|
1469
1531
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetTweetDetail200ResponseFromJSON)(jsonValue); })];
|
|
1470
1532
|
}
|
|
1471
1533
|
});
|
|
@@ -1493,9 +1555,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1493
1555
|
*/
|
|
1494
1556
|
TweetApi.prototype.getUserHighlightsTweetsRaw = function (requestParameters, initOverrides) {
|
|
1495
1557
|
return __awaiter(this, void 0, void 0, function () {
|
|
1496
|
-
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r,
|
|
1497
|
-
return __generator(this, function (
|
|
1498
|
-
switch (
|
|
1558
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, token, tokenString, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, response;
|
|
1559
|
+
return __generator(this, function (_12) {
|
|
1560
|
+
switch (_12.label) {
|
|
1499
1561
|
case 0:
|
|
1500
1562
|
if (requestParameters['pathQueryId'] == null) {
|
|
1501
1563
|
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling getUserHighlightsTweets().');
|
|
@@ -1516,157 +1578,165 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1516
1578
|
headerParameters = {};
|
|
1517
1579
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1518
1580
|
_a = headerParameters;
|
|
1519
|
-
_b = "
|
|
1520
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1581
|
+
_b = "Accept";
|
|
1582
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
1521
1583
|
case 1:
|
|
1522
|
-
_a[_b] =
|
|
1523
|
-
|
|
1584
|
+
_a[_b] = _12.sent(); // Accept authentication
|
|
1585
|
+
_12.label = 2;
|
|
1524
1586
|
case 2:
|
|
1525
1587
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
1526
1588
|
_c = headerParameters;
|
|
1527
|
-
_d = "
|
|
1528
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1589
|
+
_d = "x-twitter-client-language";
|
|
1590
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
1529
1591
|
case 3:
|
|
1530
|
-
_c[_d] =
|
|
1531
|
-
|
|
1592
|
+
_c[_d] = _12.sent(); // ClientLanguage authentication
|
|
1593
|
+
_12.label = 4;
|
|
1532
1594
|
case 4:
|
|
1533
1595
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
1534
1596
|
_e = headerParameters;
|
|
1535
|
-
_f = "
|
|
1536
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1597
|
+
_f = "Referer";
|
|
1598
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
1537
1599
|
case 5:
|
|
1538
|
-
_e[_f] =
|
|
1539
|
-
|
|
1600
|
+
_e[_f] = _12.sent(); // Referer authentication
|
|
1601
|
+
_12.label = 6;
|
|
1540
1602
|
case 6:
|
|
1541
1603
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
1542
1604
|
_g = headerParameters;
|
|
1543
1605
|
_h = "Sec-Fetch-Dest";
|
|
1544
1606
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
1545
1607
|
case 7:
|
|
1546
|
-
_g[_h] =
|
|
1547
|
-
|
|
1608
|
+
_g[_h] = _12.sent(); // SecFetchDest authentication
|
|
1609
|
+
_12.label = 8;
|
|
1548
1610
|
case 8:
|
|
1549
1611
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
1550
1612
|
_j = headerParameters;
|
|
1551
|
-
_k = "
|
|
1552
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1613
|
+
_k = "Sec-Ch-Ua-Platform";
|
|
1614
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
1553
1615
|
case 9:
|
|
1554
|
-
_j[_k] =
|
|
1555
|
-
|
|
1616
|
+
_j[_k] = _12.sent(); // SecChUaPlatform authentication
|
|
1617
|
+
_12.label = 10;
|
|
1556
1618
|
case 10:
|
|
1557
1619
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
1558
1620
|
_l = headerParameters;
|
|
1559
|
-
_m = "Sec-
|
|
1560
|
-
return [4 /*yield*/, this.configuration.apiKey("Sec-
|
|
1621
|
+
_m = "Sec-Fetch-Mode";
|
|
1622
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
1561
1623
|
case 11:
|
|
1562
|
-
_l[_m] =
|
|
1563
|
-
|
|
1624
|
+
_l[_m] = _12.sent(); // SecFetchMode authentication
|
|
1625
|
+
_12.label = 12;
|
|
1564
1626
|
case 12:
|
|
1565
1627
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
1566
1628
|
_o = headerParameters;
|
|
1567
|
-
_p = "
|
|
1568
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1629
|
+
_p = "x-csrf-token";
|
|
1630
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
1569
1631
|
case 13:
|
|
1570
|
-
_o[_p] =
|
|
1571
|
-
|
|
1632
|
+
_o[_p] = _12.sent(); // CsrfToken authentication
|
|
1633
|
+
_12.label = 14;
|
|
1572
1634
|
case 14:
|
|
1573
1635
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
1574
1636
|
_q = headerParameters;
|
|
1575
|
-
_r = "x-
|
|
1576
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
1637
|
+
_r = "x-client-uuid";
|
|
1638
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-uuid")];
|
|
1577
1639
|
case 15:
|
|
1578
|
-
_q[_r] =
|
|
1579
|
-
|
|
1640
|
+
_q[_r] = _12.sent(); // ClientUuid authentication
|
|
1641
|
+
_12.label = 16;
|
|
1580
1642
|
case 16:
|
|
1581
|
-
if (!(this.configuration && this.configuration.
|
|
1582
|
-
_s = headerParameters;
|
|
1583
|
-
_t = "x-guest-token";
|
|
1584
|
-
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
1585
|
-
case 17:
|
|
1586
|
-
_s[_t] = _10.sent(); // GuestToken authentication
|
|
1587
|
-
_10.label = 18;
|
|
1588
|
-
case 18:
|
|
1589
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
1643
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 18];
|
|
1590
1644
|
token = this.configuration.accessToken;
|
|
1591
1645
|
return [4 /*yield*/, token("BearerAuth", [])];
|
|
1592
|
-
case
|
|
1593
|
-
tokenString =
|
|
1646
|
+
case 17:
|
|
1647
|
+
tokenString = _12.sent();
|
|
1594
1648
|
if (tokenString) {
|
|
1595
1649
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1596
1650
|
}
|
|
1597
|
-
|
|
1651
|
+
_12.label = 18;
|
|
1652
|
+
case 18:
|
|
1653
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 20];
|
|
1654
|
+
_s = headerParameters;
|
|
1655
|
+
_t = "x-guest-token";
|
|
1656
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
1657
|
+
case 19:
|
|
1658
|
+
_s[_t] = _12.sent(); // GuestToken authentication
|
|
1659
|
+
_12.label = 20;
|
|
1598
1660
|
case 20:
|
|
1599
1661
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
1600
1662
|
_u = headerParameters;
|
|
1601
1663
|
_v = "Sec-Ch-Ua";
|
|
1602
1664
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
1603
1665
|
case 21:
|
|
1604
|
-
_u[_v] =
|
|
1605
|
-
|
|
1666
|
+
_u[_v] = _12.sent(); // SecChUa authentication
|
|
1667
|
+
_12.label = 22;
|
|
1606
1668
|
case 22:
|
|
1607
1669
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
1608
1670
|
_w = headerParameters;
|
|
1609
|
-
_x = "x-
|
|
1610
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
1671
|
+
_x = "x-client-transaction-id";
|
|
1672
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-transaction-id")];
|
|
1611
1673
|
case 23:
|
|
1612
|
-
_w[_x] =
|
|
1613
|
-
|
|
1674
|
+
_w[_x] = _12.sent(); // ClientTransactionId authentication
|
|
1675
|
+
_12.label = 24;
|
|
1614
1676
|
case 24:
|
|
1615
1677
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
1616
1678
|
_y = headerParameters;
|
|
1617
|
-
_z = "user
|
|
1618
|
-
return [4 /*yield*/, this.configuration.apiKey("user
|
|
1679
|
+
_z = "x-twitter-active-user";
|
|
1680
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
1619
1681
|
case 25:
|
|
1620
|
-
_y[_z] =
|
|
1621
|
-
|
|
1682
|
+
_y[_z] = _12.sent(); // ActiveUser authentication
|
|
1683
|
+
_12.label = 26;
|
|
1622
1684
|
case 26:
|
|
1623
1685
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
1624
1686
|
_0 = headerParameters;
|
|
1625
|
-
_1 = "
|
|
1626
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1687
|
+
_1 = "user-agent";
|
|
1688
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
1627
1689
|
case 27:
|
|
1628
|
-
_0[_1] =
|
|
1629
|
-
|
|
1690
|
+
_0[_1] = _12.sent(); // UserAgent authentication
|
|
1691
|
+
_12.label = 28;
|
|
1630
1692
|
case 28:
|
|
1631
1693
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
1632
1694
|
_2 = headerParameters;
|
|
1633
|
-
_3 = "
|
|
1634
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1695
|
+
_3 = "Accept-Language";
|
|
1696
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
1635
1697
|
case 29:
|
|
1636
|
-
_2[_3] =
|
|
1637
|
-
|
|
1698
|
+
_2[_3] = _12.sent(); // AcceptLanguage authentication
|
|
1699
|
+
_12.label = 30;
|
|
1638
1700
|
case 30:
|
|
1639
1701
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
1640
1702
|
_4 = headerParameters;
|
|
1641
|
-
_5 = "
|
|
1642
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1703
|
+
_5 = "Sec-Fetch-Site";
|
|
1704
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
1643
1705
|
case 31:
|
|
1644
|
-
_4[_5] =
|
|
1645
|
-
|
|
1706
|
+
_4[_5] = _12.sent(); // SecFetchSite authentication
|
|
1707
|
+
_12.label = 32;
|
|
1646
1708
|
case 32:
|
|
1647
1709
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
1648
1710
|
_6 = headerParameters;
|
|
1649
|
-
_7 = "
|
|
1650
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1711
|
+
_7 = "x-twitter-auth-type";
|
|
1712
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
1651
1713
|
case 33:
|
|
1652
|
-
_6[_7] =
|
|
1653
|
-
|
|
1714
|
+
_6[_7] = _12.sent(); // AuthType authentication
|
|
1715
|
+
_12.label = 34;
|
|
1654
1716
|
case 34:
|
|
1655
1717
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
1656
1718
|
_8 = headerParameters;
|
|
1657
|
-
_9 = "
|
|
1658
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1719
|
+
_9 = "Sec-Ch-Ua-Mobile";
|
|
1720
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
1659
1721
|
case 35:
|
|
1660
|
-
_8[_9] =
|
|
1661
|
-
|
|
1662
|
-
case 36:
|
|
1722
|
+
_8[_9] = _12.sent(); // SecChUaMobile authentication
|
|
1723
|
+
_12.label = 36;
|
|
1724
|
+
case 36:
|
|
1725
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 38];
|
|
1726
|
+
_10 = headerParameters;
|
|
1727
|
+
_11 = "Accept-Encoding";
|
|
1728
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
1729
|
+
case 37:
|
|
1730
|
+
_10[_11] = _12.sent(); // AcceptEncoding authentication
|
|
1731
|
+
_12.label = 38;
|
|
1732
|
+
case 38: return [4 /*yield*/, this.request({
|
|
1663
1733
|
path: "/graphql/{pathQueryId}/UserHighlightsTweets".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
1664
1734
|
method: 'GET',
|
|
1665
1735
|
headers: headerParameters,
|
|
1666
1736
|
query: queryParameters,
|
|
1667
1737
|
}, initOverrides)];
|
|
1668
|
-
case
|
|
1669
|
-
response =
|
|
1738
|
+
case 39:
|
|
1739
|
+
response = _12.sent();
|
|
1670
1740
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetUserHighlightsTweets200ResponseFromJSON)(jsonValue); })];
|
|
1671
1741
|
}
|
|
1672
1742
|
});
|
|
@@ -1694,9 +1764,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1694
1764
|
*/
|
|
1695
1765
|
TweetApi.prototype.getUserMediaRaw = function (requestParameters, initOverrides) {
|
|
1696
1766
|
return __awaiter(this, void 0, void 0, function () {
|
|
1697
|
-
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r,
|
|
1698
|
-
return __generator(this, function (
|
|
1699
|
-
switch (
|
|
1767
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, token, tokenString, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, response;
|
|
1768
|
+
return __generator(this, function (_12) {
|
|
1769
|
+
switch (_12.label) {
|
|
1700
1770
|
case 0:
|
|
1701
1771
|
if (requestParameters['pathQueryId'] == null) {
|
|
1702
1772
|
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling getUserMedia().');
|
|
@@ -1707,6 +1777,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1707
1777
|
if (requestParameters['features'] == null) {
|
|
1708
1778
|
throw new runtime.RequiredError('features', 'Required parameter "features" was null or undefined when calling getUserMedia().');
|
|
1709
1779
|
}
|
|
1780
|
+
if (requestParameters['fieldToggles'] == null) {
|
|
1781
|
+
throw new runtime.RequiredError('fieldToggles', 'Required parameter "fieldToggles" was null or undefined when calling getUserMedia().');
|
|
1782
|
+
}
|
|
1710
1783
|
queryParameters = {};
|
|
1711
1784
|
if (requestParameters['variables'] != null) {
|
|
1712
1785
|
queryParameters['variables'] = requestParameters['variables'];
|
|
@@ -1714,160 +1787,171 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1714
1787
|
if (requestParameters['features'] != null) {
|
|
1715
1788
|
queryParameters['features'] = requestParameters['features'];
|
|
1716
1789
|
}
|
|
1790
|
+
if (requestParameters['fieldToggles'] != null) {
|
|
1791
|
+
queryParameters['fieldToggles'] = requestParameters['fieldToggles'];
|
|
1792
|
+
}
|
|
1717
1793
|
headerParameters = {};
|
|
1718
1794
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1719
1795
|
_a = headerParameters;
|
|
1720
|
-
_b = "
|
|
1721
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1796
|
+
_b = "Accept";
|
|
1797
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
1722
1798
|
case 1:
|
|
1723
|
-
_a[_b] =
|
|
1724
|
-
|
|
1799
|
+
_a[_b] = _12.sent(); // Accept authentication
|
|
1800
|
+
_12.label = 2;
|
|
1725
1801
|
case 2:
|
|
1726
1802
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
1727
1803
|
_c = headerParameters;
|
|
1728
|
-
_d = "
|
|
1729
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1804
|
+
_d = "x-twitter-client-language";
|
|
1805
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
1730
1806
|
case 3:
|
|
1731
|
-
_c[_d] =
|
|
1732
|
-
|
|
1807
|
+
_c[_d] = _12.sent(); // ClientLanguage authentication
|
|
1808
|
+
_12.label = 4;
|
|
1733
1809
|
case 4:
|
|
1734
1810
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
1735
1811
|
_e = headerParameters;
|
|
1736
|
-
_f = "
|
|
1737
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1812
|
+
_f = "Referer";
|
|
1813
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
1738
1814
|
case 5:
|
|
1739
|
-
_e[_f] =
|
|
1740
|
-
|
|
1815
|
+
_e[_f] = _12.sent(); // Referer authentication
|
|
1816
|
+
_12.label = 6;
|
|
1741
1817
|
case 6:
|
|
1742
1818
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
1743
1819
|
_g = headerParameters;
|
|
1744
1820
|
_h = "Sec-Fetch-Dest";
|
|
1745
1821
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
1746
1822
|
case 7:
|
|
1747
|
-
_g[_h] =
|
|
1748
|
-
|
|
1823
|
+
_g[_h] = _12.sent(); // SecFetchDest authentication
|
|
1824
|
+
_12.label = 8;
|
|
1749
1825
|
case 8:
|
|
1750
1826
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
1751
1827
|
_j = headerParameters;
|
|
1752
|
-
_k = "
|
|
1753
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1828
|
+
_k = "Sec-Ch-Ua-Platform";
|
|
1829
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
1754
1830
|
case 9:
|
|
1755
|
-
_j[_k] =
|
|
1756
|
-
|
|
1831
|
+
_j[_k] = _12.sent(); // SecChUaPlatform authentication
|
|
1832
|
+
_12.label = 10;
|
|
1757
1833
|
case 10:
|
|
1758
1834
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
1759
1835
|
_l = headerParameters;
|
|
1760
|
-
_m = "Sec-
|
|
1761
|
-
return [4 /*yield*/, this.configuration.apiKey("Sec-
|
|
1836
|
+
_m = "Sec-Fetch-Mode";
|
|
1837
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
1762
1838
|
case 11:
|
|
1763
|
-
_l[_m] =
|
|
1764
|
-
|
|
1839
|
+
_l[_m] = _12.sent(); // SecFetchMode authentication
|
|
1840
|
+
_12.label = 12;
|
|
1765
1841
|
case 12:
|
|
1766
1842
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
1767
1843
|
_o = headerParameters;
|
|
1768
|
-
_p = "
|
|
1769
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1844
|
+
_p = "x-csrf-token";
|
|
1845
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
1770
1846
|
case 13:
|
|
1771
|
-
_o[_p] =
|
|
1772
|
-
|
|
1847
|
+
_o[_p] = _12.sent(); // CsrfToken authentication
|
|
1848
|
+
_12.label = 14;
|
|
1773
1849
|
case 14:
|
|
1774
1850
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
1775
1851
|
_q = headerParameters;
|
|
1776
|
-
_r = "x-
|
|
1777
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
1852
|
+
_r = "x-client-uuid";
|
|
1853
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-uuid")];
|
|
1778
1854
|
case 15:
|
|
1779
|
-
_q[_r] =
|
|
1780
|
-
|
|
1855
|
+
_q[_r] = _12.sent(); // ClientUuid authentication
|
|
1856
|
+
_12.label = 16;
|
|
1781
1857
|
case 16:
|
|
1782
|
-
if (!(this.configuration && this.configuration.
|
|
1783
|
-
_s = headerParameters;
|
|
1784
|
-
_t = "x-guest-token";
|
|
1785
|
-
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
1786
|
-
case 17:
|
|
1787
|
-
_s[_t] = _10.sent(); // GuestToken authentication
|
|
1788
|
-
_10.label = 18;
|
|
1789
|
-
case 18:
|
|
1790
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
1858
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 18];
|
|
1791
1859
|
token = this.configuration.accessToken;
|
|
1792
1860
|
return [4 /*yield*/, token("BearerAuth", [])];
|
|
1793
|
-
case
|
|
1794
|
-
tokenString =
|
|
1861
|
+
case 17:
|
|
1862
|
+
tokenString = _12.sent();
|
|
1795
1863
|
if (tokenString) {
|
|
1796
1864
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1797
1865
|
}
|
|
1798
|
-
|
|
1866
|
+
_12.label = 18;
|
|
1867
|
+
case 18:
|
|
1868
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 20];
|
|
1869
|
+
_s = headerParameters;
|
|
1870
|
+
_t = "x-guest-token";
|
|
1871
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
1872
|
+
case 19:
|
|
1873
|
+
_s[_t] = _12.sent(); // GuestToken authentication
|
|
1874
|
+
_12.label = 20;
|
|
1799
1875
|
case 20:
|
|
1800
1876
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
1801
1877
|
_u = headerParameters;
|
|
1802
1878
|
_v = "Sec-Ch-Ua";
|
|
1803
1879
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
1804
1880
|
case 21:
|
|
1805
|
-
_u[_v] =
|
|
1806
|
-
|
|
1881
|
+
_u[_v] = _12.sent(); // SecChUa authentication
|
|
1882
|
+
_12.label = 22;
|
|
1807
1883
|
case 22:
|
|
1808
1884
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
1809
1885
|
_w = headerParameters;
|
|
1810
|
-
_x = "x-
|
|
1811
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
1886
|
+
_x = "x-client-transaction-id";
|
|
1887
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-transaction-id")];
|
|
1812
1888
|
case 23:
|
|
1813
|
-
_w[_x] =
|
|
1814
|
-
|
|
1889
|
+
_w[_x] = _12.sent(); // ClientTransactionId authentication
|
|
1890
|
+
_12.label = 24;
|
|
1815
1891
|
case 24:
|
|
1816
1892
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
1817
1893
|
_y = headerParameters;
|
|
1818
|
-
_z = "user
|
|
1819
|
-
return [4 /*yield*/, this.configuration.apiKey("user
|
|
1894
|
+
_z = "x-twitter-active-user";
|
|
1895
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
1820
1896
|
case 25:
|
|
1821
|
-
_y[_z] =
|
|
1822
|
-
|
|
1897
|
+
_y[_z] = _12.sent(); // ActiveUser authentication
|
|
1898
|
+
_12.label = 26;
|
|
1823
1899
|
case 26:
|
|
1824
1900
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
1825
1901
|
_0 = headerParameters;
|
|
1826
|
-
_1 = "
|
|
1827
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1902
|
+
_1 = "user-agent";
|
|
1903
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
1828
1904
|
case 27:
|
|
1829
|
-
_0[_1] =
|
|
1830
|
-
|
|
1905
|
+
_0[_1] = _12.sent(); // UserAgent authentication
|
|
1906
|
+
_12.label = 28;
|
|
1831
1907
|
case 28:
|
|
1832
1908
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
1833
1909
|
_2 = headerParameters;
|
|
1834
|
-
_3 = "
|
|
1835
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1910
|
+
_3 = "Accept-Language";
|
|
1911
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
1836
1912
|
case 29:
|
|
1837
|
-
_2[_3] =
|
|
1838
|
-
|
|
1913
|
+
_2[_3] = _12.sent(); // AcceptLanguage authentication
|
|
1914
|
+
_12.label = 30;
|
|
1839
1915
|
case 30:
|
|
1840
1916
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
1841
1917
|
_4 = headerParameters;
|
|
1842
|
-
_5 = "
|
|
1843
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1918
|
+
_5 = "Sec-Fetch-Site";
|
|
1919
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
1844
1920
|
case 31:
|
|
1845
|
-
_4[_5] =
|
|
1846
|
-
|
|
1921
|
+
_4[_5] = _12.sent(); // SecFetchSite authentication
|
|
1922
|
+
_12.label = 32;
|
|
1847
1923
|
case 32:
|
|
1848
1924
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
1849
1925
|
_6 = headerParameters;
|
|
1850
|
-
_7 = "
|
|
1851
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1926
|
+
_7 = "x-twitter-auth-type";
|
|
1927
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
1852
1928
|
case 33:
|
|
1853
|
-
_6[_7] =
|
|
1854
|
-
|
|
1929
|
+
_6[_7] = _12.sent(); // AuthType authentication
|
|
1930
|
+
_12.label = 34;
|
|
1855
1931
|
case 34:
|
|
1856
1932
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
1857
1933
|
_8 = headerParameters;
|
|
1858
|
-
_9 = "
|
|
1859
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
1934
|
+
_9 = "Sec-Ch-Ua-Mobile";
|
|
1935
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
1860
1936
|
case 35:
|
|
1861
|
-
_8[_9] =
|
|
1862
|
-
|
|
1863
|
-
case 36:
|
|
1937
|
+
_8[_9] = _12.sent(); // SecChUaMobile authentication
|
|
1938
|
+
_12.label = 36;
|
|
1939
|
+
case 36:
|
|
1940
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 38];
|
|
1941
|
+
_10 = headerParameters;
|
|
1942
|
+
_11 = "Accept-Encoding";
|
|
1943
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
1944
|
+
case 37:
|
|
1945
|
+
_10[_11] = _12.sent(); // AcceptEncoding authentication
|
|
1946
|
+
_12.label = 38;
|
|
1947
|
+
case 38: return [4 /*yield*/, this.request({
|
|
1864
1948
|
path: "/graphql/{pathQueryId}/UserMedia".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
1865
1949
|
method: 'GET',
|
|
1866
1950
|
headers: headerParameters,
|
|
1867
1951
|
query: queryParameters,
|
|
1868
1952
|
}, initOverrides)];
|
|
1869
|
-
case
|
|
1870
|
-
response =
|
|
1953
|
+
case 39:
|
|
1954
|
+
response = _12.sent();
|
|
1871
1955
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetLikes200ResponseFromJSON)(jsonValue); })];
|
|
1872
1956
|
}
|
|
1873
1957
|
});
|
|
@@ -1895,9 +1979,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1895
1979
|
*/
|
|
1896
1980
|
TweetApi.prototype.getUserTweetsRaw = function (requestParameters, initOverrides) {
|
|
1897
1981
|
return __awaiter(this, void 0, void 0, function () {
|
|
1898
|
-
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r,
|
|
1899
|
-
return __generator(this, function (
|
|
1900
|
-
switch (
|
|
1982
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, token, tokenString, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, response;
|
|
1983
|
+
return __generator(this, function (_12) {
|
|
1984
|
+
switch (_12.label) {
|
|
1901
1985
|
case 0:
|
|
1902
1986
|
if (requestParameters['pathQueryId'] == null) {
|
|
1903
1987
|
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling getUserTweets().');
|
|
@@ -1908,6 +1992,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1908
1992
|
if (requestParameters['features'] == null) {
|
|
1909
1993
|
throw new runtime.RequiredError('features', 'Required parameter "features" was null or undefined when calling getUserTweets().');
|
|
1910
1994
|
}
|
|
1995
|
+
if (requestParameters['fieldToggles'] == null) {
|
|
1996
|
+
throw new runtime.RequiredError('fieldToggles', 'Required parameter "fieldToggles" was null or undefined when calling getUserTweets().');
|
|
1997
|
+
}
|
|
1911
1998
|
queryParameters = {};
|
|
1912
1999
|
if (requestParameters['variables'] != null) {
|
|
1913
2000
|
queryParameters['variables'] = requestParameters['variables'];
|
|
@@ -1915,160 +2002,171 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
1915
2002
|
if (requestParameters['features'] != null) {
|
|
1916
2003
|
queryParameters['features'] = requestParameters['features'];
|
|
1917
2004
|
}
|
|
2005
|
+
if (requestParameters['fieldToggles'] != null) {
|
|
2006
|
+
queryParameters['fieldToggles'] = requestParameters['fieldToggles'];
|
|
2007
|
+
}
|
|
1918
2008
|
headerParameters = {};
|
|
1919
2009
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1920
2010
|
_a = headerParameters;
|
|
1921
|
-
_b = "
|
|
1922
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2011
|
+
_b = "Accept";
|
|
2012
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
1923
2013
|
case 1:
|
|
1924
|
-
_a[_b] =
|
|
1925
|
-
|
|
2014
|
+
_a[_b] = _12.sent(); // Accept authentication
|
|
2015
|
+
_12.label = 2;
|
|
1926
2016
|
case 2:
|
|
1927
2017
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
1928
2018
|
_c = headerParameters;
|
|
1929
|
-
_d = "
|
|
1930
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2019
|
+
_d = "x-twitter-client-language";
|
|
2020
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
1931
2021
|
case 3:
|
|
1932
|
-
_c[_d] =
|
|
1933
|
-
|
|
2022
|
+
_c[_d] = _12.sent(); // ClientLanguage authentication
|
|
2023
|
+
_12.label = 4;
|
|
1934
2024
|
case 4:
|
|
1935
2025
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
1936
2026
|
_e = headerParameters;
|
|
1937
|
-
_f = "
|
|
1938
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2027
|
+
_f = "Referer";
|
|
2028
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
1939
2029
|
case 5:
|
|
1940
|
-
_e[_f] =
|
|
1941
|
-
|
|
2030
|
+
_e[_f] = _12.sent(); // Referer authentication
|
|
2031
|
+
_12.label = 6;
|
|
1942
2032
|
case 6:
|
|
1943
2033
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
1944
2034
|
_g = headerParameters;
|
|
1945
2035
|
_h = "Sec-Fetch-Dest";
|
|
1946
2036
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
1947
2037
|
case 7:
|
|
1948
|
-
_g[_h] =
|
|
1949
|
-
|
|
2038
|
+
_g[_h] = _12.sent(); // SecFetchDest authentication
|
|
2039
|
+
_12.label = 8;
|
|
1950
2040
|
case 8:
|
|
1951
2041
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
1952
2042
|
_j = headerParameters;
|
|
1953
|
-
_k = "
|
|
1954
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2043
|
+
_k = "Sec-Ch-Ua-Platform";
|
|
2044
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
1955
2045
|
case 9:
|
|
1956
|
-
_j[_k] =
|
|
1957
|
-
|
|
2046
|
+
_j[_k] = _12.sent(); // SecChUaPlatform authentication
|
|
2047
|
+
_12.label = 10;
|
|
1958
2048
|
case 10:
|
|
1959
2049
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
1960
2050
|
_l = headerParameters;
|
|
1961
|
-
_m = "Sec-
|
|
1962
|
-
return [4 /*yield*/, this.configuration.apiKey("Sec-
|
|
2051
|
+
_m = "Sec-Fetch-Mode";
|
|
2052
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
1963
2053
|
case 11:
|
|
1964
|
-
_l[_m] =
|
|
1965
|
-
|
|
2054
|
+
_l[_m] = _12.sent(); // SecFetchMode authentication
|
|
2055
|
+
_12.label = 12;
|
|
1966
2056
|
case 12:
|
|
1967
2057
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
1968
2058
|
_o = headerParameters;
|
|
1969
|
-
_p = "
|
|
1970
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2059
|
+
_p = "x-csrf-token";
|
|
2060
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
1971
2061
|
case 13:
|
|
1972
|
-
_o[_p] =
|
|
1973
|
-
|
|
2062
|
+
_o[_p] = _12.sent(); // CsrfToken authentication
|
|
2063
|
+
_12.label = 14;
|
|
1974
2064
|
case 14:
|
|
1975
2065
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
1976
2066
|
_q = headerParameters;
|
|
1977
|
-
_r = "x-
|
|
1978
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
2067
|
+
_r = "x-client-uuid";
|
|
2068
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-uuid")];
|
|
1979
2069
|
case 15:
|
|
1980
|
-
_q[_r] =
|
|
1981
|
-
|
|
2070
|
+
_q[_r] = _12.sent(); // ClientUuid authentication
|
|
2071
|
+
_12.label = 16;
|
|
1982
2072
|
case 16:
|
|
1983
|
-
if (!(this.configuration && this.configuration.
|
|
1984
|
-
_s = headerParameters;
|
|
1985
|
-
_t = "x-guest-token";
|
|
1986
|
-
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
1987
|
-
case 17:
|
|
1988
|
-
_s[_t] = _10.sent(); // GuestToken authentication
|
|
1989
|
-
_10.label = 18;
|
|
1990
|
-
case 18:
|
|
1991
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
2073
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 18];
|
|
1992
2074
|
token = this.configuration.accessToken;
|
|
1993
2075
|
return [4 /*yield*/, token("BearerAuth", [])];
|
|
1994
|
-
case
|
|
1995
|
-
tokenString =
|
|
2076
|
+
case 17:
|
|
2077
|
+
tokenString = _12.sent();
|
|
1996
2078
|
if (tokenString) {
|
|
1997
2079
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1998
2080
|
}
|
|
1999
|
-
|
|
2081
|
+
_12.label = 18;
|
|
2082
|
+
case 18:
|
|
2083
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 20];
|
|
2084
|
+
_s = headerParameters;
|
|
2085
|
+
_t = "x-guest-token";
|
|
2086
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
2087
|
+
case 19:
|
|
2088
|
+
_s[_t] = _12.sent(); // GuestToken authentication
|
|
2089
|
+
_12.label = 20;
|
|
2000
2090
|
case 20:
|
|
2001
2091
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
2002
2092
|
_u = headerParameters;
|
|
2003
2093
|
_v = "Sec-Ch-Ua";
|
|
2004
2094
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
2005
2095
|
case 21:
|
|
2006
|
-
_u[_v] =
|
|
2007
|
-
|
|
2096
|
+
_u[_v] = _12.sent(); // SecChUa authentication
|
|
2097
|
+
_12.label = 22;
|
|
2008
2098
|
case 22:
|
|
2009
2099
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
2010
2100
|
_w = headerParameters;
|
|
2011
|
-
_x = "x-
|
|
2012
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
2101
|
+
_x = "x-client-transaction-id";
|
|
2102
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-transaction-id")];
|
|
2013
2103
|
case 23:
|
|
2014
|
-
_w[_x] =
|
|
2015
|
-
|
|
2104
|
+
_w[_x] = _12.sent(); // ClientTransactionId authentication
|
|
2105
|
+
_12.label = 24;
|
|
2016
2106
|
case 24:
|
|
2017
2107
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
2018
2108
|
_y = headerParameters;
|
|
2019
|
-
_z = "user
|
|
2020
|
-
return [4 /*yield*/, this.configuration.apiKey("user
|
|
2109
|
+
_z = "x-twitter-active-user";
|
|
2110
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
2021
2111
|
case 25:
|
|
2022
|
-
_y[_z] =
|
|
2023
|
-
|
|
2112
|
+
_y[_z] = _12.sent(); // ActiveUser authentication
|
|
2113
|
+
_12.label = 26;
|
|
2024
2114
|
case 26:
|
|
2025
2115
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
2026
2116
|
_0 = headerParameters;
|
|
2027
|
-
_1 = "
|
|
2028
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2117
|
+
_1 = "user-agent";
|
|
2118
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
2029
2119
|
case 27:
|
|
2030
|
-
_0[_1] =
|
|
2031
|
-
|
|
2120
|
+
_0[_1] = _12.sent(); // UserAgent authentication
|
|
2121
|
+
_12.label = 28;
|
|
2032
2122
|
case 28:
|
|
2033
2123
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
2034
2124
|
_2 = headerParameters;
|
|
2035
|
-
_3 = "
|
|
2036
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2125
|
+
_3 = "Accept-Language";
|
|
2126
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
2037
2127
|
case 29:
|
|
2038
|
-
_2[_3] =
|
|
2039
|
-
|
|
2128
|
+
_2[_3] = _12.sent(); // AcceptLanguage authentication
|
|
2129
|
+
_12.label = 30;
|
|
2040
2130
|
case 30:
|
|
2041
2131
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
2042
2132
|
_4 = headerParameters;
|
|
2043
|
-
_5 = "
|
|
2044
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2133
|
+
_5 = "Sec-Fetch-Site";
|
|
2134
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
2045
2135
|
case 31:
|
|
2046
|
-
_4[_5] =
|
|
2047
|
-
|
|
2136
|
+
_4[_5] = _12.sent(); // SecFetchSite authentication
|
|
2137
|
+
_12.label = 32;
|
|
2048
2138
|
case 32:
|
|
2049
2139
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
2050
2140
|
_6 = headerParameters;
|
|
2051
|
-
_7 = "
|
|
2052
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2141
|
+
_7 = "x-twitter-auth-type";
|
|
2142
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
2053
2143
|
case 33:
|
|
2054
|
-
_6[_7] =
|
|
2055
|
-
|
|
2144
|
+
_6[_7] = _12.sent(); // AuthType authentication
|
|
2145
|
+
_12.label = 34;
|
|
2056
2146
|
case 34:
|
|
2057
2147
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
2058
2148
|
_8 = headerParameters;
|
|
2059
|
-
_9 = "
|
|
2060
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2149
|
+
_9 = "Sec-Ch-Ua-Mobile";
|
|
2150
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
2061
2151
|
case 35:
|
|
2062
|
-
_8[_9] =
|
|
2063
|
-
|
|
2064
|
-
case 36:
|
|
2152
|
+
_8[_9] = _12.sent(); // SecChUaMobile authentication
|
|
2153
|
+
_12.label = 36;
|
|
2154
|
+
case 36:
|
|
2155
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 38];
|
|
2156
|
+
_10 = headerParameters;
|
|
2157
|
+
_11 = "Accept-Encoding";
|
|
2158
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
2159
|
+
case 37:
|
|
2160
|
+
_10[_11] = _12.sent(); // AcceptEncoding authentication
|
|
2161
|
+
_12.label = 38;
|
|
2162
|
+
case 38: return [4 /*yield*/, this.request({
|
|
2065
2163
|
path: "/graphql/{pathQueryId}/UserTweets".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
2066
2164
|
method: 'GET',
|
|
2067
2165
|
headers: headerParameters,
|
|
2068
2166
|
query: queryParameters,
|
|
2069
2167
|
}, initOverrides)];
|
|
2070
|
-
case
|
|
2071
|
-
response =
|
|
2168
|
+
case 39:
|
|
2169
|
+
response = _12.sent();
|
|
2072
2170
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetLikes200ResponseFromJSON)(jsonValue); })];
|
|
2073
2171
|
}
|
|
2074
2172
|
});
|
|
@@ -2096,9 +2194,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
2096
2194
|
*/
|
|
2097
2195
|
TweetApi.prototype.getUserTweetsAndRepliesRaw = function (requestParameters, initOverrides) {
|
|
2098
2196
|
return __awaiter(this, void 0, void 0, function () {
|
|
2099
|
-
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r,
|
|
2100
|
-
return __generator(this, function (
|
|
2101
|
-
switch (
|
|
2197
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, token, tokenString, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, response;
|
|
2198
|
+
return __generator(this, function (_12) {
|
|
2199
|
+
switch (_12.label) {
|
|
2102
2200
|
case 0:
|
|
2103
2201
|
if (requestParameters['pathQueryId'] == null) {
|
|
2104
2202
|
throw new runtime.RequiredError('pathQueryId', 'Required parameter "pathQueryId" was null or undefined when calling getUserTweetsAndReplies().');
|
|
@@ -2109,6 +2207,9 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
2109
2207
|
if (requestParameters['features'] == null) {
|
|
2110
2208
|
throw new runtime.RequiredError('features', 'Required parameter "features" was null or undefined when calling getUserTweetsAndReplies().');
|
|
2111
2209
|
}
|
|
2210
|
+
if (requestParameters['fieldToggles'] == null) {
|
|
2211
|
+
throw new runtime.RequiredError('fieldToggles', 'Required parameter "fieldToggles" was null or undefined when calling getUserTweetsAndReplies().');
|
|
2212
|
+
}
|
|
2112
2213
|
queryParameters = {};
|
|
2113
2214
|
if (requestParameters['variables'] != null) {
|
|
2114
2215
|
queryParameters['variables'] = requestParameters['variables'];
|
|
@@ -2116,160 +2217,171 @@ var TweetApi = /** @class */ (function (_super) {
|
|
|
2116
2217
|
if (requestParameters['features'] != null) {
|
|
2117
2218
|
queryParameters['features'] = requestParameters['features'];
|
|
2118
2219
|
}
|
|
2220
|
+
if (requestParameters['fieldToggles'] != null) {
|
|
2221
|
+
queryParameters['fieldToggles'] = requestParameters['fieldToggles'];
|
|
2222
|
+
}
|
|
2119
2223
|
headerParameters = {};
|
|
2120
2224
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
2121
2225
|
_a = headerParameters;
|
|
2122
|
-
_b = "
|
|
2123
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2226
|
+
_b = "Accept";
|
|
2227
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept")];
|
|
2124
2228
|
case 1:
|
|
2125
|
-
_a[_b] =
|
|
2126
|
-
|
|
2229
|
+
_a[_b] = _12.sent(); // Accept authentication
|
|
2230
|
+
_12.label = 2;
|
|
2127
2231
|
case 2:
|
|
2128
2232
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 4];
|
|
2129
2233
|
_c = headerParameters;
|
|
2130
|
-
_d = "
|
|
2131
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2234
|
+
_d = "x-twitter-client-language";
|
|
2235
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-client-language")];
|
|
2132
2236
|
case 3:
|
|
2133
|
-
_c[_d] =
|
|
2134
|
-
|
|
2237
|
+
_c[_d] = _12.sent(); // ClientLanguage authentication
|
|
2238
|
+
_12.label = 4;
|
|
2135
2239
|
case 4:
|
|
2136
2240
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 6];
|
|
2137
2241
|
_e = headerParameters;
|
|
2138
|
-
_f = "
|
|
2139
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2242
|
+
_f = "Referer";
|
|
2243
|
+
return [4 /*yield*/, this.configuration.apiKey("Referer")];
|
|
2140
2244
|
case 5:
|
|
2141
|
-
_e[_f] =
|
|
2142
|
-
|
|
2245
|
+
_e[_f] = _12.sent(); // Referer authentication
|
|
2246
|
+
_12.label = 6;
|
|
2143
2247
|
case 6:
|
|
2144
2248
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 8];
|
|
2145
2249
|
_g = headerParameters;
|
|
2146
2250
|
_h = "Sec-Fetch-Dest";
|
|
2147
2251
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Dest")];
|
|
2148
2252
|
case 7:
|
|
2149
|
-
_g[_h] =
|
|
2150
|
-
|
|
2253
|
+
_g[_h] = _12.sent(); // SecFetchDest authentication
|
|
2254
|
+
_12.label = 8;
|
|
2151
2255
|
case 8:
|
|
2152
2256
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 10];
|
|
2153
2257
|
_j = headerParameters;
|
|
2154
|
-
_k = "
|
|
2155
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2258
|
+
_k = "Sec-Ch-Ua-Platform";
|
|
2259
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Platform")];
|
|
2156
2260
|
case 9:
|
|
2157
|
-
_j[_k] =
|
|
2158
|
-
|
|
2261
|
+
_j[_k] = _12.sent(); // SecChUaPlatform authentication
|
|
2262
|
+
_12.label = 10;
|
|
2159
2263
|
case 10:
|
|
2160
2264
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 12];
|
|
2161
2265
|
_l = headerParameters;
|
|
2162
|
-
_m = "Sec-
|
|
2163
|
-
return [4 /*yield*/, this.configuration.apiKey("Sec-
|
|
2266
|
+
_m = "Sec-Fetch-Mode";
|
|
2267
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Mode")];
|
|
2164
2268
|
case 11:
|
|
2165
|
-
_l[_m] =
|
|
2166
|
-
|
|
2269
|
+
_l[_m] = _12.sent(); // SecFetchMode authentication
|
|
2270
|
+
_12.label = 12;
|
|
2167
2271
|
case 12:
|
|
2168
2272
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 14];
|
|
2169
2273
|
_o = headerParameters;
|
|
2170
|
-
_p = "
|
|
2171
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2274
|
+
_p = "x-csrf-token";
|
|
2275
|
+
return [4 /*yield*/, this.configuration.apiKey("x-csrf-token")];
|
|
2172
2276
|
case 13:
|
|
2173
|
-
_o[_p] =
|
|
2174
|
-
|
|
2277
|
+
_o[_p] = _12.sent(); // CsrfToken authentication
|
|
2278
|
+
_12.label = 14;
|
|
2175
2279
|
case 14:
|
|
2176
2280
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 16];
|
|
2177
2281
|
_q = headerParameters;
|
|
2178
|
-
_r = "x-
|
|
2179
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
2282
|
+
_r = "x-client-uuid";
|
|
2283
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-uuid")];
|
|
2180
2284
|
case 15:
|
|
2181
|
-
_q[_r] =
|
|
2182
|
-
|
|
2285
|
+
_q[_r] = _12.sent(); // ClientUuid authentication
|
|
2286
|
+
_12.label = 16;
|
|
2183
2287
|
case 16:
|
|
2184
|
-
if (!(this.configuration && this.configuration.
|
|
2185
|
-
_s = headerParameters;
|
|
2186
|
-
_t = "x-guest-token";
|
|
2187
|
-
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
2188
|
-
case 17:
|
|
2189
|
-
_s[_t] = _10.sent(); // GuestToken authentication
|
|
2190
|
-
_10.label = 18;
|
|
2191
|
-
case 18:
|
|
2192
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 20];
|
|
2288
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 18];
|
|
2193
2289
|
token = this.configuration.accessToken;
|
|
2194
2290
|
return [4 /*yield*/, token("BearerAuth", [])];
|
|
2195
|
-
case
|
|
2196
|
-
tokenString =
|
|
2291
|
+
case 17:
|
|
2292
|
+
tokenString = _12.sent();
|
|
2197
2293
|
if (tokenString) {
|
|
2198
2294
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
2199
2295
|
}
|
|
2200
|
-
|
|
2296
|
+
_12.label = 18;
|
|
2297
|
+
case 18:
|
|
2298
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 20];
|
|
2299
|
+
_s = headerParameters;
|
|
2300
|
+
_t = "x-guest-token";
|
|
2301
|
+
return [4 /*yield*/, this.configuration.apiKey("x-guest-token")];
|
|
2302
|
+
case 19:
|
|
2303
|
+
_s[_t] = _12.sent(); // GuestToken authentication
|
|
2304
|
+
_12.label = 20;
|
|
2201
2305
|
case 20:
|
|
2202
2306
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 22];
|
|
2203
2307
|
_u = headerParameters;
|
|
2204
2308
|
_v = "Sec-Ch-Ua";
|
|
2205
2309
|
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua")];
|
|
2206
2310
|
case 21:
|
|
2207
|
-
_u[_v] =
|
|
2208
|
-
|
|
2311
|
+
_u[_v] = _12.sent(); // SecChUa authentication
|
|
2312
|
+
_12.label = 22;
|
|
2209
2313
|
case 22:
|
|
2210
2314
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 24];
|
|
2211
2315
|
_w = headerParameters;
|
|
2212
|
-
_x = "x-
|
|
2213
|
-
return [4 /*yield*/, this.configuration.apiKey("x-
|
|
2316
|
+
_x = "x-client-transaction-id";
|
|
2317
|
+
return [4 /*yield*/, this.configuration.apiKey("x-client-transaction-id")];
|
|
2214
2318
|
case 23:
|
|
2215
|
-
_w[_x] =
|
|
2216
|
-
|
|
2319
|
+
_w[_x] = _12.sent(); // ClientTransactionId authentication
|
|
2320
|
+
_12.label = 24;
|
|
2217
2321
|
case 24:
|
|
2218
2322
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 26];
|
|
2219
2323
|
_y = headerParameters;
|
|
2220
|
-
_z = "user
|
|
2221
|
-
return [4 /*yield*/, this.configuration.apiKey("user
|
|
2324
|
+
_z = "x-twitter-active-user";
|
|
2325
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-active-user")];
|
|
2222
2326
|
case 25:
|
|
2223
|
-
_y[_z] =
|
|
2224
|
-
|
|
2327
|
+
_y[_z] = _12.sent(); // ActiveUser authentication
|
|
2328
|
+
_12.label = 26;
|
|
2225
2329
|
case 26:
|
|
2226
2330
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 28];
|
|
2227
2331
|
_0 = headerParameters;
|
|
2228
|
-
_1 = "
|
|
2229
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2332
|
+
_1 = "user-agent";
|
|
2333
|
+
return [4 /*yield*/, this.configuration.apiKey("user-agent")];
|
|
2230
2334
|
case 27:
|
|
2231
|
-
_0[_1] =
|
|
2232
|
-
|
|
2335
|
+
_0[_1] = _12.sent(); // UserAgent authentication
|
|
2336
|
+
_12.label = 28;
|
|
2233
2337
|
case 28:
|
|
2234
2338
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 30];
|
|
2235
2339
|
_2 = headerParameters;
|
|
2236
|
-
_3 = "
|
|
2237
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2340
|
+
_3 = "Accept-Language";
|
|
2341
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Language")];
|
|
2238
2342
|
case 29:
|
|
2239
|
-
_2[_3] =
|
|
2240
|
-
|
|
2343
|
+
_2[_3] = _12.sent(); // AcceptLanguage authentication
|
|
2344
|
+
_12.label = 30;
|
|
2241
2345
|
case 30:
|
|
2242
2346
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 32];
|
|
2243
2347
|
_4 = headerParameters;
|
|
2244
|
-
_5 = "
|
|
2245
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2348
|
+
_5 = "Sec-Fetch-Site";
|
|
2349
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Fetch-Site")];
|
|
2246
2350
|
case 31:
|
|
2247
|
-
_4[_5] =
|
|
2248
|
-
|
|
2351
|
+
_4[_5] = _12.sent(); // SecFetchSite authentication
|
|
2352
|
+
_12.label = 32;
|
|
2249
2353
|
case 32:
|
|
2250
2354
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 34];
|
|
2251
2355
|
_6 = headerParameters;
|
|
2252
|
-
_7 = "
|
|
2253
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2356
|
+
_7 = "x-twitter-auth-type";
|
|
2357
|
+
return [4 /*yield*/, this.configuration.apiKey("x-twitter-auth-type")];
|
|
2254
2358
|
case 33:
|
|
2255
|
-
_6[_7] =
|
|
2256
|
-
|
|
2359
|
+
_6[_7] = _12.sent(); // AuthType authentication
|
|
2360
|
+
_12.label = 34;
|
|
2257
2361
|
case 34:
|
|
2258
2362
|
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 36];
|
|
2259
2363
|
_8 = headerParameters;
|
|
2260
|
-
_9 = "
|
|
2261
|
-
return [4 /*yield*/, this.configuration.apiKey("
|
|
2364
|
+
_9 = "Sec-Ch-Ua-Mobile";
|
|
2365
|
+
return [4 /*yield*/, this.configuration.apiKey("Sec-Ch-Ua-Mobile")];
|
|
2262
2366
|
case 35:
|
|
2263
|
-
_8[_9] =
|
|
2264
|
-
|
|
2265
|
-
case 36:
|
|
2367
|
+
_8[_9] = _12.sent(); // SecChUaMobile authentication
|
|
2368
|
+
_12.label = 36;
|
|
2369
|
+
case 36:
|
|
2370
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 38];
|
|
2371
|
+
_10 = headerParameters;
|
|
2372
|
+
_11 = "Accept-Encoding";
|
|
2373
|
+
return [4 /*yield*/, this.configuration.apiKey("Accept-Encoding")];
|
|
2374
|
+
case 37:
|
|
2375
|
+
_10[_11] = _12.sent(); // AcceptEncoding authentication
|
|
2376
|
+
_12.label = 38;
|
|
2377
|
+
case 38: return [4 /*yield*/, this.request({
|
|
2266
2378
|
path: "/graphql/{pathQueryId}/UserTweetsAndReplies".replace("{".concat("pathQueryId", "}"), encodeURIComponent(String(requestParameters['pathQueryId']))),
|
|
2267
2379
|
method: 'GET',
|
|
2268
2380
|
headers: headerParameters,
|
|
2269
2381
|
query: queryParameters,
|
|
2270
2382
|
}, initOverrides)];
|
|
2271
|
-
case
|
|
2272
|
-
response =
|
|
2383
|
+
case 39:
|
|
2384
|
+
response = _12.sent();
|
|
2273
2385
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetLikes200ResponseFromJSON)(jsonValue); })];
|
|
2274
2386
|
}
|
|
2275
2387
|
});
|