/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { tweetsDetail } from "../funcs/tweets-detail.js"; import { tweetsLookup } from "../funcs/tweets-lookup.js"; import { tweetsSimilar } from "../funcs/tweets-similar.js"; import { tweetsThread } from "../funcs/tweets-thread.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { Actions } from "./actions.js"; import { Engagement } from "./engagement.js"; import { Replies } from "./replies.js"; export class Tweets extends ClientSDK { private _actions?: Actions; get actions(): Actions { return (this._actions ??= new Actions(this._options)); } private _replies?: Replies; get replies(): Replies { return (this._replies ??= new Replies(this._options)); } private _engagement?: Engagement; get engagement(): Engagement { return (this._engagement ??= new Engagement(this._options)); } /** * Get Tweet Detail * * @remarks * Retrieve detailed information for one or more tweets by ID (no cookie required). The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS. */ async detail( request: Array, options?: RequestOptions, ): Promise { return unwrapAsync(tweetsDetail( this, request, options, )); } /** * Get Tweet Thread by ID * * @remarks * Retrieve all tweets in a thread by tweet ID, sorted by latest. */ async thread( request: models.TweetThreadByIdBody, options?: RequestOptions, ): Promise { return unwrapAsync(tweetsThread( this, request, options, )); } /** * Batch Get Tweets by ID * * @remarks * Retrieve detailed information for multiple Tweets by their IDs. The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS. */ async lookup( request: Array, options?: RequestOptions, ): Promise { return unwrapAsync(tweetsLookup( this, request, options, )); } /** * Get Similar Tweets * * @remarks * Get similar tweets */ async similar( request: operations.TweetsSimilarRequest, options?: RequestOptions, ): Promise { return unwrapAsync(tweetsSimilar( this, request, options, )); } }