Nagging Penguin Matriarchs

    tweetable

    0.0.2 • Public • Published

    Tweetable

    Readable streams of tweets from Twitter's public stream API's.

    Tweets + Readable = Tweetable.

    Very alpha at the moment.

    Usage

    Arguments

    • api: API credentials from Twitter. Object with key and secret properties.
    • access: Access credentials from Twitter (unique to the user the request is being made for). Object with token and secret properties.
    • method: Twitter public streams method. Currently must be user, filter, sample or firehose (if you have access, which you probably don't).
    • params: Params for filter streams or user streams. Do not use with sample or firehose streams.

    Returns a readable stream that emits an object for each Tweet (not strings or buffers, like most Node streams).

    var tweetable = require('tweetable')
     
    var api = {
      key: 'twitter app API key',
      secret: 'twitter app API secret'
    }
    var access = {
      token: 'twitter user access token',
      secret: 'twitter user access secret'
    }
     
    tweetable(api, access, 'filter', {track: 'california'}).on('data', function (tweet) {
      var localCreatedAt = new Date(Date.parse(tweet.created_at))
      console.log('%s: %s', localCreatedAt, tweet.text)
    }).on('error', function (err) {
      console.error(err, err.stack)
      process.exit(1)
    })

    Keywords

    none

    Install

    npm i tweetable

    DownloadsWeekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • evansolomon