Interface IFetchArgs

Options specifying the data that is to be fetched.

interface IFetchArgs {
    count?: number;
    cursor?: string;
    filter?: ITweetFilter;
    id?: string;
    ids?: string[];
    sortBy?: TweetRepliesSortType;
}

Implemented by

Properties

count?: number

The number of data items to fetch.

  • Works only for cursored resources.
  • Does not work for EResourceType.TWEET_REPLIES.
  • Must be <= 20 for:
    • EResourceType.USER_TIMELINE
    • EResourceType.USER_TIMELINE
    • 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 EResourceType.USER_FOLLOWERS and EResourceType.USER_FOLLOWING.
  • Has not effect for:
    • EResourceType.USER_FEED_FOLLOWED
    • EResourceType.USER_FEED_RECOMMENDED
cursor?: string

The cursor to the batch of data to fetch.

  • May be used for cursored resources.
  • Has no effect for other resources.
filter?: ITweetFilter

The filter for searching tweets.

Required when searching for tweets using EResourceType.TWEET_SEARCH.

id?: string

The id of the target resource.

  • Required for all resources except EResourceType.TWEET_SEARCH and EResourceType.USER_TIMELINE_RECOMMENDED.
  • For EResourceType.USER_DETAILS_BY_USERNAME, can be alphanumeric, while for others, is strictly numeric.
ids?: string[]

The IDs of the target resources.

  • Required only for EResourceType.TWEET_DETAILS_BULK and EResourceType.USER_DETAILS_BY_IDS_BULK.

The sorting to use for tweet results.

  • Only works for EResourceType.TWEET_REPLIES.