twitter-openapi-typescript-generated 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +18 -1
- package/README.md +2 -2
- package/dist/apis/DefaultApi.d.ts +0 -1
- package/dist/apis/DefaultApi.d.ts.map +1 -1
- package/dist/apis/DefaultApi.js +0 -6
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/apis/TweetApi.d.ts +17 -12
- package/dist/apis/TweetApi.d.ts.map +1 -1
- package/dist/apis/TweetApi.js +90 -55
- package/dist/apis/TweetApi.js.map +1 -1
- package/dist/apis/UserApi.d.ts +27 -2
- package/dist/apis/UserApi.d.ts.map +1 -1
- package/dist/apis/UserApi.js +166 -6
- package/dist/apis/UserApi.js.map +1 -1
- package/dist/apis/UserListApi.d.ts +41 -3
- package/dist/apis/UserListApi.d.ts.map +1 -1
- package/dist/apis/UserListApi.js +255 -12
- package/dist/apis/UserListApi.js.map +1 -1
- package/dist/models/ContentItemType.d.ts +2 -0
- package/dist/models/ContentItemType.d.ts.map +1 -1
- package/dist/models/ContentItemType.js +3 -1
- package/dist/models/ContentItemType.js.map +1 -1
- package/dist/models/InstructionType.d.ts +3 -0
- package/dist/models/InstructionType.d.ts.map +1 -1
- package/dist/models/InstructionType.js +3 -0
- package/dist/models/InstructionType.js.map +1 -1
- package/dist/models/InstructionUnion.d.ts +9 -0
- package/dist/models/InstructionUnion.d.ts.map +1 -1
- package/dist/models/InstructionUnion.js +15 -0
- package/dist/models/InstructionUnion.js.map +1 -1
- package/dist/models/ItemContentUnion.d.ts +6 -0
- package/dist/models/ItemContentUnion.d.ts.map +1 -1
- package/dist/models/ItemContentUnion.js +10 -0
- package/dist/models/ItemContentUnion.js.map +1 -1
- package/dist/models/ListLatestTweetsTimelineResponse.d.ts +33 -0
- package/dist/models/ListLatestTweetsTimelineResponse.d.ts.map +1 -0
- package/dist/models/ListLatestTweetsTimelineResponse.js +52 -0
- package/dist/models/ListLatestTweetsTimelineResponse.js.map +1 -0
- package/dist/models/SearchByRawQuery.d.ts +33 -0
- package/dist/models/SearchByRawQuery.d.ts.map +1 -0
- package/dist/models/SearchByRawQuery.js +52 -0
- package/dist/models/SearchByRawQuery.js.map +1 -0
- package/dist/models/SearchTimeline.d.ts +33 -0
- package/dist/models/SearchTimeline.d.ts.map +1 -0
- package/dist/models/SearchTimeline.js +52 -0
- package/dist/models/SearchTimeline.js.map +1 -0
- package/dist/models/SearchTimelineData.d.ts +33 -0
- package/dist/models/SearchTimelineData.d.ts.map +1 -0
- package/dist/models/SearchTimelineData.js +52 -0
- package/dist/models/SearchTimelineData.js.map +1 -0
- package/dist/models/SearchTimelineResponse.d.ts +33 -0
- package/dist/models/SearchTimelineResponse.d.ts.map +1 -0
- package/dist/models/SearchTimelineResponse.js +52 -0
- package/dist/models/SearchTimelineResponse.js.map +1 -0
- package/dist/models/TimelineAddToModule.d.ts +52 -0
- package/dist/models/TimelineAddToModule.d.ts.map +1 -0
- package/dist/models/TimelineAddToModule.js +62 -0
- package/dist/models/TimelineAddToModule.js.map +1 -0
- package/dist/models/TimelineMessagePrompt.d.ts +33 -0
- package/dist/models/TimelineMessagePrompt.d.ts.map +1 -0
- package/dist/models/TimelineMessagePrompt.js +52 -0
- package/dist/models/TimelineMessagePrompt.js.map +1 -0
- package/dist/models/TimelinePrompt.d.ts +33 -0
- package/dist/models/TimelinePrompt.d.ts.map +1 -0
- package/dist/models/TimelinePrompt.js +52 -0
- package/dist/models/TimelinePrompt.js.map +1 -0
- package/dist/models/TimelineReplaceEntry.d.ts +46 -0
- package/dist/models/TimelineReplaceEntry.d.ts.map +1 -0
- package/dist/models/TimelineReplaceEntry.js +59 -0
- package/dist/models/TimelineReplaceEntry.js.map +1 -0
- package/dist/models/TimelineShowAlert.d.ts +97 -0
- package/dist/models/TimelineShowAlert.d.ts.map +1 -0
- package/dist/models/TimelineShowAlert.js +85 -0
- package/dist/models/TimelineShowAlert.js.map +1 -0
- package/dist/models/TimelineShowAlertRichText.d.ts +38 -0
- package/dist/models/TimelineShowAlertRichText.d.ts.map +1 -0
- package/dist/models/TimelineShowAlertRichText.js +53 -0
- package/dist/models/TimelineShowAlertRichText.js.map +1 -0
- package/dist/models/TweetFavoritersResponse.d.ts +33 -0
- package/dist/models/TweetFavoritersResponse.d.ts.map +1 -0
- package/dist/models/TweetFavoritersResponse.js +52 -0
- package/dist/models/TweetFavoritersResponse.js.map +1 -0
- package/dist/models/TweetFavoritersResponseData.d.ts +33 -0
- package/dist/models/TweetFavoritersResponseData.d.ts.map +1 -0
- package/dist/models/TweetFavoritersResponseData.js +52 -0
- package/dist/models/TweetFavoritersResponseData.js.map +1 -0
- package/dist/models/TweetLegacy.d.ts +7 -0
- package/dist/models/TweetLegacy.d.ts.map +1 -1
- package/dist/models/TweetLegacy.js +3 -0
- package/dist/models/TweetLegacy.js.map +1 -1
- package/dist/models/TweetLegacySelfThread.d.ts +32 -0
- package/dist/models/TweetLegacySelfThread.d.ts.map +1 -0
- package/dist/models/TweetLegacySelfThread.js +51 -0
- package/dist/models/TweetLegacySelfThread.js.map +1 -0
- package/dist/models/TweetRetweetersResponse.d.ts +33 -0
- package/dist/models/TweetRetweetersResponse.d.ts.map +1 -0
- package/dist/models/TweetRetweetersResponse.js +52 -0
- package/dist/models/TweetRetweetersResponse.js.map +1 -0
- package/dist/models/TweetRetweetersResponseData.d.ts +33 -0
- package/dist/models/TweetRetweetersResponseData.d.ts.map +1 -0
- package/dist/models/TweetRetweetersResponseData.js +52 -0
- package/dist/models/TweetRetweetersResponseData.js.map +1 -0
- package/dist/models/UsersResponse.d.ts +33 -0
- package/dist/models/UsersResponse.d.ts.map +1 -0
- package/dist/models/UsersResponse.js +52 -0
- package/dist/models/UsersResponse.js.map +1 -0
- package/dist/models/UsersResponseData.d.ts +33 -0
- package/dist/models/UsersResponseData.d.ts.map +1 -0
- package/dist/models/UsersResponseData.js +52 -0
- package/dist/models/UsersResponseData.js.map +1 -0
- package/dist/models/index.d.ts +18 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +18 -1
- package/dist/models/index.js.map +1 -1
- package/package.json +3 -2
- package/src/apis/DefaultApi.ts +0 -9
- package/src/apis/TweetApi.ts +102 -87
- package/src/apis/UserApi.ts +171 -9
- package/src/apis/UserListApi.ts +267 -18
- package/src/models/ContentItemType.ts +3 -1
- package/src/models/InstructionType.ts +3 -0
- package/src/models/InstructionUnion.ts +34 -1
- package/src/models/ItemContentUnion.ts +23 -1
- package/src/models/{ListTweetsTimelineResponse.ts → ListLatestTweetsTimelineResponse.ts} +9 -9
- package/src/models/SearchByRawQuery.ts +73 -0
- package/src/models/SearchTimeline.ts +73 -0
- package/src/models/SearchTimelineData.ts +73 -0
- package/src/models/SearchTimelineResponse.ts +73 -0
- package/src/models/TimelineAddToModule.ts +105 -0
- package/src/models/TimelineMessagePrompt.ts +72 -0
- package/src/models/TimelinePrompt.ts +72 -0
- package/src/models/TimelineReplaceEntry.ts +97 -0
- package/src/models/TimelineShowAlert.ts +169 -0
- package/src/models/TimelineShowAlertRichText.ts +73 -0
- package/src/models/TweetFavoritersResponse.ts +73 -0
- package/src/models/TweetFavoritersResponseData.ts +73 -0
- package/src/models/TweetLegacy.ts +14 -0
- package/src/models/TweetLegacySelfThread.ts +66 -0
- package/src/models/TweetRetweetersResponse.ts +73 -0
- package/src/models/TweetRetweetersResponseData.ts +73 -0
- package/src/models/UsersResponse.ts +73 -0
- package/src/models/UsersResponseData.ts +73 -0
- package/src/models/index.ts +18 -1
- package/tools/openapi-generator-config.yaml +2 -2
- package/tools/win/replace.py +1 -1
- package/twitter-openapi/dist/{test → compatible}/openapi-3.0.yaml +12 -0
- package/twitter-openapi/dist/{typescript → compatible}/paths/bookmarks.yaml +0 -7
- package/twitter-openapi/dist/{dart → compatible}/paths/follow.yaml +82 -63
- package/twitter-openapi/dist/{test → compatible}/paths/profile.yaml +0 -7
- package/twitter-openapi/dist/{dart → compatible}/paths/timeline.yaml +118 -111
- package/twitter-openapi/dist/compatible/paths/tweet.yaml +297 -0
- package/twitter-openapi/dist/compatible/paths/user.yaml +227 -0
- package/twitter-openapi/dist/{test → compatible}/paths/usertweets.yaml +0 -28
- package/twitter-openapi/dist/{typescript → compatible}/schemas/content.yaml +14 -0
- package/twitter-openapi/dist/compatible/schemas/instruction.yaml +160 -0
- package/twitter-openapi/dist/{dart → compatible}/schemas/tweet.yaml +8 -0
- package/twitter-openapi/dist/docs/openapi-3.0.yaml +12 -0
- package/twitter-openapi/dist/docs/paths/bookmarks.yaml +0 -56
- package/twitter-openapi/dist/docs/paths/follow.yaml +193 -112
- package/twitter-openapi/dist/docs/paths/profile.yaml +0 -35
- package/twitter-openapi/dist/docs/paths/timeline.yaml +225 -173
- package/twitter-openapi/dist/docs/paths/tweet.yaml +382 -61
- package/twitter-openapi/dist/docs/paths/user.yaml +214 -41
- package/twitter-openapi/dist/docs/paths/usertweets.yaml +0 -238
- package/twitter-openapi/dist/docs/schemas/content.yaml +14 -0
- package/twitter-openapi/dist/docs/schemas/instruction.yaml +77 -0
- package/twitter-openapi/dist/docs/schemas/tweet.yaml +8 -0
- package/twitter-openapi/src/config/placeholder.json +155 -0
- package/twitter-openapi/src/openapi/paths/follow.yaml +14 -0
- package/twitter-openapi/src/openapi/paths/timeline.yaml +44 -2
- package/twitter-openapi/src/openapi/paths/tweet.yaml +56 -0
- package/twitter-openapi/src/openapi/paths/user.yaml +44 -0
- package/twitter-openapi/src/openapi/schemas/content.yaml +23 -1
- package/twitter-openapi/src/openapi/schemas/instruction.yaml +78 -0
- package/twitter-openapi/src/openapi/schemas/tweet.yaml +8 -0
- package/twitter-openapi/tools/__pycache__/build_config.cpython-310.pyc +0 -0
- package/twitter-openapi/tools/__pycache__/hooks.cpython-310.pyc +0 -0
- package/twitter-openapi/tools/build_config.py +67 -190
- package/twitter-openapi/tools/hooks.py +28 -7
- package/dist/models/ListTweetsTimelineResponse.d.ts +0 -33
- package/dist/models/ListTweetsTimelineResponse.d.ts.map +0 -1
- package/dist/models/ListTweetsTimelineResponse.js +0 -52
- package/dist/models/ListTweetsTimelineResponse.js.map +0 -1
- package/twitter-openapi/dist/dart/openapi-3.0.yaml +0 -117
- package/twitter-openapi/dist/dart/paths/bookmarks.yaml +0 -141
- package/twitter-openapi/dist/dart/paths/post.yaml +0 -876
- package/twitter-openapi/dist/dart/paths/profile.yaml +0 -159
- package/twitter-openapi/dist/dart/paths/tweet.yaml +0 -141
- package/twitter-openapi/dist/dart/paths/user.yaml +0 -119
- package/twitter-openapi/dist/dart/paths/usertweets.yaml +0 -512
- package/twitter-openapi/dist/dart/paths/v1.1-get.yaml +0 -300
- package/twitter-openapi/dist/dart/paths/v1.1-post.yaml +0 -295
- package/twitter-openapi/dist/dart/paths/v2.0-get.yaml +0 -331
- package/twitter-openapi/dist/dart/schemas/content.yaml +0 -181
- package/twitter-openapi/dist/dart/schemas/instruction.yaml +0 -83
- package/twitter-openapi/dist/test/paths/bookmarks.yaml +0 -112
- package/twitter-openapi/dist/test/paths/follow.yaml +0 -218
- package/twitter-openapi/dist/test/paths/other.yaml +0 -96
- package/twitter-openapi/dist/test/paths/post.yaml +0 -527
- package/twitter-openapi/dist/test/paths/timeline.yaml +0 -314
- package/twitter-openapi/dist/test/paths/tweet.yaml +0 -112
- package/twitter-openapi/dist/test/paths/user.yaml +0 -90
- package/twitter-openapi/dist/test/paths/v1.1-get.yaml +0 -242
- package/twitter-openapi/dist/test/paths/v1.1-post.yaml +0 -277
- package/twitter-openapi/dist/test/paths/v2.0-get.yaml +0 -302
- package/twitter-openapi/dist/test/resources/parameters.yaml +0 -13
- package/twitter-openapi/dist/test/response/error.yaml +0 -90
- package/twitter-openapi/dist/test/schemas/content.yaml +0 -181
- package/twitter-openapi/dist/test/schemas/general.yaml +0 -13
- package/twitter-openapi/dist/test/schemas/instruction.yaml +0 -83
- package/twitter-openapi/dist/test/schemas/timeline.yaml +0 -25
- package/twitter-openapi/dist/test/schemas/tweet.yaml +0 -308
- package/twitter-openapi/dist/test/schemas/typename.yaml +0 -19
- package/twitter-openapi/dist/test/schemas/user.yaml +0 -206
- package/twitter-openapi/dist/typescript/openapi-3.0.yaml +0 -141
- package/twitter-openapi/dist/typescript/paths/follow.yaml +0 -218
- package/twitter-openapi/dist/typescript/paths/other.yaml +0 -96
- package/twitter-openapi/dist/typescript/paths/profile.yaml +0 -130
- package/twitter-openapi/dist/typescript/paths/timeline.yaml +0 -314
- package/twitter-openapi/dist/typescript/paths/tweet.yaml +0 -112
- package/twitter-openapi/dist/typescript/paths/user.yaml +0 -90
- package/twitter-openapi/dist/typescript/paths/usertweets.yaml +0 -396
- package/twitter-openapi/dist/typescript/resources/parameters.yaml +0 -13
- package/twitter-openapi/dist/typescript/response/error.yaml +0 -90
- package/twitter-openapi/dist/typescript/schemas/general.yaml +0 -13
- package/twitter-openapi/dist/typescript/schemas/instruction.yaml +0 -83
- package/twitter-openapi/dist/typescript/schemas/timeline.yaml +0 -25
- package/twitter-openapi/dist/typescript/schemas/tweet.yaml +0 -308
- package/twitter-openapi/dist/typescript/schemas/typename.yaml +0 -19
- package/twitter-openapi/dist/typescript/schemas/user.yaml +0 -206
- /package/twitter-openapi/dist/{dart → compatible}/paths/other.yaml +0 -0
- /package/twitter-openapi/dist/{typescript → compatible}/paths/post.yaml +0 -0
- /package/twitter-openapi/dist/{typescript → compatible}/paths/v1.1-get.yaml +0 -0
- /package/twitter-openapi/dist/{typescript → compatible}/paths/v1.1-post.yaml +0 -0
- /package/twitter-openapi/dist/{typescript → compatible}/paths/v2.0-get.yaml +0 -0
- /package/twitter-openapi/dist/{dart → compatible}/resources/parameters.yaml +0 -0
- /package/twitter-openapi/dist/{dart → compatible}/response/error.yaml +0 -0
- /package/twitter-openapi/dist/{dart → compatible}/schemas/general.yaml +0 -0
- /package/twitter-openapi/dist/{dart → compatible}/schemas/timeline.yaml +0 -0
- /package/twitter-openapi/dist/{dart → compatible}/schemas/typename.yaml +0 -0
- /package/twitter-openapi/dist/{dart → compatible}/schemas/user.yaml +0 -0
package/src/apis/UserApi.ts
CHANGED
|
@@ -16,15 +16,29 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
UserResponse,
|
|
19
|
+
UsersResponse,
|
|
19
20
|
} from '../models';
|
|
20
21
|
import {
|
|
21
22
|
UserResponseFromJSON,
|
|
22
23
|
UserResponseToJSON,
|
|
24
|
+
UsersResponseFromJSON,
|
|
25
|
+
UsersResponseToJSON,
|
|
23
26
|
} from '../models';
|
|
24
27
|
|
|
28
|
+
export interface GetUserByRestIdRequest {
|
|
29
|
+
pathQueryId: string;
|
|
30
|
+
variables: string;
|
|
31
|
+
features: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
25
34
|
export interface GetUserByScreenNameRequest {
|
|
26
35
|
pathQueryId: string;
|
|
27
|
-
|
|
36
|
+
variables: string;
|
|
37
|
+
features: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface GetUsersByRestIdsRequest {
|
|
41
|
+
pathQueryId: string;
|
|
28
42
|
variables: string;
|
|
29
43
|
features: string;
|
|
30
44
|
}
|
|
@@ -34,6 +48,84 @@ export interface GetUserByScreenNameRequest {
|
|
|
34
48
|
*/
|
|
35
49
|
export class UserApi extends runtime.BaseAPI {
|
|
36
50
|
|
|
51
|
+
/**
|
|
52
|
+
* get user by rest id
|
|
53
|
+
*/
|
|
54
|
+
async getUserByRestIdRaw(requestParameters: GetUserByRestIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
|
|
55
|
+
if (requestParameters.pathQueryId === null || requestParameters.pathQueryId === undefined) {
|
|
56
|
+
throw new runtime.RequiredError('pathQueryId','Required parameter requestParameters.pathQueryId was null or undefined when calling getUserByRestId.');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (requestParameters.variables === null || requestParameters.variables === undefined) {
|
|
60
|
+
throw new runtime.RequiredError('variables','Required parameter requestParameters.variables was null or undefined when calling getUserByRestId.');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (requestParameters.features === null || requestParameters.features === undefined) {
|
|
64
|
+
throw new runtime.RequiredError('features','Required parameter requestParameters.features was null or undefined when calling getUserByRestId.');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const queryParameters: any = {};
|
|
68
|
+
|
|
69
|
+
if (requestParameters.variables !== undefined) {
|
|
70
|
+
queryParameters['variables'] = requestParameters.variables;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (requestParameters.features !== undefined) {
|
|
74
|
+
queryParameters['features'] = requestParameters.features;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
78
|
+
|
|
79
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
80
|
+
headerParameters["x-twitter-client-language"] = this.configuration.apiKey("x-twitter-client-language"); // ClientLanguage authentication
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
84
|
+
headerParameters["x-twitter-active-user"] = this.configuration.apiKey("x-twitter-active-user"); // ActiveUser authentication
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
88
|
+
headerParameters["user-agent"] = this.configuration.apiKey("user-agent"); // UserAgent authentication
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
92
|
+
headerParameters["x-twitter-auth-type"] = this.configuration.apiKey("x-twitter-auth-type"); // AuthType authentication
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
96
|
+
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
100
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
104
|
+
const token = this.configuration.accessToken;
|
|
105
|
+
const tokenString = await token("BearerAuth", []);
|
|
106
|
+
|
|
107
|
+
if (tokenString) {
|
|
108
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
const response = await this.request({
|
|
112
|
+
path: `/graphql/{pathQueryId}/UserByRestId`.replace(`{${"pathQueryId"}}`, encodeURIComponent(String(requestParameters.pathQueryId))),
|
|
113
|
+
method: 'GET',
|
|
114
|
+
headers: headerParameters,
|
|
115
|
+
query: queryParameters,
|
|
116
|
+
}, initOverrides);
|
|
117
|
+
|
|
118
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* get user by rest id
|
|
123
|
+
*/
|
|
124
|
+
async getUserByRestId(requestParameters: GetUserByRestIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse> {
|
|
125
|
+
const response = await this.getUserByRestIdRaw(requestParameters, initOverrides);
|
|
126
|
+
return await response.value();
|
|
127
|
+
}
|
|
128
|
+
|
|
37
129
|
/**
|
|
38
130
|
* get user by screen name
|
|
39
131
|
*/
|
|
@@ -42,10 +134,6 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
42
134
|
throw new runtime.RequiredError('pathQueryId','Required parameter requestParameters.pathQueryId was null or undefined when calling getUserByScreenName.');
|
|
43
135
|
}
|
|
44
136
|
|
|
45
|
-
if (requestParameters.queryId === null || requestParameters.queryId === undefined) {
|
|
46
|
-
throw new runtime.RequiredError('queryId','Required parameter requestParameters.queryId was null or undefined when calling getUserByScreenName.');
|
|
47
|
-
}
|
|
48
|
-
|
|
49
137
|
if (requestParameters.variables === null || requestParameters.variables === undefined) {
|
|
50
138
|
throw new runtime.RequiredError('variables','Required parameter requestParameters.variables was null or undefined when calling getUserByScreenName.');
|
|
51
139
|
}
|
|
@@ -56,10 +144,6 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
56
144
|
|
|
57
145
|
const queryParameters: any = {};
|
|
58
146
|
|
|
59
|
-
if (requestParameters.queryId !== undefined) {
|
|
60
|
-
queryParameters['queryId'] = requestParameters.queryId;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
147
|
if (requestParameters.variables !== undefined) {
|
|
64
148
|
queryParameters['variables'] = requestParameters.variables;
|
|
65
149
|
}
|
|
@@ -120,4 +204,82 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
120
204
|
return await response.value();
|
|
121
205
|
}
|
|
122
206
|
|
|
207
|
+
/**
|
|
208
|
+
* get users by rest ids
|
|
209
|
+
*/
|
|
210
|
+
async getUsersByRestIdsRaw(requestParameters: GetUsersByRestIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsersResponse>> {
|
|
211
|
+
if (requestParameters.pathQueryId === null || requestParameters.pathQueryId === undefined) {
|
|
212
|
+
throw new runtime.RequiredError('pathQueryId','Required parameter requestParameters.pathQueryId was null or undefined when calling getUsersByRestIds.');
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (requestParameters.variables === null || requestParameters.variables === undefined) {
|
|
216
|
+
throw new runtime.RequiredError('variables','Required parameter requestParameters.variables was null or undefined when calling getUsersByRestIds.');
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (requestParameters.features === null || requestParameters.features === undefined) {
|
|
220
|
+
throw new runtime.RequiredError('features','Required parameter requestParameters.features was null or undefined when calling getUsersByRestIds.');
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const queryParameters: any = {};
|
|
224
|
+
|
|
225
|
+
if (requestParameters.variables !== undefined) {
|
|
226
|
+
queryParameters['variables'] = requestParameters.variables;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if (requestParameters.features !== undefined) {
|
|
230
|
+
queryParameters['features'] = requestParameters.features;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
234
|
+
|
|
235
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
236
|
+
headerParameters["x-twitter-client-language"] = this.configuration.apiKey("x-twitter-client-language"); // ClientLanguage authentication
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
240
|
+
headerParameters["x-twitter-active-user"] = this.configuration.apiKey("x-twitter-active-user"); // ActiveUser authentication
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
244
|
+
headerParameters["user-agent"] = this.configuration.apiKey("user-agent"); // UserAgent authentication
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
248
|
+
headerParameters["x-twitter-auth-type"] = this.configuration.apiKey("x-twitter-auth-type"); // AuthType authentication
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
252
|
+
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
256
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
260
|
+
const token = this.configuration.accessToken;
|
|
261
|
+
const tokenString = await token("BearerAuth", []);
|
|
262
|
+
|
|
263
|
+
if (tokenString) {
|
|
264
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
const response = await this.request({
|
|
268
|
+
path: `/graphql/{pathQueryId}/UsersByRestIds`.replace(`{${"pathQueryId"}}`, encodeURIComponent(String(requestParameters.pathQueryId))),
|
|
269
|
+
method: 'GET',
|
|
270
|
+
headers: headerParameters,
|
|
271
|
+
query: queryParameters,
|
|
272
|
+
}, initOverrides);
|
|
273
|
+
|
|
274
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UsersResponseFromJSON(jsonValue));
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* get users by rest ids
|
|
279
|
+
*/
|
|
280
|
+
async getUsersByRestIds(requestParameters: GetUsersByRestIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersResponse> {
|
|
281
|
+
const response = await this.getUsersByRestIdsRaw(requestParameters, initOverrides);
|
|
282
|
+
return await response.value();
|
|
283
|
+
}
|
|
284
|
+
|
|
123
285
|
}
|
package/src/apis/UserListApi.ts
CHANGED
|
@@ -16,22 +16,45 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
FollowResponse,
|
|
19
|
+
TweetFavoritersResponse,
|
|
20
|
+
TweetRetweetersResponse,
|
|
19
21
|
} from '../models';
|
|
20
22
|
import {
|
|
21
23
|
FollowResponseFromJSON,
|
|
22
24
|
FollowResponseToJSON,
|
|
25
|
+
TweetFavoritersResponseFromJSON,
|
|
26
|
+
TweetFavoritersResponseToJSON,
|
|
27
|
+
TweetRetweetersResponseFromJSON,
|
|
28
|
+
TweetRetweetersResponseToJSON,
|
|
23
29
|
} from '../models';
|
|
24
30
|
|
|
25
31
|
export interface GetFollowersRequest {
|
|
26
32
|
pathQueryId: string;
|
|
27
|
-
queryId: string;
|
|
28
33
|
variables: string;
|
|
29
34
|
features: string;
|
|
30
35
|
}
|
|
31
36
|
|
|
37
|
+
export interface GetFollowersYouKnowRequest {
|
|
38
|
+
pathQueryId: string;
|
|
39
|
+
variables: string;
|
|
40
|
+
features: string;
|
|
41
|
+
fieldToggles: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
32
44
|
export interface GetFollowingRequest {
|
|
33
45
|
pathQueryId: string;
|
|
34
|
-
|
|
46
|
+
variables: string;
|
|
47
|
+
features: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface GetTweetFavoritersRequest {
|
|
51
|
+
pathQueryId: string;
|
|
52
|
+
variables: string;
|
|
53
|
+
features: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface GetTweetRetweetersRequest {
|
|
57
|
+
pathQueryId: string;
|
|
35
58
|
variables: string;
|
|
36
59
|
features: string;
|
|
37
60
|
}
|
|
@@ -49,10 +72,6 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
49
72
|
throw new runtime.RequiredError('pathQueryId','Required parameter requestParameters.pathQueryId was null or undefined when calling getFollowers.');
|
|
50
73
|
}
|
|
51
74
|
|
|
52
|
-
if (requestParameters.queryId === null || requestParameters.queryId === undefined) {
|
|
53
|
-
throw new runtime.RequiredError('queryId','Required parameter requestParameters.queryId was null or undefined when calling getFollowers.');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
75
|
if (requestParameters.variables === null || requestParameters.variables === undefined) {
|
|
57
76
|
throw new runtime.RequiredError('variables','Required parameter requestParameters.variables was null or undefined when calling getFollowers.');
|
|
58
77
|
}
|
|
@@ -63,10 +82,6 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
63
82
|
|
|
64
83
|
const queryParameters: any = {};
|
|
65
84
|
|
|
66
|
-
if (requestParameters.queryId !== undefined) {
|
|
67
|
-
queryParameters['queryId'] = requestParameters.queryId;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
85
|
if (requestParameters.variables !== undefined) {
|
|
71
86
|
queryParameters['variables'] = requestParameters.variables;
|
|
72
87
|
}
|
|
@@ -127,6 +142,92 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
127
142
|
return await response.value();
|
|
128
143
|
}
|
|
129
144
|
|
|
145
|
+
/**
|
|
146
|
+
* get followers you know
|
|
147
|
+
*/
|
|
148
|
+
async getFollowersYouKnowRaw(requestParameters: GetFollowersYouKnowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FollowResponse>> {
|
|
149
|
+
if (requestParameters.pathQueryId === null || requestParameters.pathQueryId === undefined) {
|
|
150
|
+
throw new runtime.RequiredError('pathQueryId','Required parameter requestParameters.pathQueryId was null or undefined when calling getFollowersYouKnow.');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (requestParameters.variables === null || requestParameters.variables === undefined) {
|
|
154
|
+
throw new runtime.RequiredError('variables','Required parameter requestParameters.variables was null or undefined when calling getFollowersYouKnow.');
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (requestParameters.features === null || requestParameters.features === undefined) {
|
|
158
|
+
throw new runtime.RequiredError('features','Required parameter requestParameters.features was null or undefined when calling getFollowersYouKnow.');
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (requestParameters.fieldToggles === null || requestParameters.fieldToggles === undefined) {
|
|
162
|
+
throw new runtime.RequiredError('fieldToggles','Required parameter requestParameters.fieldToggles was null or undefined when calling getFollowersYouKnow.');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const queryParameters: any = {};
|
|
166
|
+
|
|
167
|
+
if (requestParameters.variables !== undefined) {
|
|
168
|
+
queryParameters['variables'] = requestParameters.variables;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (requestParameters.features !== undefined) {
|
|
172
|
+
queryParameters['features'] = requestParameters.features;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (requestParameters.fieldToggles !== undefined) {
|
|
176
|
+
queryParameters['fieldToggles'] = requestParameters.fieldToggles;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
180
|
+
|
|
181
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
182
|
+
headerParameters["x-twitter-client-language"] = this.configuration.apiKey("x-twitter-client-language"); // ClientLanguage authentication
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
186
|
+
headerParameters["x-twitter-active-user"] = this.configuration.apiKey("x-twitter-active-user"); // ActiveUser authentication
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
190
|
+
headerParameters["user-agent"] = this.configuration.apiKey("user-agent"); // UserAgent authentication
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
194
|
+
headerParameters["x-twitter-auth-type"] = this.configuration.apiKey("x-twitter-auth-type"); // AuthType authentication
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
198
|
+
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
202
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
206
|
+
const token = this.configuration.accessToken;
|
|
207
|
+
const tokenString = await token("BearerAuth", []);
|
|
208
|
+
|
|
209
|
+
if (tokenString) {
|
|
210
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
const response = await this.request({
|
|
214
|
+
path: `/graphql/{pathQueryId}/FollowersYouKnow`.replace(`{${"pathQueryId"}}`, encodeURIComponent(String(requestParameters.pathQueryId))),
|
|
215
|
+
method: 'GET',
|
|
216
|
+
headers: headerParameters,
|
|
217
|
+
query: queryParameters,
|
|
218
|
+
}, initOverrides);
|
|
219
|
+
|
|
220
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FollowResponseFromJSON(jsonValue));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* get followers you know
|
|
225
|
+
*/
|
|
226
|
+
async getFollowersYouKnow(requestParameters: GetFollowersYouKnowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FollowResponse> {
|
|
227
|
+
const response = await this.getFollowersYouKnowRaw(requestParameters, initOverrides);
|
|
228
|
+
return await response.value();
|
|
229
|
+
}
|
|
230
|
+
|
|
130
231
|
/**
|
|
131
232
|
* get user list of following
|
|
132
233
|
*/
|
|
@@ -135,10 +236,6 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
135
236
|
throw new runtime.RequiredError('pathQueryId','Required parameter requestParameters.pathQueryId was null or undefined when calling getFollowing.');
|
|
136
237
|
}
|
|
137
238
|
|
|
138
|
-
if (requestParameters.queryId === null || requestParameters.queryId === undefined) {
|
|
139
|
-
throw new runtime.RequiredError('queryId','Required parameter requestParameters.queryId was null or undefined when calling getFollowing.');
|
|
140
|
-
}
|
|
141
|
-
|
|
142
239
|
if (requestParameters.variables === null || requestParameters.variables === undefined) {
|
|
143
240
|
throw new runtime.RequiredError('variables','Required parameter requestParameters.variables was null or undefined when calling getFollowing.');
|
|
144
241
|
}
|
|
@@ -149,10 +246,6 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
149
246
|
|
|
150
247
|
const queryParameters: any = {};
|
|
151
248
|
|
|
152
|
-
if (requestParameters.queryId !== undefined) {
|
|
153
|
-
queryParameters['queryId'] = requestParameters.queryId;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
249
|
if (requestParameters.variables !== undefined) {
|
|
157
250
|
queryParameters['variables'] = requestParameters.variables;
|
|
158
251
|
}
|
|
@@ -213,4 +306,160 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
213
306
|
return await response.value();
|
|
214
307
|
}
|
|
215
308
|
|
|
309
|
+
/**
|
|
310
|
+
* get tweet favoriters
|
|
311
|
+
*/
|
|
312
|
+
async getTweetFavoritersRaw(requestParameters: GetTweetFavoritersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TweetFavoritersResponse>> {
|
|
313
|
+
if (requestParameters.pathQueryId === null || requestParameters.pathQueryId === undefined) {
|
|
314
|
+
throw new runtime.RequiredError('pathQueryId','Required parameter requestParameters.pathQueryId was null or undefined when calling getTweetFavoriters.');
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if (requestParameters.variables === null || requestParameters.variables === undefined) {
|
|
318
|
+
throw new runtime.RequiredError('variables','Required parameter requestParameters.variables was null or undefined when calling getTweetFavoriters.');
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
if (requestParameters.features === null || requestParameters.features === undefined) {
|
|
322
|
+
throw new runtime.RequiredError('features','Required parameter requestParameters.features was null or undefined when calling getTweetFavoriters.');
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const queryParameters: any = {};
|
|
326
|
+
|
|
327
|
+
if (requestParameters.variables !== undefined) {
|
|
328
|
+
queryParameters['variables'] = requestParameters.variables;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (requestParameters.features !== undefined) {
|
|
332
|
+
queryParameters['features'] = requestParameters.features;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
336
|
+
|
|
337
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
338
|
+
headerParameters["x-twitter-client-language"] = this.configuration.apiKey("x-twitter-client-language"); // ClientLanguage authentication
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
342
|
+
headerParameters["x-twitter-active-user"] = this.configuration.apiKey("x-twitter-active-user"); // ActiveUser authentication
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
346
|
+
headerParameters["user-agent"] = this.configuration.apiKey("user-agent"); // UserAgent authentication
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
350
|
+
headerParameters["x-twitter-auth-type"] = this.configuration.apiKey("x-twitter-auth-type"); // AuthType authentication
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
354
|
+
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
358
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
362
|
+
const token = this.configuration.accessToken;
|
|
363
|
+
const tokenString = await token("BearerAuth", []);
|
|
364
|
+
|
|
365
|
+
if (tokenString) {
|
|
366
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
const response = await this.request({
|
|
370
|
+
path: `/graphql/{pathQueryId}/Favoriters`.replace(`{${"pathQueryId"}}`, encodeURIComponent(String(requestParameters.pathQueryId))),
|
|
371
|
+
method: 'GET',
|
|
372
|
+
headers: headerParameters,
|
|
373
|
+
query: queryParameters,
|
|
374
|
+
}, initOverrides);
|
|
375
|
+
|
|
376
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TweetFavoritersResponseFromJSON(jsonValue));
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* get tweet favoriters
|
|
381
|
+
*/
|
|
382
|
+
async getTweetFavoriters(requestParameters: GetTweetFavoritersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TweetFavoritersResponse> {
|
|
383
|
+
const response = await this.getTweetFavoritersRaw(requestParameters, initOverrides);
|
|
384
|
+
return await response.value();
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* get tweet retweeters
|
|
389
|
+
*/
|
|
390
|
+
async getTweetRetweetersRaw(requestParameters: GetTweetRetweetersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TweetRetweetersResponse>> {
|
|
391
|
+
if (requestParameters.pathQueryId === null || requestParameters.pathQueryId === undefined) {
|
|
392
|
+
throw new runtime.RequiredError('pathQueryId','Required parameter requestParameters.pathQueryId was null or undefined when calling getTweetRetweeters.');
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
if (requestParameters.variables === null || requestParameters.variables === undefined) {
|
|
396
|
+
throw new runtime.RequiredError('variables','Required parameter requestParameters.variables was null or undefined when calling getTweetRetweeters.');
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (requestParameters.features === null || requestParameters.features === undefined) {
|
|
400
|
+
throw new runtime.RequiredError('features','Required parameter requestParameters.features was null or undefined when calling getTweetRetweeters.');
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
const queryParameters: any = {};
|
|
404
|
+
|
|
405
|
+
if (requestParameters.variables !== undefined) {
|
|
406
|
+
queryParameters['variables'] = requestParameters.variables;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (requestParameters.features !== undefined) {
|
|
410
|
+
queryParameters['features'] = requestParameters.features;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
414
|
+
|
|
415
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
416
|
+
headerParameters["x-twitter-client-language"] = this.configuration.apiKey("x-twitter-client-language"); // ClientLanguage authentication
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
420
|
+
headerParameters["x-twitter-active-user"] = this.configuration.apiKey("x-twitter-active-user"); // ActiveUser authentication
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
424
|
+
headerParameters["user-agent"] = this.configuration.apiKey("user-agent"); // UserAgent authentication
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
428
|
+
headerParameters["x-twitter-auth-type"] = this.configuration.apiKey("x-twitter-auth-type"); // AuthType authentication
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
432
|
+
headerParameters["x-csrf-token"] = this.configuration.apiKey("x-csrf-token"); // CsrfToken authentication
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
436
|
+
headerParameters["x-guest-token"] = this.configuration.apiKey("x-guest-token"); // GuestToken authentication
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
440
|
+
const token = this.configuration.accessToken;
|
|
441
|
+
const tokenString = await token("BearerAuth", []);
|
|
442
|
+
|
|
443
|
+
if (tokenString) {
|
|
444
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
const response = await this.request({
|
|
448
|
+
path: `/graphql/{pathQueryId}/Retweeters`.replace(`{${"pathQueryId"}}`, encodeURIComponent(String(requestParameters.pathQueryId))),
|
|
449
|
+
method: 'GET',
|
|
450
|
+
headers: headerParameters,
|
|
451
|
+
query: queryParameters,
|
|
452
|
+
}, initOverrides);
|
|
453
|
+
|
|
454
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TweetRetweetersResponseFromJSON(jsonValue));
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* get tweet retweeters
|
|
459
|
+
*/
|
|
460
|
+
async getTweetRetweeters(requestParameters: GetTweetRetweetersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TweetRetweetersResponse> {
|
|
461
|
+
const response = await this.getTweetRetweetersRaw(requestParameters, initOverrides);
|
|
462
|
+
return await response.value();
|
|
463
|
+
}
|
|
464
|
+
|
|
216
465
|
}
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
export const ContentItemType = {
|
|
21
21
|
TimelineTweet: 'TimelineTweet',
|
|
22
22
|
TimelineTimelineCursor: 'TimelineTimelineCursor',
|
|
23
|
-
TimelineUser: 'TimelineUser'
|
|
23
|
+
TimelineUser: 'TimelineUser',
|
|
24
|
+
TimelinePrompt: 'TimelinePrompt',
|
|
25
|
+
TimelineMessagePrompt: 'TimelineMessagePrompt'
|
|
24
26
|
} as const;
|
|
25
27
|
export type ContentItemType = typeof ContentItemType[keyof typeof ContentItemType];
|
|
26
28
|
|
|
@@ -19,8 +19,11 @@
|
|
|
19
19
|
*/
|
|
20
20
|
export const InstructionType = {
|
|
21
21
|
TimelineAddEntries: 'TimelineAddEntries',
|
|
22
|
+
TimelineAddToModule: 'TimelineAddToModule',
|
|
22
23
|
TimelineClearCache: 'TimelineClearCache',
|
|
23
24
|
TimelinePinEntry: 'TimelinePinEntry',
|
|
25
|
+
TimelineReplaceEntry: 'TimelineReplaceEntry',
|
|
26
|
+
TimelineShowAlert: 'TimelineShowAlert',
|
|
24
27
|
TimelineTerminateTimeline: 'TimelineTerminateTimeline'
|
|
25
28
|
} as const;
|
|
26
29
|
export type InstructionType = typeof InstructionType[keyof typeof InstructionType];
|
|
@@ -19,6 +19,13 @@ import {
|
|
|
19
19
|
TimelineAddEntriesFromJSONTyped,
|
|
20
20
|
TimelineAddEntriesToJSON,
|
|
21
21
|
} from './TimelineAddEntries';
|
|
22
|
+
import {
|
|
23
|
+
TimelineAddToModule,
|
|
24
|
+
instanceOfTimelineAddToModule,
|
|
25
|
+
TimelineAddToModuleFromJSON,
|
|
26
|
+
TimelineAddToModuleFromJSONTyped,
|
|
27
|
+
TimelineAddToModuleToJSON,
|
|
28
|
+
} from './TimelineAddToModule';
|
|
22
29
|
import {
|
|
23
30
|
TimelineClearCache,
|
|
24
31
|
instanceOfTimelineClearCache,
|
|
@@ -33,6 +40,20 @@ import {
|
|
|
33
40
|
TimelinePinEntryFromJSONTyped,
|
|
34
41
|
TimelinePinEntryToJSON,
|
|
35
42
|
} from './TimelinePinEntry';
|
|
43
|
+
import {
|
|
44
|
+
TimelineReplaceEntry,
|
|
45
|
+
instanceOfTimelineReplaceEntry,
|
|
46
|
+
TimelineReplaceEntryFromJSON,
|
|
47
|
+
TimelineReplaceEntryFromJSONTyped,
|
|
48
|
+
TimelineReplaceEntryToJSON,
|
|
49
|
+
} from './TimelineReplaceEntry';
|
|
50
|
+
import {
|
|
51
|
+
TimelineShowAlert,
|
|
52
|
+
instanceOfTimelineShowAlert,
|
|
53
|
+
TimelineShowAlertFromJSON,
|
|
54
|
+
TimelineShowAlertFromJSONTyped,
|
|
55
|
+
TimelineShowAlertToJSON,
|
|
56
|
+
} from './TimelineShowAlert';
|
|
36
57
|
import {
|
|
37
58
|
TimelineTerminateTimeline,
|
|
38
59
|
instanceOfTimelineTerminateTimeline,
|
|
@@ -46,7 +67,7 @@ import {
|
|
|
46
67
|
*
|
|
47
68
|
* @export
|
|
48
69
|
*/
|
|
49
|
-
export type InstructionUnion = { type: 'TimelineAddEntries' } & TimelineAddEntries | { type: 'TimelineClearCache' } & TimelineClearCache | { type: 'TimelinePinEntry' } & TimelinePinEntry | { type: 'TimelineTerminateTimeline' } & TimelineTerminateTimeline;
|
|
70
|
+
export type InstructionUnion = { type: 'TimelineAddEntries' } & TimelineAddEntries | { type: 'TimelineAddToModule' } & TimelineAddToModule | { type: 'TimelineClearCache' } & TimelineClearCache | { type: 'TimelinePinEntry' } & TimelinePinEntry | { type: 'TimelineReplaceEntry' } & TimelineReplaceEntry | { type: 'TimelineShowAlert' } & TimelineShowAlert | { type: 'TimelineTerminateTimeline' } & TimelineTerminateTimeline;
|
|
50
71
|
|
|
51
72
|
export function InstructionUnionFromJSON(json: any): InstructionUnion {
|
|
52
73
|
return InstructionUnionFromJSONTyped(json, false);
|
|
@@ -59,10 +80,16 @@ export function InstructionUnionFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
59
80
|
switch (json['type']) {
|
|
60
81
|
case 'TimelineAddEntries':
|
|
61
82
|
return {...TimelineAddEntriesFromJSONTyped(json, true), type: 'TimelineAddEntries'};
|
|
83
|
+
case 'TimelineAddToModule':
|
|
84
|
+
return {...TimelineAddToModuleFromJSONTyped(json, true), type: 'TimelineAddToModule'};
|
|
62
85
|
case 'TimelineClearCache':
|
|
63
86
|
return {...TimelineClearCacheFromJSONTyped(json, true), type: 'TimelineClearCache'};
|
|
64
87
|
case 'TimelinePinEntry':
|
|
65
88
|
return {...TimelinePinEntryFromJSONTyped(json, true), type: 'TimelinePinEntry'};
|
|
89
|
+
case 'TimelineReplaceEntry':
|
|
90
|
+
return {...TimelineReplaceEntryFromJSONTyped(json, true), type: 'TimelineReplaceEntry'};
|
|
91
|
+
case 'TimelineShowAlert':
|
|
92
|
+
return {...TimelineShowAlertFromJSONTyped(json, true), type: 'TimelineShowAlert'};
|
|
66
93
|
case 'TimelineTerminateTimeline':
|
|
67
94
|
return {...TimelineTerminateTimelineFromJSONTyped(json, true), type: 'TimelineTerminateTimeline'};
|
|
68
95
|
default:
|
|
@@ -80,10 +107,16 @@ export function InstructionUnionToJSON(value?: InstructionUnion | null): any {
|
|
|
80
107
|
switch (value['type']) {
|
|
81
108
|
case 'TimelineAddEntries':
|
|
82
109
|
return TimelineAddEntriesToJSON(value);
|
|
110
|
+
case 'TimelineAddToModule':
|
|
111
|
+
return TimelineAddToModuleToJSON(value);
|
|
83
112
|
case 'TimelineClearCache':
|
|
84
113
|
return TimelineClearCacheToJSON(value);
|
|
85
114
|
case 'TimelinePinEntry':
|
|
86
115
|
return TimelinePinEntryToJSON(value);
|
|
116
|
+
case 'TimelineReplaceEntry':
|
|
117
|
+
return TimelineReplaceEntryToJSON(value);
|
|
118
|
+
case 'TimelineShowAlert':
|
|
119
|
+
return TimelineShowAlertToJSON(value);
|
|
87
120
|
case 'TimelineTerminateTimeline':
|
|
88
121
|
return TimelineTerminateTimelineToJSON(value);
|
|
89
122
|
default:
|