import { EMediaType } from '../../enums/Media'; import { ITweet, ITweetEntities, ITweetMedia } from '../../types/data/Tweet'; import { IExtendedMedia as IRawExtendedMedia } from '../../types/raw/base/Media'; import { ITweet as IRawTweet, IEntities as IRawTweetEntities } from '../../types/raw/base/Tweet'; import { User } from './User'; /** * The details of a single tweet. * * @public */ export declare class Tweet implements ITweet { bookmarkCount: number; conversationId: string; createdAt: string; entities: TweetEntities; fullText: string; id: string; lang: string; likeCount: number; media?: TweetMedia[]; quoteCount: number; quoted?: Tweet; replyCount: number; replyTo?: string; retweetCount: number; retweetedTweet?: Tweet; tweetBy: User; url: string; viewCount: number; /** * @param tweet - The raw tweet details. */ constructor(tweet: IRawTweet); /** * Extract and deserialize the original quoted tweet from the given raw tweet. * * @param tweet - The raw tweet. * * @returns - The deserialized original quoted tweet. */ private getQuotedTweet; /** * Extract and deserialize the original retweeted tweet from the given raw tweet. * * @param tweet - The raw tweet. * * @returns - The deserialized original retweeted tweet. */ private getRetweetedTweet; /** * Extracts and deserializes multiple target tweets from the given raw response data. * * @param response - The raw response data. * @param ids - The ids of the target tweets. * * @returns The target deserialized tweets. */ static multiple(response: NonNullable, ids: string[]): Tweet[]; /** * Extracts and deserializes a single target tweet from the given raw response data. * * @param response - The raw response data. * @param id - The id of the target tweet. * * @returns The target deserialized tweet. */ static single(response: NonNullable, id: string): Tweet | undefined; /** * Extracts and deserializes the timeline of tweets from the given raw response data. * * @param response - The raw response data. * @param ids - The IDs of specific tweets that need to be extracted. * * @returns The deserialized timeline of tweets. */ static timeline(response: NonNullable): Tweet[]; /** * @returns A serializable JSON representation of `this` object. */ toJSON(): ITweet; } /** * The different types parsed entities like urls, media, mentions, hashtags, etc. * * @public */ export declare class TweetEntities { /** The list of hashtags mentioned in the tweet. */ hashtags: string[]; /** The list of IDs of users mentioned in the tweet. */ mentionedUsers: string[]; /** The list of urls mentioned in the tweet. */ urls: string[]; /** * @param entities - The raw tweet entities. */ constructor(entities: IRawTweetEntities); /** * @returns A serializable JSON representation of `this` object. */ toJSON(): ITweetEntities; } /** * The details of a single media content included in a tweet. * * @public */ export declare class TweetMedia { /** The thumbnail URL for the video content of the tweet. */ thumbnailUrl?: string; /** The type of media. */ type: EMediaType; /** The direct URL to the media. */ url: string; /** * @param media - The raw media details. */ constructor(media: IRawExtendedMedia); /** * @returns A serializable JSON representation of `this` object. */ toJSON(): ITweetMedia; }