/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { usersFollow } from "../funcs/users-follow.js"; import { usersGetAbout } from "../funcs/users-get-about.js"; import { usersGetAccountBased } from "../funcs/users-get-account-based.js"; import { usersGetByIds } from "../funcs/users-get-by-ids.js"; import { usersGetByUsernames } from "../funcs/users-get-by-usernames.js"; import { usersGetStatuses } from "../funcs/users-get-statuses.js"; import { usersSearch } from "../funcs/users-search.js"; import { usersUnfollow } from "../funcs/users-unfollow.js"; import { usersVerifyAccount } from "../funcs/users-verify-account.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 { Followers } from "./followers.js"; import { Following } from "./following.js"; export class Users extends ClientSDK { private _following?: Following; get following(): Following { return (this._following ??= new Following(this._options)); } private _followers?: Followers; get followers(): Followers { return (this._followers ??= new Followers(this._options)); } /** * Get Multiple Users by Usernames * * @remarks * Retrieve detailed profile information for multiple Twitter users by their usernames or profile URLs, $0.10/1000 users. 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 getByUsernames( request: Array, options?: RequestOptions, ): Promise { return unwrapAsync(usersGetByUsernames( this, request, options, )); } /** * Users Details by ID * * @remarks * Users Details by ID. 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 getByIds( request: Array, options?: RequestOptions, ): Promise { return unwrapAsync(usersGetByIds( this, request, options, )); } /** * Verify Account Status * * @remarks * Retrieves the verification metadata for a specific account. This endpoint identifies whether an account holds a **Blue Verified** status (authenticity check) or is an **Official Organization Affiliate** (gold/grey labels). 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 verifyAccount( request: Array, options?: RequestOptions, ): Promise { return unwrapAsync(usersVerifyAccount( this, request, options, )); } /** * Batch Get User account status * * @remarks * Retrieve detailed account status for multiple Twitter users by their usernames. 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 getStatuses( request: Array, options?: RequestOptions, ): Promise { return unwrapAsync(usersGetStatuses( this, request, options, )); } /** * Search User * * @remarks * Search user */ async search( request: operations.UsersSearchRequest, options?: RequestOptions, ): Promise { return unwrapAsync(usersSearch( this, request, options, )); } /** * Follow User * * @remarks * Follow a user, $0.001 per call. */ async follow( request: models.FollowUserQuery, options?: RequestOptions, ): Promise { return unwrapAsync(usersFollow( this, request, options, )); } /** * Unfollow User * * @remarks * Unfollow a user, $0.001 per call. */ async unfollow( request: models.UnfollowUserQuery, options?: RequestOptions, ): Promise { return unwrapAsync(usersUnfollow( this, request, options, )); } /** * Get Twitter Account Based in * * @remarks * Get Twitter Account Based in. 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 getAccountBased( request: Array, options?: RequestOptions, ): Promise { return unwrapAsync(usersGetAccountBased( this, request, options, )); } /** * Get Twitter User About by Screen Name * * @remarks * Get Twitter User About for a specific twitter user. get account_based_in,location_accurate */ async getAbout( request: operations.UsersGetAboutRequest, options?: RequestOptions, ): Promise { return unwrapAsync(usersGetAbout( this, request, options, )); } }