Skip to content

openapi-2.43-update #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "twitter-api-sdk",
"version": "1.0.6",
"version": "1.0.7",
"description": "A TypeScript SDK for the Twitter API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
24 changes: 24 additions & 0 deletions src/gen/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import {
addOrDeleteRules,
sampleStream,
getOpenApiSpec,
usersIdTimeline,
usersIdTweets,
usersIdMentions,
usersIdLike,
Expand Down Expand Up @@ -1012,6 +1013,29 @@ export class Client {
method: "GET",
}),

/**
* User home timeline by User ID
*

* Returns Tweet objects that appears in the provided User ID's home timeline
* @param id - The ID of the User to list Reverse Chronological Timeline Tweets of
* @param params - The params for usersIdTimeline
* @param request_options - Customize the options for this request
*/
usersIdTimeline: (
id: string,
params: TwitterParams<usersIdTimeline> = {},
request_options?: Partial<RequestOptions>
): TwitterPaginatedResponse<TwitterResponse<usersIdTimeline>> =>
paginate<TwitterResponse<usersIdTimeline>>({
auth: this.#auth,
...this.#defaultRequestOptions,
...request_options,
endpoint: `/2/users/${id}/timelines/reverse_chronological`,
params,
method: "GET",
}),

/**
* User Tweets timeline by User ID
*
Expand Down
51 changes: 51 additions & 0 deletions src/gen/openapi-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ export interface paths {
/** Full open api spec in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md) */
get: operations["getOpenApiSpec"];
};
"/2/users/{id}/timelines/reverse_chronological": {
/** Returns Tweet objects that appears in the provided User ID's home timeline */
get: operations["usersIdTimeline"];
};
"/2/users/{id}/tweets": {
/** Returns a list of Tweets authored by the provided User ID */
get: operations["usersIdTweets"];
Expand Down Expand Up @@ -2795,6 +2799,52 @@ export interface operations {
};
};
};
/** Returns Tweet objects that appears in the provided User ID's home timeline */
usersIdTimeline: {
parameters: {
path: {
/** The ID of the User to list Reverse Chronological Timeline Tweets of */
id: components["schemas"]["UserID"];
};
query: {
/** The minimum Tweet ID to be included in the result set. This parameter takes precedence over start_time if both are specified. */
since_id?: components["parameters"]["SinceIdRequestParameter"];
/** The maximum Tweet ID to be included in the result set. This parameter takes precedence over end_time if both are specified. */
until_id?: components["parameters"]["UntilIdRequestParameter"];
/** The maximum number of results */
max_results?: components["parameters"]["MaxResultsRequestParameter"];
/** The set of entities to exclude (e.g. 'replies' or 'retweets') */
exclude?: components["parameters"]["TweetTypeExcludesRequestParameter"];
/** This parameter is used to get the next 'page' of results. */
pagination_token?: components["parameters"]["PaginationTokenRequestParameter"];
/** 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. */
start_time?: components["parameters"]["StartTimeRequestParameter"];
/** 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. */
end_time?: components["parameters"]["EndTimeRequestParameter"];
/** A comma separated list of fields to expand. */
expansions?: components["parameters"]["TweetExpansionsParameter"];
/** A comma separated list of Tweet fields to display. */
"tweet.fields"?: components["parameters"]["TweetFieldsParameter"];
/** A comma separated list of User fields to display. */
"user.fields"?: components["parameters"]["UserFieldsParameter"];
/** A comma separated list of Media fields to display. */
"media.fields"?: components["parameters"]["MediaFieldsParameter"];
/** A comma separated list of Place fields to display. */
"place.fields"?: components["parameters"]["PlaceFieldsParameter"];
/** A comma separated list of Poll fields to display. */
"poll.fields"?: components["parameters"]["PollFieldsParameter"];
};
};
responses: {
/** The request was successful */
200: {
content: {
"application/json": components["schemas"]["GenericTweetsTimelineResponse"];
};
};
default: components["responses"]["HttpErrorResponse"];
};
};
/** Returns a list of Tweets authored by the provided User ID */
usersIdTweets: {
parameters: {
Expand Down Expand Up @@ -3616,6 +3666,7 @@ export type getRules = operations['getRules']
export type addOrDeleteRules = operations['addOrDeleteRules']
export type sampleStream = operations['sampleStream']
export type getOpenApiSpec = operations['getOpenApiSpec']
export type usersIdTimeline = operations['usersIdTimeline']
export type usersIdTweets = operations['usersIdTweets']
export type usersIdMentions = operations['usersIdMentions']
export type usersIdLike = operations['usersIdLike']
Expand Down
2 changes: 1 addition & 1 deletion src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export async function request({
url.toString(),
{
headers: {
"User-Agent": `twitter-api-typescript-sdk/1.0.6`,
"User-Agent": `twitter-api-typescript-sdk/1.0.7`,
...(isPost
? { "Content-Type": "application/json; charset=utf-8" }
: undefined),
Expand Down