public
Description: Asynchronous PubSubHubbub Ruby Client
Homepage:
Clone URL: git://github.com/igrigorik/PubSubHubbub.git
name age message
file README.rdoc Mon Jun 29 06:02:45 -0700 2009 correct link to blog post [igrigorik]
file Rakefile Mon Oct 26 12:35:58 -0700 2009 jeweler rakefile [igrigorik]
file VERSION Mon Oct 26 12:33:39 -0700 2009 Version bump to 0.1.0 [igrigorik]
directory lib/ Sun Jul 26 11:49:38 -0700 2009 refactor subscribe/unsubscribe [igrigorik]
directory test/ Sun Jul 26 11:49:38 -0700 2009 refactor subscribe/unsubscribe [igrigorik]
README.rdoc

Ruby / Asynchronous PubSubHubbub Client

EventMachine based / asynchronous PubSubHubbub client. Supports posting single or multiple URLs.

Full Spec: code.google.com/p/pubsubhubbub

HTTP PubSub: Webhooks & PubSubHubbub: www.igvita.com/2009/06/29/http-pubsub-webhooks-pubsubhubbub

Simple client example

  EventMachine.run {
    pub = EventMachine::PubSubHubbub.new('http://pubsubhubbub.appspot.com/publish').publish "http://www.test.com/"

    pub.callback { puts "Successfully notified hub." }
    pub.errback  { puts "Uh oh, something broke: #{pub.response}" }
  }

Posting multiple URL’s

  EventMachine.run {
    feeds = ["http://www.test.com", "http://www.test.com/2"]
    pub = EventMachine::PubSubHubbub.new('http://pubsubhubbub.appspot.com/publish').publish feeds

    pub.callback { puts "Successfully notified hub." }
    pub.errback  { puts "Uh oh, something broke: #{pub.response}" }
  }