TopNotify

TopNotify use to process notification stream from TOP. (http://open.taobao.com/doc/detail.htm?spm=0.0.0.198.PfQSxk&id=1065#s7)

Installation

Add this line to your application's Gemfile:

gem 'top_notify'

And then execute:

$ bundle

Or install it yourself as:

$ gem install top_notify

Usage

configure your app_key and app_secret

  TopNotify.setup do |config|
    config.app_key = your_app_key
    config.app_secret = your_app_secret
  end

write your consumer

  class MyConsumer < TopNotify::Consumer
    def receive_msg(data)
      # ... your code
    end
  end

start server

  TopNotify::Server.new(MyConsumer.new).start

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request