Skip to content
A Superfeedr API library written on top of Blather
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
example
lib
spec
.document
.gitignore
LICENSE
README.md
Rakefile
VERSION
superfeedr-rb.gemspec

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.

Something went wrong with that request. Please try again.