Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Twitter stream client.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 gazouillis.gemspec
README.md

gazouillis

Code
Climate Gem
Version

Gazouillis aims to be a fast and reliable twitter stream client.

Status

Very early stage. Not ready for production.

Usage

Connection to twitter's userstream:

require 'gazouillis'

class Timeline < Gazouillis::UserStream
  def on_message(message)
    # Do something with streamed message
    #
    # Parse message, and outputs.
    #
    p MultiJson.decode message
  end
end

options = {
  oauth: {
    consumer_key:    "consumer_key",
    consumer_secret: "consumer_secret",
    token:           "token",
    token_secret:    "token_secret"
  }
}

Timeline.new(options).open

Or be barbone, and use the internal class.

require 'gazouillis'

class Tweets < Gazouillis::Stream
  def on_message(message)
    # Do something with streamed message
    #
    # Parse message, and outputs.
    #
    p MultiJson.decode message
  end
end

options = {
  oauth: {
    consumer_key:    "consumer_key",
    consumer_secret: "consumer_secret",
    token:           "token",
    token_secret:    "token_secret"
  }
}

Tweets.new('/1/statuses/sample.json', options).async.open

Gazouillis relies on Celluloid::IO. Hence the async capability.

Roadmap

0.2.0

  • UserStream, FilterStream and SampleStream

0.3.0

  • Reconnector object.

Example

Copyright

MIT. See LICENSE for further details.

Something went wrong with that request. Please try again.