tweet-collector

2.1.1 • Public • Published

Tweet Collector

Simple periodic tweet collector.

npm install --save tweet-collector
var TweetCollector = require('tweet-collector');
var tweetCollector = new TweetCollector(twitterCredentials, {
  batch_size: 100,
  interval: 10, // seconds
  search_params: {
    q: 'comma,separated,keywords'
  }
});
tweetCollector.start();
tweetCollector.on('fetch', function(tweetsArray) {
  console.log(tweetsArray);
});

API

TweetCollector(twitterCredentials, settings)

Instantiate a TweetCollector.

Example:

var tweetCollector = new TweetCollector(twitterCredentials, settings);

search_params

See Twitter API Docs.

tweetCollector.start(searchParams)

Start tweet collector.

tweetCollector.stop()

Stop tweet collector.

tweetCollector.on('fetch', onTweetFetch)

tweetCollector.on('fetch', function onTweetFetch(tweetsArray) {
  console.log(tweetsArray);
});

/tweet-collector/

    Package Sidebar

    Install

    npm i tweet-collector

    Weekly Downloads

    16

    Version

    2.1.1

    License

    BSD

    Last publish

    Collaborators

    • viniciusbo