Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

TopNotify use to process notification stream from TOP.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 top_notify.gemspec
README.md

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
Something went wrong with that request. Please try again.