twitter-account-crawler
Collect random users on Twitter.
NOTE: Currently only supports Japanese users.
API
new TwitterAccountCrawler(keys)
Returns the instance of the crawler.
keys
consists of consumer_key
, consumer_secret
, token
, and token_secret
.
.on('account', callback)
The event emitted when the crawler gets an account.
callback
takes Twitter user object as parameter.
.start()
Starts the crawler.
.stop()
Stops the crawler.
Usage
const TwitterAccountCrawler = ; // Initialize with Twitter app credentialsconst crawler = consumer_key: 'SUPER_SECRET_CONSUMER_KEY' consumer_secret: 'SUPER_SECRET_CONSUMER_SECRET' token: 'SUPER_SECRET_TOKEN' token_secret: 'SUPER_SECRET_TOKEN_SECRET'; // Define callback, for examplecrawler; // Start the crawlercrawlerstart; // Stop the crawlercrawler;
License
MIT