Skip to content

Commit 12367d5

Browse files
authored
Merge pull request #1 from twitterdev/openapi-2.38-update
openapi-2.38-update
2 parents 3a03d68 + 805faac commit 12367d5

File tree

3 files changed

+84
-1
lines changed

3 files changed

+84
-1
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.0.0",
3+
"version": "1.0.1",
44
"description": "A TypeScript SDK for the Twitter API",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/gen/Client.ts

+24
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import {
4444
createTweet,
4545
findTweetById,
4646
deleteTweetById,
47+
findTweetsThatQuoteATweet,
4748
hideReplyById,
4849
tweetsRecentSearch,
4950
tweetsFullarchiveSearch,
@@ -756,6 +757,29 @@ export class Client {
756757
method: "DELETE",
757758
}),
758759

760+
/**
761+
* Retrieve tweets that quote a tweet.
762+
*
763+
764+
* Returns a variety of information about each tweet that quotes the Tweet specified by the requested ID.
765+
* @param id - The ID of the Quoted Tweet.
766+
* @param params - The params for findTweetsThatQuoteATweet
767+
* @param request_options - Customize the options for this request
768+
*/
769+
findTweetsThatQuoteATweet: (
770+
id: string,
771+
params: TwitterParams<findTweetsThatQuoteATweet> = {},
772+
request_options?: Partial<RequestOptions>
773+
): Promise<TwitterResponse<findTweetsThatQuoteATweet>> =>
774+
rest<TwitterResponse<findTweetsThatQuoteATweet>>({
775+
auth: this.#auth,
776+
...this.#defaultRequestOptions,
777+
...request_options,
778+
endpoint: `/2/tweets/${id}/quote_tweets`,
779+
params,
780+
method: "GET",
781+
}),
782+
759783
/**
760784
* Hide replies
761785
*

src/gen/openapi-types.ts

+59
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ export interface paths {
101101
/** Delete specified Tweet (in the path) by ID. */
102102
delete: operations["deleteTweetById"];
103103
};
104+
"/2/tweets/{id}/quote_tweets": {
105+
/** Returns a variety of information about each tweet that quotes the Tweet specified by the requested ID. */
106+
get: operations["findTweetsThatQuoteATweet"];
107+
};
104108
"/2/tweets/{id}/hidden": {
105109
/** Hides or unhides a reply to an owned conversation. */
106110
put: operations["hideReplyById"];
@@ -578,6 +582,17 @@ export interface components {
578582
};
579583
errors?: components["schemas"]["Problem"][];
580584
};
585+
QuoteTweetLookupResponse: {
586+
data?: components["schemas"]["Tweet"][];
587+
includes?: components["schemas"]["Expansions"];
588+
meta?: {
589+
/** @description This value is used to get the next 'page' of results by providing it to the pagination_token parameter. */
590+
next_token?: string;
591+
/** @description The number of quoting tweets returned in this response */
592+
result_count?: number;
593+
};
594+
errors?: components["schemas"]["Problem"][];
595+
};
581596
SingleTweetLookupResponse: {
582597
data?: components["schemas"]["Tweet"];
583598
includes?: components["schemas"]["Expansions"];
@@ -774,6 +789,15 @@ export interface components {
774789
};
775790
errors?: components["schemas"]["Problem"][];
776791
};
792+
AddBookmarkRequest: {
793+
tweet_id: components["schemas"]["TweetID"];
794+
};
795+
BookmarkMutationResponse: {
796+
data?: {
797+
bookmarked?: boolean;
798+
};
799+
errors?: components["schemas"]["Problem"][];
800+
};
777801
TweetDeleteResponse: {
778802
data?: {
779803
deleted: boolean;
@@ -2365,6 +2389,40 @@ export interface operations {
23652389
default: components["responses"]["HttpErrorResponse"];
23662390
};
23672391
};
2392+
/** Returns a variety of information about each tweet that quotes the Tweet specified by the requested ID. */
2393+
findTweetsThatQuoteATweet: {
2394+
parameters: {
2395+
path: {
2396+
/** The ID of the Quoted Tweet. */
2397+
id: components["schemas"]["TweetID"];
2398+
};
2399+
query: {
2400+
/** The maximum number of results to be returned. */
2401+
max_results?: number;
2402+
/** A comma separated list of fields to expand. */
2403+
expansions?: components["parameters"]["TweetExpansionsParameter"];
2404+
/** A comma separated list of Tweet fields to display. */
2405+
"tweet.fields"?: components["parameters"]["TweetFieldsParameter"];
2406+
/** A comma separated list of User fields to display. */
2407+
"user.fields"?: components["parameters"]["UserFieldsParameter"];
2408+
/** A comma separated list of Media fields to display. */
2409+
"media.fields"?: components["parameters"]["MediaFieldsParameter"];
2410+
/** A comma separated list of Place fields to display. */
2411+
"place.fields"?: components["parameters"]["PlaceFieldsParameter"];
2412+
/** A comma separated list of Poll fields to display. */
2413+
"poll.fields"?: components["parameters"]["PollFieldsParameter"];
2414+
};
2415+
};
2416+
responses: {
2417+
/** The request was successful */
2418+
200: {
2419+
content: {
2420+
"application/json": components["schemas"]["QuoteTweetLookupResponse"];
2421+
};
2422+
};
2423+
default: components["responses"]["HttpErrorResponse"];
2424+
};
2425+
};
23682426
/** Hides or unhides a reply to an owned conversation. */
23692427
hideReplyById: {
23702428
parameters: {
@@ -3415,6 +3473,7 @@ export type findTweetsById = operations['findTweetsById']
34153473
export type createTweet = operations['createTweet']
34163474
export type findTweetById = operations['findTweetById']
34173475
export type deleteTweetById = operations['deleteTweetById']
3476+
export type findTweetsThatQuoteATweet = operations['findTweetsThatQuoteATweet']
34183477
export type hideReplyById = operations['hideReplyById']
34193478
export type tweetsRecentSearch = operations['tweetsRecentSearch']
34203479
export type tweetsFullarchiveSearch = operations['tweetsFullarchiveSearch']

0 commit comments

Comments
 (0)