twitter-openapi-typescript 0.0.43 → 0.0.45

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.
Files changed (66) hide show
  1. package/dist/src/apis/defaultApi.d.ts.map +1 -1
  2. package/dist/src/apis/defaultApi.js +8 -9
  3. package/dist/src/apis/defaultApi.js.map +1 -1
  4. package/dist/src/apis/postApi.d.ts +2 -2
  5. package/dist/src/apis/postApi.d.ts.map +1 -1
  6. package/dist/src/apis/postApi.js +48 -56
  7. package/dist/src/apis/postApi.js.map +1 -1
  8. package/dist/src/apis/tweetApi.d.ts.map +1 -1
  9. package/dist/src/apis/tweetApi.js +16 -17
  10. package/dist/src/apis/tweetApi.js.map +1 -1
  11. package/dist/src/apis/userApi.d.ts.map +1 -1
  12. package/dist/src/apis/userApi.js +8 -9
  13. package/dist/src/apis/userApi.js.map +1 -1
  14. package/dist/src/apis/userListApi.d.ts.map +1 -1
  15. package/dist/src/apis/userListApi.js +11 -12
  16. package/dist/src/apis/userListApi.js.map +1 -1
  17. package/dist/src/apis/usersApi.d.ts.map +1 -1
  18. package/dist/src/apis/usersApi.js +7 -8
  19. package/dist/src/apis/usersApi.js.map +1 -1
  20. package/dist/src/models/utils.d.ts +1 -1
  21. package/dist/src/models/utils.d.ts.map +1 -1
  22. package/dist/src/utils/api.d.ts +1 -2
  23. package/dist/src/utils/api.d.ts.map +1 -1
  24. package/dist/src/utils/api.js +9 -16
  25. package/dist/src/utils/api.js.map +1 -1
  26. package/package.json +2 -2
  27. package/.prettierrc +0 -8
  28. package/.vscode/extensions.json +0 -8
  29. package/.vscode/settings.json +0 -21
  30. package/cookies.json +0 -170
  31. package/jest.config.js +0 -11
  32. package/src/api.ts +0 -222
  33. package/src/apis/defaultApi.ts +0 -72
  34. package/src/apis/index.ts +0 -10
  35. package/src/apis/initialStateApi.ts +0 -3
  36. package/src/apis/postApi.ts +0 -208
  37. package/src/apis/tweetApi.ts +0 -289
  38. package/src/apis/userApi.ts +0 -72
  39. package/src/apis/userListApi.ts +0 -173
  40. package/src/apis/usersApi.ts +0 -50
  41. package/src/apis/v11GetApi.ts +0 -14
  42. package/src/apis/v11PostApi.ts +0 -75
  43. package/src/apis/v20GetApi.ts +0 -14
  44. package/src/index.ts +0 -4
  45. package/src/models/flag.ts +0 -5
  46. package/src/models/header.ts +0 -14
  47. package/src/models/index.ts +0 -5
  48. package/src/models/response.ts +0 -11
  49. package/src/models/timeline.ts +0 -32
  50. package/src/models/utils.ts +0 -10
  51. package/src/utils/api.ts +0 -230
  52. package/src/utils/index.ts +0 -1
  53. package/test/api/auth.test.ts +0 -15
  54. package/test/api/defaultApi.test.ts +0 -21
  55. package/test/api/guest.test.ts +0 -10
  56. package/test/api/postApi.test.ts +0 -61
  57. package/test/api/tweetApi.test.ts +0 -82
  58. package/test/api/userApi.test.ts +0 -33
  59. package/test/api/userListApi.test.ts +0 -42
  60. package/test/api/usersApi.test.ts +0 -12
  61. package/test/api/v11PostApi.test.ts +0 -13
  62. package/test/init.ts +0 -50
  63. package/test/raw/tweet_api.test.ts +0 -12
  64. package/test/util.ts +0 -29
  65. package/tsconfig.build.json +0 -26
  66. package/tsconfig.json +0 -26
package/src/api.ts DELETED
@@ -1,222 +0,0 @@
1
- import {
2
- DefaultApiUtils,
3
- InitialStateApiUtils,
4
- PostApiUtils,
5
- TweetApiUtils,
6
- UserApiUtils,
7
- UserListApiUtils,
8
- V11GetApiUtils,
9
- V11PostApiUtils,
10
- V20GetApiUtils,
11
- } from '@/apis';
12
- import { DefaultFlag, initOverrides } from '@/models';
13
- import * as i from 'twitter-openapi-typescript-generated';
14
- import { UsersApiUtils } from './apis/usersApi';
15
-
16
- export class TwitterOpenApi {
17
- static hash = '4b27150977e1bdd807de8969dc0ddd7918ac9923';
18
- static url = `https://raw.githubusercontent.com/fa0311/twitter-openapi/${this.hash}/src/config/placeholder.json`;
19
- static header = 'https://raw.githubusercontent.com/fa0311/latest-user-agent/refs/heads/main/header.json';
20
- static twitter = 'https://x.com/home';
21
- static bearer =
22
- 'AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA';
23
-
24
- static fetchApi: i.FetchAPI = fetch.bind(globalThis);
25
-
26
- initOverrides: initOverrides = {};
27
-
28
- setInitOverrides(initOverrides: initOverrides): void {
29
- this.initOverrides = initOverrides;
30
- }
31
- additionalBrowserHeaders: { [key: string]: string } = {};
32
-
33
- setAdditionalBrowserHeaders(headers: { [key: string]: string }): void {
34
- this.additionalBrowserHeaders = headers;
35
- }
36
-
37
- additionalApiHeaders: { [key: string]: string } = {};
38
-
39
- setAdditionalApiHeaders(headers: { [key: string]: string }): void {
40
- this.additionalApiHeaders = headers;
41
- }
42
-
43
- async getHeaders(): Promise<{ api: { [key: string]: string }; browser: { [key: string]: string } }> {
44
- const raw = await TwitterOpenApi.fetchApi(TwitterOpenApi.header, {
45
- method: 'GET',
46
- ...this.initOverrides,
47
- });
48
- const json = await raw.json();
49
- const ignore = ['host', 'connection'];
50
-
51
- const getHader = (name: string): { [key: string]: string } => {
52
- return Object.entries(json[name]).reduce((a, [key, value]) => {
53
- if (ignore.includes(key)) return a;
54
- return { ...a, [key]: value };
55
- }, {});
56
- };
57
-
58
- return {
59
- api: {
60
- ...getHader('chrome-fetch'),
61
- 'accept-encoding': 'identity',
62
- pragma: 'no-cache',
63
- referer: TwitterOpenApi.twitter,
64
- priority: 'u=1, i',
65
- 'x-twitter-client-language': 'en',
66
- 'x-twitter-active-user': 'yes',
67
- // 'x-twitter-auth-type': 'xxxx'
68
- // 'x-csrf-token': 'xxxx',
69
- // 'x-guest-token': 'xxxx',
70
- authorization: `Bearer ${TwitterOpenApi.bearer}`,
71
- ...this.additionalApiHeaders,
72
- },
73
- browser: {
74
- ...getHader('chrome'),
75
- ...this.additionalBrowserHeaders,
76
- },
77
- };
78
- }
79
-
80
- cookieNormalize(cookie: string[]): { [key: string]: string } {
81
- return cookie.reduce((a, b) => {
82
- const [key, value] = b.split('; ')[0].split('=');
83
- return { ...a, [key]: value };
84
- }, {});
85
- }
86
-
87
- cookieEncode(cookie: { [key: string]: string }): string {
88
- return Object.entries(cookie)
89
- .map(([key, value]) => `${key}=${value}`)
90
- .join('; ');
91
- }
92
-
93
- setCookies(context: i.RequestContext, cookies: { [key: string]: string }): i.RequestContext {
94
- if (context.init.headers) {
95
- const headers = context.init.headers as i.HTTPHeaders;
96
- headers['cookie'] = this.cookieEncode(cookies);
97
- }
98
- return context;
99
- }
100
-
101
- async getGuestClient(): Promise<TwitterOpenApiClient> {
102
- let cookies: { [key: string]: string } = {};
103
-
104
- const response = await TwitterOpenApi.fetchApi(TwitterOpenApi.twitter, {
105
- method: 'GET',
106
- redirect: 'manual',
107
- headers: { Cookie: this.cookieEncode(cookies) },
108
- ...this.initOverrides,
109
- });
110
-
111
- if (response.headers.getSetCookie) {
112
- cookies = { ...cookies, ...this.cookieNormalize(response.headers.getSetCookie()) };
113
- } else {
114
- cookies = { ...cookies, ...this.cookieNormalize(response.headers.get('set-cookie')?.split(', ') || []) };
115
- }
116
- const html = await response.text();
117
-
118
- const re = new RegExp('document.cookie="(.*?)";', 'g');
119
-
120
- const find = [...html.matchAll(re)].map((e) => e[1]);
121
- cookies = { ...cookies, ...this.cookieNormalize(find) };
122
-
123
- cookies = Object.entries(cookies)
124
- .filter(([key, value]) => key != 'ct0')
125
- .reduce((a, [key, value]) => ({ ...a, [key]: value }), {});
126
-
127
- if (!cookies['gt']) {
128
- const activate_headers = { ...(await this.getHeaders()).api, cookie: this.cookieEncode(cookies) };
129
- const { guest_token } = await TwitterOpenApi.fetchApi('https://api.x.com/1.1/guest/activate.json', {
130
- method: 'POST',
131
- headers: activate_headers,
132
- ...this.initOverrides,
133
- }).then((response) => response.json());
134
- cookies['gt'] = guest_token;
135
- }
136
-
137
- // const chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
138
- // const csrfToken = [...Array(32)].reduce((a) => a + chars[Math.floor(Math.random() * chars.length)], '');
139
- // cookies.push({ name: 'ct0', value: csrfToken });
140
-
141
- return this.getClientFromCookies(cookies);
142
- }
143
-
144
- async getClientFromCookies(cookies: { [key: string]: string }): Promise<TwitterOpenApiClient> {
145
- const api_key = (await this.getHeaders()).api;
146
- if (cookies['ct0']) {
147
- api_key['x-twitter-auth-type'] = 'OAuth2Session';
148
- api_key['x-csrf-token'] = cookies['ct0'];
149
- }
150
- if (cookies['gt']) {
151
- api_key['x-guest-token'] = cookies['gt'];
152
- }
153
-
154
- const config: i.ConfigurationParameters = {
155
- fetchApi: TwitterOpenApi.fetchApi,
156
- middleware: [{ pre: async (context) => this.setCookies(context, cookies) }],
157
- apiKey: (key) => api_key[key.toLowerCase()],
158
- accessToken: TwitterOpenApi.bearer,
159
- };
160
- return this.getClient(new i.Configuration(config));
161
- }
162
-
163
- async getClient(api: i.Configuration): Promise<TwitterOpenApiClient> {
164
- const flag = (await TwitterOpenApi.fetchApi(TwitterOpenApi.url, {
165
- method: 'GET',
166
- ...this.initOverrides,
167
- }).then((res) => res.json())) as DefaultFlag;
168
- return new TwitterOpenApiClient(api, flag, this.initOverrides);
169
- }
170
- }
171
-
172
- export class TwitterOpenApiClient {
173
- config: i.Configuration;
174
- flag: DefaultFlag;
175
- initOverrides: initOverrides;
176
-
177
- constructor(config: i.Configuration, flag: DefaultFlag, initOverrides: initOverrides) {
178
- this.config = config;
179
- this.flag = flag;
180
- this.initOverrides = initOverrides;
181
- }
182
-
183
- getDefaultApi(): DefaultApiUtils {
184
- return new DefaultApiUtils(new i.DefaultApi(this.config), this.flag, this.initOverrides);
185
- }
186
-
187
- getTweetApi(): TweetApiUtils {
188
- return new TweetApiUtils(new i.TweetApi(this.config), this.flag, this.initOverrides);
189
- }
190
-
191
- getUserApi(): UserApiUtils {
192
- return new UserApiUtils(new i.UserApi(this.config), this.flag, this.initOverrides);
193
- }
194
-
195
- getUsersApi(): UsersApiUtils {
196
- return new UsersApiUtils(new i.UsersApi(this.config), this.flag, this.initOverrides);
197
- }
198
-
199
- getUserListApi(): UserListApiUtils {
200
- return new UserListApiUtils(new i.UserListApi(this.config), this.flag, this.initOverrides);
201
- }
202
-
203
- getPostApi(): PostApiUtils {
204
- return new PostApiUtils(new i.PostApi(this.config), this.flag, this.initOverrides);
205
- }
206
-
207
- getV11GetApi(): V11GetApiUtils {
208
- return new V11GetApiUtils(new i.V11GetApi(this.config), this.flag, this.initOverrides);
209
- }
210
-
211
- getV11PostApi(): V11PostApiUtils {
212
- return new V11PostApiUtils(new i.V11PostApi(this.config), this.flag, this.initOverrides);
213
- }
214
-
215
- getV20GetApi(): V20GetApiUtils {
216
- return new V20GetApiUtils(new i.V20GetApi(this.config), this.flag, this.initOverrides);
217
- }
218
-
219
- getInitialStateApi(): InitialStateApiUtils {
220
- return new InitialStateApiUtils();
221
- }
222
- }
@@ -1,72 +0,0 @@
1
- import { DefaultFlag, RequestParam, TweetApiUtilsData, TwitterApiUtilsResponse, initOverrides } from '@/models';
2
- import { buildHeader, buildTweetApiUtils, errorCheck, getKwargs } from '@/utils';
3
- import * as i from 'twitter-openapi-typescript-generated';
4
-
5
- export type ProfileSpotlightsQueryParam = {
6
- screenName: string;
7
- extraParam?: { [key: string]: any };
8
- };
9
-
10
- export type TweetResultByRestIdParam = {
11
- tweetId: string;
12
- extraParam?: { [key: string]: any };
13
- };
14
-
15
- export class DefaultApiUtils {
16
- api: i.DefaultApi;
17
- flag: DefaultFlag;
18
- initOverrides: initOverrides;
19
-
20
- constructor(api: i.DefaultApi, flag: DefaultFlag, initOverrides: initOverrides) {
21
- this.api = api;
22
- this.flag = flag;
23
- this.initOverrides = initOverrides;
24
- }
25
-
26
- async request<T1, T2>(param: RequestParam<T1, T2>): Promise<TwitterApiUtilsResponse<T1>> {
27
- const apiFn: typeof param.apiFn = param.apiFn.bind(this.api);
28
- const args = getKwargs(this.flag[param.key], param.param);
29
- const response = await apiFn(args, this.initOverrides);
30
- const checked = errorCheck(await response.value());
31
- const data = param.convertFn(checked);
32
- return {
33
- raw: { response: response.raw },
34
- header: buildHeader(response.raw.headers),
35
- data: data,
36
- };
37
- }
38
-
39
- async getProfileSpotlightsQuery(
40
- param: ProfileSpotlightsQueryParam,
41
- ): Promise<TwitterApiUtilsResponse<i.UserResultByScreenName>> {
42
- const args = {
43
- screenName: param.screenName,
44
- ...param.extraParam,
45
- };
46
- const response = await this.request({
47
- key: 'ProfileSpotlightsQuery',
48
- apiFn: this.api.getProfileSpotlightsQueryRaw,
49
- convertFn: (value) => value.data.userResultByScreenName,
50
- param: args,
51
- });
52
-
53
- return response;
54
- }
55
-
56
- async getTweetResultByRestId(
57
- param: TweetResultByRestIdParam,
58
- ): Promise<TwitterApiUtilsResponse<TweetApiUtilsData | undefined>> {
59
- const args = {
60
- tweetId: param.tweetId,
61
- ...param.extraParam,
62
- };
63
- const response = await this.request({
64
- key: 'TweetResultByRestId',
65
- apiFn: this.api.getTweetResultByRestIdRaw,
66
- convertFn: (value) => buildTweetApiUtils({ result: value.data.tweetResult }),
67
- param: args,
68
- });
69
-
70
- return response;
71
- }
72
- }
package/src/apis/index.ts DELETED
@@ -1,10 +0,0 @@
1
- export { DefaultApiUtils } from './defaultApi';
2
- export { InitialStateApiUtils } from './initialStateApi';
3
- export { PostApiUtils } from './postApi';
4
- export { TweetApiUtils } from './tweetApi';
5
- export { UserApiUtils } from './userApi';
6
- export { UserListApiUtils } from './userListApi';
7
- export { UsersApiUtils } from './usersApi';
8
- export { V11GetApiUtils } from './v11GetApi';
9
- export { V11PostApiUtils } from './v11PostApi';
10
- export { V20GetApiUtils } from './v20GetApi';
@@ -1,3 +0,0 @@
1
- export class InitialStateApiUtils {
2
- // todo
3
- }
@@ -1,208 +0,0 @@
1
- import { DefaultFlag, TwitterApiUtilsResponse, initOverrides } from '@/models';
2
- import { buildHeader, errorCheck } from '@/utils';
3
- import * as i from 'twitter-openapi-typescript-generated';
4
- import { PostCreateTweetRequestVariablesToJSON } from 'twitter-openapi-typescript-generated';
5
-
6
- type PostCreateTweetParam = {
7
- tweetText: string;
8
- mediaIds?: string[];
9
- taggedUsers?: string[][];
10
- inReplyToTweetId?: string;
11
- attachmentUrl?: string;
12
- conversationControl?: 'Community' | 'Verified' | 'ByInvitation' | (string & {});
13
- extraParam?: { [key: string]: any };
14
- };
15
-
16
- type PostDeleteTweetParam = {
17
- tweetId: string;
18
- extraParam?: { [key: string]: any };
19
- };
20
-
21
- type PostCreateRetweetParam = {
22
- tweetId: string;
23
- extraParam?: { [key: string]: any };
24
- };
25
-
26
- type PostDeleteRetweetParam = {
27
- sourceTweetId: string;
28
- extraParam?: { [key: string]: any };
29
- };
30
-
31
- type PostFavoriteTweetParam = {
32
- tweetId: string;
33
- extraParam?: { [key: string]: any };
34
- };
35
-
36
- type PostUnfavoriteTweetParam = {
37
- tweetId: string;
38
- extraParam?: { [key: string]: any };
39
- };
40
-
41
- export class PostApiUtils {
42
- api: i.PostApi;
43
- flag: DefaultFlag;
44
- initOverrides: initOverrides;
45
-
46
- constructor(api: i.PostApi, flag: DefaultFlag, initOverrides: initOverrides) {
47
- this.api = api;
48
- this.flag = flag;
49
- this.initOverrides = initOverrides;
50
- }
51
-
52
- async postCreateTweet(param: PostCreateTweetParam): Promise<TwitterApiUtilsResponse<i.CreateTweetResponse>> {
53
- const args = {
54
- tweetText: param.tweetText,
55
- ...param.extraParam,
56
- };
57
-
58
- const queryId = 'CreateTweet';
59
- const features = i.PostCreateTweetRequestFeaturesFromJSON(this.flag[queryId]['features']);
60
- const variables = i.PostCreateTweetRequestVariablesFromJSON(this.flag[queryId]['variables']);
61
- if (param.mediaIds) {
62
- variables.media.mediaEntities = param.mediaIds!.map((mediaId, index) => ({
63
- mediaId: mediaId,
64
- taggedUsers: param.taggedUsers?.[index] || [],
65
- }));
66
- }
67
-
68
- variables.attachmentUrl = param.attachmentUrl;
69
- if (param.conversationControl) {
70
- variables.conversationControl = {
71
- mode: param.conversationControl,
72
- };
73
- }
74
-
75
- if (param.inReplyToTweetId) {
76
- variables.reply = {
77
- excludeReplyUserIds: [],
78
- inReplyToTweetId: param.inReplyToTweetId,
79
- };
80
- }
81
-
82
- variables.disallowedReplyOptions = null as any;
83
-
84
- const response = await this.api.postCreateTweetRaw({
85
- pathQueryId: this.flag[queryId]['queryId'],
86
- postCreateTweetRequest: {
87
- queryId: this.flag[queryId]['queryId'],
88
- features: features,
89
- variables: { ...variables, ...args },
90
- },
91
- });
92
- const a = PostCreateTweetRequestVariablesToJSON(variables);
93
-
94
- return {
95
- raw: { response: response.raw },
96
- header: buildHeader(response.raw.headers),
97
- data: errorCheck(await response.value()),
98
- };
99
- }
100
-
101
- async postDeleteTweet(param: PostDeleteTweetParam): Promise<TwitterApiUtilsResponse<i.DeleteTweetResponse>> {
102
- const args = {
103
- tweetId: param.tweetId,
104
- ...param.extraParam,
105
- };
106
- const queryId = 'DeleteTweet';
107
- const variables = i.PostCreateRetweetRequestVariablesFromJSON(this.flag[queryId]['variables']);
108
- const response = await this.api.postDeleteTweetRaw({
109
- pathQueryId: this.flag[queryId]['queryId'],
110
- postDeleteTweetRequest: {
111
- queryId: this.flag[queryId]['queryId'],
112
- variables: { ...variables, ...args },
113
- },
114
- });
115
- return {
116
- raw: { response: response.raw },
117
- header: buildHeader(response.raw.headers),
118
- data: errorCheck(await response.value()),
119
- };
120
- }
121
-
122
- async postCreateRetweet(param: PostCreateRetweetParam): Promise<TwitterApiUtilsResponse<i.CreateRetweetResponse>> {
123
- const args = {
124
- tweetId: param.tweetId,
125
- ...param.extraParam,
126
- };
127
- const queryId = 'CreateRetweet';
128
- const variables = i.PostCreateRetweetRequestVariablesFromJSON(this.flag[queryId]['variables']);
129
- const response = await this.api.postCreateRetweetRaw({
130
- pathQueryId: this.flag[queryId]['queryId'],
131
- postCreateRetweetRequest: {
132
- queryId: this.flag[queryId]['queryId'],
133
- variables: { ...variables, ...args },
134
- },
135
- });
136
- return {
137
- raw: { response: response.raw },
138
- header: buildHeader(response.raw.headers),
139
- data: errorCheck(await response.value()),
140
- };
141
- }
142
- async postDeleteRetweet(param: PostDeleteRetweetParam): Promise<TwitterApiUtilsResponse<i.DeleteRetweetResponse>> {
143
- const args = {
144
- sourceTweetId: param.sourceTweetId,
145
- ...param.extraParam,
146
- };
147
- const queryId = 'DeleteRetweet';
148
- const variables = i.PostDeleteRetweetRequestVariablesFromJSON(this.flag[queryId]['variables']);
149
- const response = await this.api.postDeleteRetweetRaw({
150
- pathQueryId: this.flag[queryId]['queryId'],
151
- postDeleteRetweetRequest: {
152
- queryId: this.flag[queryId]['queryId'],
153
- variables: { ...variables, ...args },
154
- },
155
- });
156
- return {
157
- raw: { response: response.raw },
158
- header: buildHeader(response.raw.headers),
159
- data: errorCheck(await response.value()),
160
- };
161
- }
162
-
163
- async postFavoriteTweet(
164
- param: PostFavoriteTweetParam,
165
- ): Promise<TwitterApiUtilsResponse<i.FavoriteTweetResponseData>> {
166
- const args = {
167
- tweetId: param.tweetId,
168
- ...param.extraParam,
169
- };
170
- const queryId = 'FavoriteTweet';
171
- const variables = i.PostCreateRetweetRequestVariablesFromJSON(this.flag[queryId]['variables']);
172
- const response = await this.api.postFavoriteTweetRaw({
173
- pathQueryId: this.flag[queryId]['queryId'],
174
- postFavoriteTweetRequest: {
175
- queryId: this.flag[queryId]['queryId'],
176
- variables: { ...variables, ...args },
177
- },
178
- });
179
- return {
180
- raw: { response: response.raw },
181
- header: buildHeader(response.raw.headers),
182
- data: errorCheck(await response.value()),
183
- };
184
- }
185
-
186
- async postUnfavoriteTweet(
187
- param: PostUnfavoriteTweetParam,
188
- ): Promise<TwitterApiUtilsResponse<i.UnfavoriteTweetResponseData>> {
189
- const args = {
190
- tweetId: param.tweetId,
191
- ...param.extraParam,
192
- };
193
- const queryId = 'UnfavoriteTweet';
194
- const variables = i.PostCreateRetweetRequestVariablesFromJSON(this.flag[queryId]['variables']);
195
- const response = await this.api.postUnfavoriteTweetRaw({
196
- pathQueryId: this.flag[queryId]['queryId'],
197
- postUnfavoriteTweetRequest: {
198
- queryId: this.flag[queryId]['queryId'],
199
- variables: { ...variables, ...args },
200
- },
201
- });
202
- return {
203
- raw: { response: response.raw },
204
- header: buildHeader(response.raw.headers),
205
- data: errorCheck(await response.value()),
206
- };
207
- }
208
- }