Skip to content

Commit 573de2e

Browse files
committed
openapi-2.50-update
1 parent 706b73d commit 573de2e

File tree

4 files changed

+503
-51
lines changed

4 files changed

+503
-51
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twitter-api-sdk",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "A TypeScript SDK for the Twitter API",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/gen/Client.ts

+92-4
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ import {
3838
spaceTweets,
3939
findTweetsById,
4040
createTweet,
41+
getTweetsComplianceStream,
4142
tweetCountsFullArchiveSearch,
4243
tweetCountsRecentSearch,
44+
getTweetsFirehoseStream,
4345
sampleStream,
46+
getTweetsSample10Stream,
4447
tweetsFullarchiveSearch,
4548
tweetsRecentSearch,
4649
searchStream,
@@ -55,6 +58,7 @@ import {
5558
findUsersById,
5659
findUsersByUsername,
5760
findUserByUsername,
61+
getUsersComplianceStream,
5862
findMyUser,
5963
findUserById,
6064
usersIdBlocking,
@@ -103,8 +107,8 @@ export class Client {
103107
auth: string | AuthClient,
104108
requestOptions?: Partial<RequestOptions>
105109
) {
106-
this.version = "1.1.0";
107-
this.twitterApiOpenApiVersion = "2.45";
110+
this.version = "1.1.1";
111+
this.twitterApiOpenApiVersion = "2.50";
108112
this.#auth = typeof auth === "string" ? new OAuth2Bearer(auth) : auth;
109113
this.#defaultRequestOptions = {
110114
...requestOptions,
@@ -265,6 +269,48 @@ export class Client {
265269
params,
266270
method: "GET",
267271
}),
272+
273+
/**
274+
* Tweets Compliance stream
275+
*
276+
277+
* Streams 100% of compliance data for Tweets
278+
* @param params - The params for getTweetsComplianceStream
279+
* @param request_options - Customize the options for this request
280+
*/
281+
getTweetsComplianceStream: (
282+
params: TwitterParams<getTweetsComplianceStream>,
283+
request_options?: Partial<RequestOptions>
284+
): AsyncGenerator<TwitterResponse<getTweetsComplianceStream>> =>
285+
stream<TwitterResponse<getTweetsComplianceStream>>({
286+
auth: this.#auth,
287+
...this.#defaultRequestOptions,
288+
...request_options,
289+
endpoint: `/2/tweets/compliance/stream`,
290+
params,
291+
method: "GET",
292+
}),
293+
294+
/**
295+
* Users Compliance stream
296+
*
297+
298+
* Streams 100% of compliance data for Users
299+
* @param params - The params for getUsersComplianceStream
300+
* @param request_options - Customize the options for this request
301+
*/
302+
getUsersComplianceStream: (
303+
params: TwitterParams<getUsersComplianceStream>,
304+
request_options?: Partial<RequestOptions>
305+
): AsyncGenerator<TwitterResponse<getUsersComplianceStream>> =>
306+
stream<TwitterResponse<getUsersComplianceStream>>({
307+
auth: this.#auth,
308+
...this.#defaultRequestOptions,
309+
...request_options,
310+
endpoint: `/2/users/compliance/stream`,
311+
params,
312+
method: "GET",
313+
}),
268314
};
269315
/**
270316
* General
@@ -875,6 +921,27 @@ export class Client {
875921
method: "GET",
876922
}),
877923

924+
/**
925+
* Firehose stream
926+
*
927+
928+
* Streams 100% of public Tweets.
929+
* @param params - The params for getTweetsFirehoseStream
930+
* @param request_options - Customize the options for this request
931+
*/
932+
getTweetsFirehoseStream: (
933+
params: TwitterParams<getTweetsFirehoseStream>,
934+
request_options?: Partial<RequestOptions>
935+
): AsyncGenerator<TwitterResponse<getTweetsFirehoseStream>> =>
936+
stream<TwitterResponse<getTweetsFirehoseStream>>({
937+
auth: this.#auth,
938+
...this.#defaultRequestOptions,
939+
...request_options,
940+
endpoint: `/2/tweets/firehose/stream`,
941+
params,
942+
method: "GET",
943+
}),
944+
878945
/**
879946
* Sample stream
880947
*
@@ -896,6 +963,27 @@ export class Client {
896963
method: "GET",
897964
}),
898965

966+
/**
967+
* Sample 10% stream
968+
*
969+
970+
* Streams a deterministic 10% of public Tweets.
971+
* @param params - The params for getTweetsSample10Stream
972+
* @param request_options - Customize the options for this request
973+
*/
974+
getTweetsSample10Stream: (
975+
params: TwitterParams<getTweetsSample10Stream>,
976+
request_options?: Partial<RequestOptions>
977+
): AsyncGenerator<TwitterResponse<getTweetsSample10Stream>> =>
978+
stream<TwitterResponse<getTweetsSample10Stream>>({
979+
auth: this.#auth,
980+
...this.#defaultRequestOptions,
981+
...request_options,
982+
endpoint: `/2/tweets/sample10/stream`,
983+
params,
984+
method: "GET",
985+
}),
986+
899987
/**
900988
* Full-archive search
901989
*
@@ -1532,10 +1620,10 @@ export class Client {
15321620
}),
15331621

15341622
/**
1535-
* Returns User objects that follow a List by the provided User ID
1623+
* Followers by User ID
15361624
*
15371625
1538-
* Returns a list of Users that follow the provided User ID
1626+
* Returns a list of Users who are followers of the specified User ID.
15391627
* @param id - The ID of the User to lookup.
15401628
* @param params - The params for usersIdFollowers
15411629
* @param request_options - Customize the options for this request

0 commit comments

Comments
 (0)