import { TweetFilter as TweetFilterCore } from 'rettiwt-core'; import { EResourceType } from '../../enums/Resource'; /** * Options specifying the data that is to be fetched. * * @public */ export declare class FetchArgs { /** * The number of data items to fetch. * * @remarks * - Works only for cursored resources. * - Must be \<= 20 for: * - {@link EResourceType.USER_TIMELINE} * - {@link EResourceType.USER_TIMELINE} * - {@link EResourceType.USER_TIMELINE_AND_REPLIES} * - Must be \<= 100 for all other cursored resources. * - Due a bug on Twitter's end, count does not work for {@link EResourceType.USER_FOLLOWERS} and {@link EResourceType.USER_FOLLOWING}. * - Has not effect for: * - {@link EResourceType.USER_FEED_FOLLOWED} * - {@link EResourceType.USER_FEED_RECOMMENDED} */ count?: number; /** * The cursor to the batch of data to fetch. * * @remarks * - May be used for cursored resources. * - Has no effect for other resources. */ cursor?: string; /** * The filter for searching tweets. * * @remarks * Required when searching for tweets using {@link EResourceType.TWEET_SEARCH}. */ filter?: TweetFilter; /** * The id of the target resource. * * @remarks * - Required for all resources except {@link EResourceType.TWEET_SEARCH} and {@link EResourceType.USER_TIMELINE_RECOMMENDED}. * - For {@link EResourceType.USER_DETAILS_BY_USERNAME}, can be alphanumeric, while for others, is strictly numeric. */ id?: string; /** * @param resource - The resource to be fetched. * @param args - Additional user-defined arguments for fetching the resource. */ constructor(resource: EResourceType, args: FetchArgs); } /** * The filter to be used for searching tweets. * * @public */ export declare class TweetFilter extends TweetFilterCore { /** The date upto which tweets are to be searched. */ endDate?: Date; /** The list of words to exclude from search. */ excludeWords?: string[]; /** * The list of usernames whose tweets are to be searched. * * @remarks * '\@' must be excluded from the username! */ fromUsers?: string[]; /** * The list of hashtags to search. * * @remarks * '#' must be excluded from the hashtag! */ hashtags?: string[]; /** The exact phrase to search. */ includePhrase?: string; /** The list of words to search. */ includeWords?: string[]; /** The language of the tweets to search. */ language?: string; /** * Whether to fetch tweets that are links or not. * * @defaultValue true */ links?: boolean; /** The list from which tweets are to be searched. */ list?: string; /** The id of the tweet, before which the tweets are to be searched. */ maxId?: string; /** * The list of username mentioned in the tweets to search. * * @remarks * '\@' must be excluded from the username! */ mentions?: string[]; /** The minimun number of likes to search by. */ minLikes?: number; /** The minimum number of replies to search by. */ minReplies?: number; /** The minimum number of retweets to search by. */ minRetweets?: number; /** The optional words to search. */ optionalWords?: string[]; /** The id of the tweet which is quoted in the tweets to search. */ quoted?: string; /** * Whether to fetch tweets that are replies or not. * * @defaultValue true */ replies?: boolean; /** The id of the tweet, after which the tweets are to be searched. */ sinceId?: string; /** The date starting from which tweets are to be searched. */ startDate?: Date; /** * The list of username to whom the tweets to be searched, are adressed. * * @remarks * '\@' must be excluded from the username! */ toUsers?: string[]; /** * @param filter - The filter to use for searching tweets. */ constructor(filter: TweetFilter); }