public
Description: A Superfeedr API library written on top of Blather
Homepage:
Clone URL: git://github.com/sprsquish/superfeedr-rb.git
name age message
file .document Thu Nov 05 09:42:32 -0800 2009 initial commit [sprsquish]
file .gitignore Thu Nov 05 09:42:32 -0800 2009 initial commit [sprsquish]
file LICENSE Thu Nov 05 09:42:32 -0800 2009 initial commit [sprsquish]
file README.md Thu Nov 05 09:45:40 -0800 2009 ugh [sprsquish]
file Rakefile Thu Nov 05 09:42:32 -0800 2009 initial commit [sprsquish]
file VERSION Thu Nov 05 09:49:46 -0800 2009 Version bump to 0.1.0 [sprsquish]
directory example/ Thu Nov 05 09:42:32 -0800 2009 initial commit [sprsquish]
directory lib/ Thu Nov 05 09:42:32 -0800 2009 initial commit [sprsquish]
directory spec/ Thu Nov 05 09:42:32 -0800 2009 initial commit [sprsquish]
README.md

Superfeedr rb

A ruby library based on Blather for Superfeedr.

This library is very opinionated. In fact there's really only one method feed.

Install

Gem is hosted on Gemcutter

sudo gem install superfeedr-rb

Example

require 'rubygems'
require 'superfeedr-rb'
require 'pp'

Superfeedr::Client.connect('demo@superfeedr.com', '*********').do |client|
  client.feed('http://superfeedr.com/dummy.xml') do |status, entries|
    pp({
      :status => {
        :feed => status.feed,
        :code => status.code,
        :http => status.http,
        :next_fetch => status.next_fetch
      },
      :entries => entries.map { |entry| {
        :id => entry.id,
        :chunks => entry.chunks,
        :chunk => entry.chunk,
        :title => entry.title,
        :published => entry.published,
        :content => entry.content,
        :summary => entry.summary,
        :categories => entry.categories,
        :links => entry.links.map { |link| {
          :href => link.href,
          :rel => link.rel,
          :type => link.type,
          :title => link.title
        }},
        :authors => entry.authors.map { |author| {
          :name => author.name,
          :email => author.email,
          :uri => author.uri
        }}
      }}
    })
  end

  client.feed('http://github.com/superfeedr.atom') do |notification|
    pp notification
  end
end

Copyright

Copyright (c) 2009 Jeff Smick. See LICENSE for details.