Created
July 14, 2011 14:51
-
-
Save njh/1082601 to your computer and use it in GitHub Desktop.
Script to display the available pubsub nodes on the BBC push feeds server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| require 'rubygems' | |
| require 'xmpp4r' | |
| require 'xmpp4r/pubsub' | |
| require 'xmpp4r/pubsub/helper/nodebrowser.rb' | |
| require 'pp' | |
| HOST = 'push.bbc.co.uk' | |
| SERVICE = 'pubsub.push.bbc.co.uk' | |
| # connect XMPP client | |
| jid = Jabber::JID.new("sub@push.bbc.co.uk") | |
| client = Jabber::Client.new(jid) | |
| client.connect(HOST) | |
| puts "CONNECTING: anonymously" | |
| client.auth_anonymous_sasl | |
| browser = Jabber::PubSub::NodeBrowser.new(client) | |
| pp browser.nodes(SERVICE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment