0.10.3 • Published 8 years ago

nodejs-twitter-crawler v0.10.3

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
8 years ago

NodeJS Twitter Crawler

last-release npm-version npm-license npm-downloads

Crawl twitter users and user tweets but using multiple credentials. Credentials used in a round-robin mode.

Using the component

NodeJS Twitter Crawler is implemented using promises. You will need to use promises pattern no add callbacks to crawler method invocations.

var crawler = new TwitterCrawler(credentials);

crawler.getUser(/* CrawlerParameters */)
  .then( /* Success Callback */ )
  .catch( /* Error Callback */ )

crawler.getTweets(/* CrawlerParameters */, { limit: /* Desired limit, you can omit this */ })
  .then( /* Success Callback */ )
  .catch( /* Error Callback */ )

API Methods

The available methods are the following ones:

  • getUser :: CrawlerParameters -> Promise - Obtain the user status from Twitter by calling users/show method from Twitter API. The then callback will receive the user information.
  • getTweets :: (CrawlerParameters[, CrawlerOptions]) -> Promise - Obtain User Tweets by calling statuses/user_timeline method from Twitter API. The then callback will receive a list of tweets.

Definitions

  • CrawlerParameters can be a TwitterID or a TwitterParameters object.
  • TwitterID is the numeric Twitter ID or the Twitter Handle.
  • TwitterParameters is an object with parameters to be passed to Twitter API. E.g. this documentation shows that GET statuses/user_timeline can receive parameters such as user_id or exclude_replies.
  • Promise is a promise as defined by BlueBird package.
  • CrawlerOptions is an object containing options for the crawling with attributes:
    • limit: sets the max count of tweets to collect.
    • min_tweets: forces a minimum tweet count. If set and not satisfied, it will result in rejection.
0.10.3

8 years ago

0.10.2

8 years ago

0.10.1

8 years ago

0.10.0

8 years ago

0.9.0

8 years ago

0.8.4

8 years ago

0.8.3

8 years ago

0.8.2

8 years ago

0.8.0

8 years ago

0.7.1

8 years ago

0.7.0

8 years ago