Skip to content

superfeedr/superfeedr-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

superfeedr-ruby

Yes, the gem is called superfeedr-ruby, but the library is superfeedr only ;)

Superfeedr.com is a Real-time Cloud Feed Parsing service

  • Realtime : By combining different technologies we can notify you of new entries in less than 15 minutes (or it’s free)

  • No more polling : Stop wasting your time and resources fetching ‘old data’, and stop being late when there is new data.

  • Simplicity : give us urls, and we’ll do the rest. Check our docs and tutorials.

  • Standardization : No more nightmares with gazillions of formats, we will send you strict ATOM, whatever the original feed format is.

  • Multi-channel : receive the notifications by XMPP, on a local JID or your own external JID, or using WebHooks.

  • Cost saving : we will match the cost of your existing system.

FEATURES:

  • Subscribe to a feed

    Superfeedr.subscribe("http://github.com/superfeedr.atom") do |result|
        puts "Yay, subscribed to the github Atom feed for Superfeedr" if result
    end
    
  • Unsubscribe from a feed

    Superfeedr.unsubscribe("http://github.com/superfeedr.atom") do |result|
        puts "Sad, you unsubscribed from the github Atom feed for Superfeedr" if result
    end
    
  • List subscriptions by page

    Superfeedr.subscriptions(5) do |page, feeds|
        puts "On page #{page}" : 
        puts feeds.inspect
      end
  • Receive notifications

    Superfeedr.on_notification do |notification|
        puts "The feed #{notification.feed_url} has been fetched (#{notification.http_status}: #{notification.message_status}) and will be fetched again in #{(notification.next_fetch - Time.now)/60} minutes."
        notification.entries.each do |e|
            puts " - #{e.title} (#{e.link}) was published (#{e.published}) with #{e.unique_id} as unique id : \n #{e.summary} (#{e.chunk}/#{e.chunks})"
        end
    end
    

Install

Install the gem from Gemcutter :

sudo gem install superfeedr-ruby

Source :

git clone git@github.com:superfeedr/superfeedr-ruby.git

Example

Create a directory called superfeedr-example. In the superfeedr-example directory create a file called example.rb and copy the code from the gist below into that file. Replace “[email protected]” with “[email protected]” and replace the “*******” with your Superfeedr password. Next, create a directory called log in the superfeedr-example directory. Finally, run it with:

ruby example.rb

Example code: Gist

REQUIREMENTS:

Skates : please note that there are 2 gems named Baylon. The one you want is the one about XMPP, you can get it with :

sudo gem install skates

Copyright © 2009 julien. See LICENSE for details.

About

Ruby Client for Superfeedr.com, based on Babylon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages