-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusers.ts
More file actions
184 lines (172 loc) · 5.01 KB
/
Copy pathusers.ts
File metadata and controls
184 lines (172 loc) · 5.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { usersFollow } from "../funcs/users-follow.js";
import { usersGetAbout } from "../funcs/users-get-about.js";
import { usersGetAccountBased } from "../funcs/users-get-account-based.js";
import { usersGetByIds } from "../funcs/users-get-by-ids.js";
import { usersGetByUsernames } from "../funcs/users-get-by-usernames.js";
import { usersGetStatuses } from "../funcs/users-get-statuses.js";
import { usersSearch } from "../funcs/users-search.js";
import { usersUnfollow } from "../funcs/users-unfollow.js";
import { usersVerifyAccount } from "../funcs/users-verify-account.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as models from "../models/index.js";
import * as operations from "../models/operations/index.js";
import { unwrapAsync } from "../types/fp.js";
import { Followers } from "./followers.js";
import { Following } from "./following.js";
export class Users extends ClientSDK {
private _following?: Following;
get following(): Following {
return (this._following ??= new Following(this._options));
}
private _followers?: Followers;
get followers(): Followers {
return (this._followers ??= new Followers(this._options));
}
/**
* Get Multiple Users by Usernames
*
* @remarks
* Retrieve detailed profile information for multiple Twitter users by their usernames or profile URLs, $0.10/1000 users. The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.
*/
async getByUsernames(
request: Array<string>,
options?: RequestOptions,
): Promise<any> {
return unwrapAsync(usersGetByUsernames(
this,
request,
options,
));
}
/**
* Users Details by ID
*
* @remarks
* Users Details by ID. The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.
*/
async getByIds(
request: Array<string>,
options?: RequestOptions,
): Promise<models.UsersDetailsResponse> {
return unwrapAsync(usersGetByIds(
this,
request,
options,
));
}
/**
* Verify Account Status
*
* @remarks
* Retrieves the verification metadata for a specific account. This endpoint identifies whether an account holds a **Blue Verified** status (authenticity check) or is an **Official Organization Affiliate** (gold/grey labels). The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.
*/
async verifyAccount(
request: Array<string>,
options?: RequestOptions,
): Promise<models.AccountVerifyResponse> {
return unwrapAsync(usersVerifyAccount(
this,
request,
options,
));
}
/**
* Batch Get User account status
*
* @remarks
* Retrieve detailed account status for multiple Twitter users by their usernames. The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.
*/
async getStatuses(
request: Array<string>,
options?: RequestOptions,
): Promise<any> {
return unwrapAsync(usersGetStatuses(
this,
request,
options,
));
}
/**
* Search User
*
* @remarks
* Search user
*/
async search(
request: operations.UsersSearchRequest,
options?: RequestOptions,
): Promise<models.SearchUserResponse> {
return unwrapAsync(usersSearch(
this,
request,
options,
));
}
/**
* Follow User
*
* @remarks
* Follow a user, $0.001 per call.
*/
async follow(
request: models.FollowUserQuery,
options?: RequestOptions,
): Promise<models.BlockUserResponse> {
return unwrapAsync(usersFollow(
this,
request,
options,
));
}
/**
* Unfollow User
*
* @remarks
* Unfollow a user, $0.001 per call.
*/
async unfollow(
request: models.UnfollowUserQuery,
options?: RequestOptions,
): Promise<models.UnfollowUserResponse> {
return unwrapAsync(usersUnfollow(
this,
request,
options,
));
}
/**
* Get Twitter Account Based in
*
* @remarks
* Get Twitter Account Based in. The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.
*/
async getAccountBased(
request: Array<string>,
options?: RequestOptions,
): Promise<models.TwitterAccountBasedStandardResponse> {
return unwrapAsync(usersGetAccountBased(
this,
request,
options,
));
}
/**
* Get Twitter User About by Screen Name
*
* @remarks
* Get Twitter User About for a specific twitter user. get account_based_in,location_accurate
*/
async getAbout(
request: operations.UsersGetAboutRequest,
options?: RequestOptions,
): Promise<models.TwitterUserAboutStandardResponse> {
return unwrapAsync(usersGetAbout(
this,
request,
options,
));
}
}