github github
  • Home
  • Pricing and Signup
  • Training
  • Gist
  • Blog
  • Login

igrigorik / PubSubHubbub

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 101
    • 5
  • Source
  • Commits
  • Network (5)
  • Issues (1)
  • Downloads (0)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Switch Branches (1)
    • master ✓
  • Switch Tags (0)
  • Branch List
Sending Request…

Asynchronous PubSubHubbub Ruby Client — Read more

  Cancel

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

convert to spec layout, to allow autospec 
igrigorik (author)
Sat Jun 19 11:38:45 -0700 2010
commit  35fc0ed06800639568f7
tree    5247baa57c51f4043b91
parent  40bc9baa99caad4ce8f1
PubSubHubbub /
name age
history
message
file README.rdoc Mon Jun 29 06:02:45 -0700 2009 correct link to blog post [igrigorik]
file Rakefile Sat Jun 19 11:38:45 -0700 2010 convert to spec layout, to allow autospec [igrigorik]
file VERSION Sat May 01 16:45:36 -0700 2010 Version bump to 0.1.1 [igrigorik]
directory lib/ Sat Jun 19 11:34:22 -0700 2010 merging basic-auth support for PSHB client [igrigorik]
directory spec/ Sat Jun 19 11:38:45 -0700 2010 convert to spec layout, to allow autospec [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}" }
  }
Dedicated Server Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
  • Blog
  • Support
  • Training
  • Job Board
  • Shop
  • Contact
  • API
  • Status
  • © 2010 GitHub Inc. All rights reserved.
  • Terms of Service
  • Privacy
  • Security
  • English
  • Deutsch
  • Français
  • 日本語
  • Português (BR)
  • 中文
  • See all available languages

Your current locale selection: English. Choose another?

  • English
  • Afrikaans
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Српски
  • Svenska
  • 中文