@xamgore/get-tweets
v4.1.0
Published
Get latest tweets
Downloads
5
Maintainers
Readme
get-tweets
Get latest tweets
Install
npm install --save get-tweets
Usage
import getTweets from 'get-tweets';
import tokens from 'twitter-tokens';
getTweets(tokens, 'largescalejs_ru', '424119506508980224').then(tweets => {
console.log(tweets);
});
API
getTweets(tokens, username, sinceId)
Return a promise that resolves to tweets.
tokens
Required
Type: Object
Valid Twitter developer credentials (tokens) in the form of a set of consumer and access tokens/keys. You can use twitter-tokens, to simplify getting tokens.
username
Required
Type: String
Twitter username.
sinceId
Required
Type: String
id_str
of tweet since which you want to get latest tweets. Result array will not contain this tweet. If you want it to contain that tweet use bignum-dec: getMentions(tokens, bignumDec(tweet.id_str), cb);
. See tests for details.
Return results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the
since_id
, thesince_id
will be forced to the oldest ID available.
— Twitter APIstatuses/user_timeline
Related
- get-twitter-info — get info about target username
- get-twitter-followers — get followers for target username
- tweet-links — extract links from tweet
- tweets-stats — get statistics from array of tweets
- twitter-mentions — get latest mentions for target username
- twitter-profile-media — get twitter profile image and banner
- twitter-tokens — get twitter tokens
License
MIT © Igor Strebezhev, Vladimir Starkov