import TwitterApiSubClient from '../client.subclient'; import { FilterStreamV1Params, SampleStreamV1Params, UserV1, VerifyCredentialsV1Params, AppRateLimitV1Result, TAppRateLimitResourceV1, HelpLanguageV1Result, ReverseGeoCodeV1Params, ReverseGeoCodeV1Result, PlaceV1, SearchGeoV1Params, SearchGeoV1Result, TrendMatchV1, TrendsPlaceV1Params, TrendLocationV1, TweetV1TimelineParams, TweetV1UserTimelineParams, TweetV1, MediaStatusV1Result, OembedTweetV1Params, OembedTweetV1Result, MuteUserListV1Params, MuteUserIdsV1Params, UserFollowerIdsV1Params, UserFollowingsIdsV1Params, UserFriendListV1Params, UserFollowerListV1Params, UserSearchV1Params, AccountSettingsV1, ProfileBannerSizeV1, ProfileBannerSizeV1Params, FriendshipLookupV1Params, FriendshipLookupV1, FriendshipShowV1Params, FriendshipV1, FriendshipsIncomingV1Params, UserShowV1Params, UserLookupV1Params, TweetShowV1Params, TweetLookupNoMapV1Params, TweetLookupMapV1Params, TweetLookupMapV1Result, ListListsV1Params, ListV1, ListMembersV1Params, ListMemberShowV1Params, ListMembershipsV1Params, ListOwnershipsV1Params, GetListV1Params, ListStatusesV1Params, ListSubscriptionsV1Params } from '../types'; import { HomeTimelineV1Paginator, ListTimelineV1Paginator, MentionTimelineV1Paginator, UserFavoritesV1Paginator, UserTimelineV1Paginator } from '../paginators/tweet.paginator.v1'; import { MuteUserIdsV1Paginator, MuteUserListV1Paginator } from '../paginators/mutes.paginator.v1'; import { UserFollowerIdsV1Paginator, UserFollowerListV1Paginator } from '../paginators/followers.paginator.v1'; import { UserFollowersIdsV1Paginator, UserFriendListV1Paginator } from '../paginators/friends.paginator.v1'; import { FriendshipsIncomingV1Paginator, FriendshipsOutgoingV1Paginator, UserSearchV1Paginator } from '../paginators/user.paginator.v1'; import { ListMembershipsV1Paginator, ListMembersV1Paginator, ListOwnershipsV1Paginator, ListSubscribersV1Paginator, ListSubscriptionsV1Paginator } from '../paginators/list.paginator.v1'; import TweetStream from '../stream/TweetStream'; import { PromiseOrType } from '../types/shared.types'; /** * Base Twitter v1 client with only read right. */ export default class TwitterApiv1ReadOnly extends TwitterApiSubClient { protected _prefix: string; /** * Returns a single Tweet, specified by the id parameter. The Tweet's author will also be embedded within the Tweet. * https://developer.x.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-show-id * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.singleTweet()` instead. */ singleTweet(tweetId: string, options?: Partial): Promise; /** * Returns fully-hydrated Tweet objects for up to 100 Tweets per request. * https://developer.x.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-lookup * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.tweets()` instead. */ tweets(ids: string | string[], options?: TweetLookupNoMapV1Params): Promise; /** @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.tweets()` instead. */ tweets(ids: string | string[], options: TweetLookupMapV1Params): Promise; /** * Returns a single Tweet, specified by either a Tweet web URL or the Tweet ID, in an oEmbed-compatible format. * The returned HTML snippet will be automatically recognized as an Embedded Tweet when Twitter's widget JavaScript is included on the page. * https://developer.x.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-oembed */ oembedTweet(tweetId: string, options?: Partial): Promise; /** * Returns a collection of the most recent Tweets and Retweets posted by the authenticating user and the users they follow. * The home timeline is central to how most users interact with the Twitter service. * https://developer.x.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-home_timeline * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.homeTimeline()` instead. */ homeTimeline(options?: Partial): Promise; /** * Returns the 20 most recent mentions (Tweets containing a users's @screen_name) for the authenticating user. * The timeline returned is the equivalent of the one seen when you view your mentions on x.com. * https://developer.x.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-mentions_timeline * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.userMentionTimeline()` instead. */ mentionTimeline(options?: Partial): Promise; /** * Returns a collection of the most recent Tweets posted by the user indicated by the user_id parameters. * User timelines belonging to protected users may only be requested when the authenticated user either "owns" the timeline or is an approved follower of the owner. * https://developer.x.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-user_timeline * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.userTimeline()` instead. */ userTimeline(userId: string, options?: Partial): Promise; /** * Returns a collection of the most recent Tweets posted by the user indicated by the screen_name parameters. * User timelines belonging to protected users may only be requested when the authenticated user either "owns" the timeline or is an approved follower of the owner. * https://developer.x.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-user_timeline * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.userByUsername()` then `v2.userTimeline()` instead. */ userTimelineByUsername(username: string, options?: Partial): Promise; /** * Returns the most recent Tweets liked by the authenticating or specified user, 20 tweets by default. * Note: favorites are now known as likes. * https://developer.x.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-favorites-list * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.userLikedTweets()` instead. */ favoriteTimeline(userId: string, options?: Partial): Promise; /** * Returns the most recent Tweets liked by the authenticating or specified user, 20 tweets by default. * Note: favorites are now known as likes. * https://developer.x.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-favorites-list * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.userByUsername()` then `v2.userLikedTweets()` instead. */ favoriteTimelineByUsername(username: string, options?: Partial): Promise; /** * Returns a variety of information about the user specified by the required user_id or screen_name parameter. * The author's most recent Tweet will be returned inline when possible. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-users-show * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.user()` or `v2.userByUsername()` instead. */ user(user: UserShowV1Params): Promise; /** * Returns fully-hydrated user objects for up to 100 users per request, * as specified by comma-separated values passed to the user_id and/or screen_name parameters. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-users-lookup * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.users()` or `v2.usersByUsernames()` instead. */ users(query: UserLookupV1Params): Promise; /** * Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; * returns a 401 status code and an error message if not. * Use this method to test if supplied user credentials are valid. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-account-verify_credentials * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.me()` instead. */ verifyCredentials(options?: Partial): Promise; /** * Returns an array of user objects the authenticating user has muted. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/get-mutes-users-list * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.userMutingUsers()` instead. */ listMutedUsers(options?: Partial): Promise; /** * Returns an array of numeric user ids the authenticating user has muted. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/get-mutes-users-ids * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.userMutingUsers()` instead. */ listMutedUserIds(options?: Partial): Promise; /** * Returns an array of user objects of friends of the specified user. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friends-list * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.following()` instead. */ userFriendList(options?: Partial): Promise; /** * Returns an array of user objects of followers of the specified user. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-followers-list * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.followers()` instead. */ userFollowerList(options?: Partial): Promise; /** * Returns an array of numeric user ids of followers of the specified user. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-followers-ids * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.followers()` instead. */ userFollowerIds(options?: Partial): Promise; /** * Returns an array of numeric user ids of friends of the specified user. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friends-ids * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.following()` instead. */ userFollowingIds(options?: Partial): Promise; /** * Provides a simple, relevance-based search interface to public user accounts on Twitter. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-users-search * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.searchUsers()` instead. */ searchUsers(query: string, options?: Partial): Promise; /** * Returns detailed information about the relationship between two arbitrary users. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-show * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ friendship(sources: FriendshipShowV1Params): Promise; /** * Returns the relationships of the authenticating user to the comma-separated list of up to 100 screen_names or user_ids provided. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-lookup * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ friendships(friendships: FriendshipLookupV1Params): Promise; /** * Returns a collection of user_ids that the currently authenticated user does not want to receive retweets from. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-no_retweets-ids * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ friendshipsNoRetweets(): Promise; /** * Returns a collection of numeric IDs for every user who has a pending request to follow the authenticating user. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-incoming * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ friendshipsIncoming(options?: Partial): Promise; /** * Returns a collection of numeric IDs for every protected user for whom the authenticating user has a pending follow request. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-outgoing * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ friendshipsOutgoing(options?: Partial): Promise; /** * Get current account settings for authenticating user. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-account-settings * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ accountSettings(): Promise; /** * Returns a map of the available size variations of the specified user's profile banner. * If the user has not uploaded a profile banner, a HTTP 404 will be served instead. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-users-profile_banner * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ userProfileBannerSizes(params: ProfileBannerSizeV1Params): Promise; /** * Returns the specified list. Private lists will only be shown if the authenticated user owns the specified list. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-show * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.list()` instead. */ list(options: GetListV1Params): Promise; /** * Returns all lists the authenticating or specified user subscribes to, including their own. * If no user is given, the authenticating user is used. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-list * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.listsOwned()` or `v2.listFollowed()` instead. */ lists(options?: ListListsV1Params): Promise; /** * Returns the members of the specified list. Private list members will only be shown if the authenticated user owns the specified list. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-members * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.listMembers()` instead. */ listMembers(options?: Partial): Promise; /** * Check if the specified user is a member of the specified list. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-members-show * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ listGetMember(options: ListMemberShowV1Params): Promise; /** * Returns the lists the specified user has been added to. * If user_id or screen_name are not provided, the memberships for the authenticating user are returned. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-memberships * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.listMemberships()` instead. */ listMemberships(options?: Partial): Promise; /** * Returns the lists owned by the specified Twitter user. Private lists will only be shown if the authenticated user is also the owner of the lists. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-ownerships * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.listsOwned()` instead. */ listOwnerships(options?: Partial): Promise; /** * Returns a timeline of tweets authored by members of the specified list. Retweets are included by default. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-statuses * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.listTweets()` instead. */ listStatuses(options: Partial): Promise; /** * Returns the subscribers of the specified list. Private list subscribers will only be shown if the authenticated user owns the specified list. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-subscribers * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.listFollowers()` instead. */ listSubscribers(options?: Partial): Promise; /** * Check if the specified user is a subscriber of the specified list. Returns the user if they are a subscriber. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-subscribers-show * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ listGetSubscriber(options: ListMemberShowV1Params): Promise; /** * Obtain a collection of the lists the specified user is subscribed to, 20 lists per page by default. * Does not include the user's own lists. * https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-subscriptions * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.listFollowed()` instead. */ listSubscriptions(options?: Partial): Promise; /** * The STATUS command (this method) is used to periodically poll for updates of media processing operation. * After the STATUS command response returns succeeded, you can move on to the next step which is usually create Tweet with media_id. * https://developer.x.com/en/docs/twitter-api/v1/media/upload-media/api-reference/get-media-upload-status * * @deprecated v1.1 media endpoint, sunset by X in June 2025. `v2.uploadMedia()` waits for the media processing itself. */ mediaInfo(mediaId: string): Promise; /** * Returns public statuses that match one or more filter predicates. * Multiple parameters may be specified which allows most clients to use a single connection to the Streaming API. * https://developer.x.com/en/docs/twitter-api/v1/tweets/filter-realtime/api-reference/post-statuses-filter * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.searchStream()` instead. */ filterStream(params?: Partial & { autoConnect?: true; }): Promise>; /** @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.searchStream()` instead. */ filterStream(params: Partial & { autoConnect: false; }): TweetStream; /** @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.searchStream()` instead. */ filterStream(params?: Partial & { autoConnect?: boolean; }): PromiseOrType>; /** * Returns a small random sample of all public statuses. * The Tweets returned by the default access level are the same, so if two different clients connect to this endpoint, they will see the same Tweets. * https://developer.x.com/en/docs/twitter-api/v1/tweets/sample-realtime/api-reference/get-statuses-sample * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.sampleStream()` instead (Enterprise plans only). */ sampleStream(params?: Partial & { autoConnect?: true; }): Promise>; /** @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.sampleStream()` instead (Enterprise plans only). */ sampleStream(params: Partial & { autoConnect: false; }): TweetStream; /** @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.sampleStream()` instead (Enterprise plans only). */ sampleStream(params?: Partial & { autoConnect?: boolean; }): PromiseOrType>; /** * Create a client that is prefixed with `https//stream.x.com` instead of classic API URL. * * @deprecated The v1.1 streaming endpoints are no longer available on most X API plans. Use the v2 streams instead, like `v2.searchStream()`. */ get stream(): this; /** * Returns the top 50 trending topics for a specific id, if trending information is available for it. * Note: The id parameter for this endpoint is the "where on earth identifier" or WOEID, which is a legacy identifier created by Yahoo and has been deprecated. * https://developer.x.com/en/docs/twitter-api/v1/trends/trends-for-location/api-reference/get-trends-place * * @deprecated v1.1 endpoint, no longer available on most X API plans. Use `v2.trendsByWoeid()` instead. */ trendsByPlace(woeId: string | number, options?: Partial): Promise; /** * Returns the locations that Twitter has trending topic information for. * The response is an array of "locations" that encode the location's WOEID * and some other human-readable information such as a canonical name and country the location belongs in. * https://developer.x.com/en/docs/twitter-api/v1/trends/locations-with-trending-topics/api-reference/get-trends-available * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ trendsAvailable(): Promise; /** * Returns the locations that Twitter has trending topic information for, closest to a specified location. * https://developer.x.com/en/docs/twitter-api/v1/trends/locations-with-trending-topics/api-reference/get-trends-closest * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ trendsClosest(lat: number, long: number): Promise; /** * Returns all the information about a known place. * https://developer.x.com/en/docs/twitter-api/v1/geo/place-information/api-reference/get-geo-id-place_id * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ geoPlace(placeId: string): Promise; /** * Search for places that can be attached to a Tweet via POST statuses/update. * This request will return a list of all the valid places that can be used as the place_id when updating a status. * https://developer.x.com/en/docs/twitter-api/v1/geo/places-near-location/api-reference/get-geo-search * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ geoSearch(options: Partial): Promise; /** * Given a latitude and a longitude, searches for up to 20 places that can be used as a place_id when updating a status. * This request is an informative call and will deliver generalized results about geography. * https://developer.x.com/en/docs/twitter-api/v1/geo/places-near-location/api-reference/get-geo-reverse_geocode * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ geoReverseGeoCode(options: ReverseGeoCodeV1Params): Promise; /** * Returns the current rate limits for methods belonging to the specified resource families. * Each API resource belongs to a "resource family" which is indicated in its method documentation. * The method's resource family can be determined from the first component of the path after the resource version. * https://developer.x.com/en/docs/twitter-api/v1/developer-utilities/rate-limit-status/api-reference/get-application-rate_limit_status * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ rateLimitStatuses(...resources: TAppRateLimitResourceV1[]): Promise; /** * Returns the list of languages supported by Twitter along with the language code supported by Twitter. * https://developer.x.com/en/docs/twitter-api/v1/developer-utilities/supported-languages/api-reference/get-help-languages * * @deprecated v1.1 endpoint, no longer available on most X API plans. No v2 equivalent in this library. */ supportedLanguages(): Promise; }