x-api-sdk-ts
Version:
TypeScript Library for the X (ex-twitter) API V2
27 lines (26 loc) • 1.58 kB
TypeScript
import { IPostOptions, AbstractPosts } from "../interfaces/api/IPosts";
import type { ICreatePostResponse } from "../types/x-api/posts/create_post_response";
import type { IDeletePostResponse } from "../types/x-api/posts/delete_post_response";
import type { ExpansionPost, PlaceField, MediaField, PollField } from "../types/x-api/posts/get_posts_query";
import type { IGetPostResponse, IGetPostsResponse } from "../types/x-api/posts/get_posts_response";
import type { TweetField, UserField } from "../types/x-api/shared";
export declare class Posts extends AbstractPosts {
create(text: string, options?: IPostOptions): Promise<import("..").RCResponse<ICreatePostResponse, string | import("..").IXError | null | undefined>>;
delete(id: string): Promise<import("..").RCResponse<IDeletePostResponse, string | import("..").IXError | null | undefined>>;
get(id: string, options?: {
tweetFields?: TweetField[];
expansions?: ExpansionPost[];
mediaFields?: MediaField[];
pollFields?: PollField[];
userFields?: UserField[];
placeFields?: PlaceField[];
}): Promise<import("..").RCResponse<IGetPostResponse, string | import("..").IXError | null | undefined>>;
getMultiple(ids: string[], options?: {
tweetFields?: TweetField[];
expansions?: ExpansionPost[];
mediaFields?: MediaField[];
pollFields?: PollField[];
userFields?: UserField[];
placeFields?: PlaceField[];
}): Promise<import("..").RCResponse<IGetPostsResponse, string | import("..").IXError | null | undefined>>;
}