Skip to content

Commit 96310a1

Browse files
committed
openapi-2.43-update
1 parent 4110b91 commit 96310a1

File tree

4 files changed

+77
-2
lines changed

4 files changed

+77
-2
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.6",
3+
"version": "1.0.7",
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
@@ -56,6 +56,7 @@ import {
5656
addOrDeleteRules,
5757
sampleStream,
5858
getOpenApiSpec,
59+
usersIdTimeline,
5960
usersIdTweets,
6061
usersIdMentions,
6162
usersIdLike,
@@ -1012,6 +1013,29 @@ export class Client {
10121013
method: "GET",
10131014
}),
10141015

1016+
/**
1017+
* User home timeline by User ID
1018+
*
1019+
1020+
* Returns Tweet objects that appears in the provided User ID's home timeline
1021+
* @param id - The ID of the User to list Reverse Chronological Timeline Tweets of
1022+
* @param params - The params for usersIdTimeline
1023+
* @param request_options - Customize the options for this request
1024+
*/
1025+
usersIdTimeline: (
1026+
id: string,
1027+
params: TwitterParams<usersIdTimeline> = {},
1028+
request_options?: Partial<RequestOptions>
1029+
): TwitterPaginatedResponse<TwitterResponse<usersIdTimeline>> =>
1030+
paginate<TwitterResponse<usersIdTimeline>>({
1031+
auth: this.#auth,
1032+
...this.#defaultRequestOptions,
1033+
...request_options,
1034+
endpoint: `/2/users/${id}/timelines/reverse_chronological`,
1035+
params,
1036+
method: "GET",
1037+
}),
1038+
10151039
/**
10161040
* User Tweets timeline by User ID
10171041
*

src/gen/openapi-types.ts

+51
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ export interface paths {
145145
/** Full open api spec in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md) */
146146
get: operations["getOpenApiSpec"];
147147
};
148+
"/2/users/{id}/timelines/reverse_chronological": {
149+
/** Returns Tweet objects that appears in the provided User ID's home timeline */
150+
get: operations["usersIdTimeline"];
151+
};
148152
"/2/users/{id}/tweets": {
149153
/** Returns a list of Tweets authored by the provided User ID */
150154
get: operations["usersIdTweets"];
@@ -2795,6 +2799,52 @@ export interface operations {
27952799
};
27962800
};
27972801
};
2802+
/** Returns Tweet objects that appears in the provided User ID's home timeline */
2803+
usersIdTimeline: {
2804+
parameters: {
2805+
path: {
2806+
/** The ID of the User to list Reverse Chronological Timeline Tweets of */
2807+
id: components["schemas"]["UserID"];
2808+
};
2809+
query: {
2810+
/** The minimum Tweet ID to be included in the result set. This parameter takes precedence over start_time if both are specified. */
2811+
since_id?: components["parameters"]["SinceIdRequestParameter"];
2812+
/** The maximum Tweet ID to be included in the result set. This parameter takes precedence over end_time if both are specified. */
2813+
until_id?: components["parameters"]["UntilIdRequestParameter"];
2814+
/** The maximum number of results */
2815+
max_results?: components["parameters"]["MaxResultsRequestParameter"];
2816+
/** The set of entities to exclude (e.g. 'replies' or 'retweets') */
2817+
exclude?: components["parameters"]["TweetTypeExcludesRequestParameter"];
2818+
/** This parameter is used to get the next 'page' of results. */
2819+
pagination_token?: components["parameters"]["PaginationTokenRequestParameter"];
2820+
/** YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Tweets will be provided. The since_id parameter takes precedence if it is also specified. */
2821+
start_time?: components["parameters"]["StartTimeRequestParameter"];
2822+
/** YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Tweets will be provided. The until_id parameter takes precedence if it is also specified. */
2823+
end_time?: components["parameters"]["EndTimeRequestParameter"];
2824+
/** A comma separated list of fields to expand. */
2825+
expansions?: components["parameters"]["TweetExpansionsParameter"];
2826+
/** A comma separated list of Tweet fields to display. */
2827+
"tweet.fields"?: components["parameters"]["TweetFieldsParameter"];
2828+
/** A comma separated list of User fields to display. */
2829+
"user.fields"?: components["parameters"]["UserFieldsParameter"];
2830+
/** A comma separated list of Media fields to display. */
2831+
"media.fields"?: components["parameters"]["MediaFieldsParameter"];
2832+
/** A comma separated list of Place fields to display. */
2833+
"place.fields"?: components["parameters"]["PlaceFieldsParameter"];
2834+
/** A comma separated list of Poll fields to display. */
2835+
"poll.fields"?: components["parameters"]["PollFieldsParameter"];
2836+
};
2837+
};
2838+
responses: {
2839+
/** The request was successful */
2840+
200: {
2841+
content: {
2842+
"application/json": components["schemas"]["GenericTweetsTimelineResponse"];
2843+
};
2844+
};
2845+
default: components["responses"]["HttpErrorResponse"];
2846+
};
2847+
};
27982848
/** Returns a list of Tweets authored by the provided User ID */
27992849
usersIdTweets: {
28002850
parameters: {
@@ -3616,6 +3666,7 @@ export type getRules = operations['getRules']
36163666
export type addOrDeleteRules = operations['addOrDeleteRules']
36173667
export type sampleStream = operations['sampleStream']
36183668
export type getOpenApiSpec = operations['getOpenApiSpec']
3669+
export type usersIdTimeline = operations['usersIdTimeline']
36193670
export type usersIdTweets = operations['usersIdTweets']
36203671
export type usersIdMentions = operations['usersIdMentions']
36213672
export type usersIdLike = operations['usersIdLike']

src/request.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export async function request({
6060
url.toString(),
6161
{
6262
headers: {
63-
"User-Agent": `twitter-api-typescript-sdk/1.0.6`,
63+
"User-Agent": `twitter-api-typescript-sdk/1.0.7`,
6464
...(isPost
6565
? { "Content-Type": "application/json; charset=utf-8" }
6666
: undefined),

0 commit comments

Comments
 (0)