collin / google_ajax_feed_api

Light Ruby Wrapper for Google Ajax Feed API. (still in use as of 2011, not much to change)

Home Page:http://code.google.com/apis/ajaxfeeds/documentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I wanted to do feeds through googles Ajax Feed API.

http://code.google.com/apis/ajaxfeeds/documentation/reference.html

I did.

Use if you see fit.

Run the specs if you have autotest.

Use it?

>> require 'lib/feed'
=> true
>> feed = Google::Ajax::Feed.lookup "olympichifi.com"
=> #<Google::Ajax::Feed:0xb77b660c @url="http://olympichifi.com/feed/">
>> feed.title
=> "Olympic Hi-Fi"
>> feed.link
=> "http://olympichifi.com"
>> feed.canonical_id
=> "http://olympichifi.com/feed/"
>> post = feed.entries.first
=> <#Google::Ajax::Feed::Entry link=http://olympichifi.com/2008/10/12/leetle-groove/ title=leetle groove>
>> post.content
=> "<p>\nmy first song evarr! it\342\200\231s cheesy, but still, its my first.</p>"

>> feed = Google::Ajax::Feed.lookup "ajaxian.com"
=> #<Google::Ajax::Feed:0xb75b3a08 @url="http://ajaxian.com/index.xml">
>> feed.load :limit => 100
=> 6
>> feed.entries.size
=> 20

>> feed = Google::Ajax::Feed.lookup "ajaxian.com"
=> #<Google::Ajax::Feed:0xb79d82c8 @url="http://ajaxian.com/index.xml">
>> feed.load :limit => 100, :history => true
=> 6
>> feed.entries.size
=> 100

>> Google::Ajax::Feed.config.limit = 50
=> 50
>> Google::Ajax::Feed.config.history = true
=> true
>> feed = Google::Ajax::Feed.lookup "ajaxian.com"
=> #<Google::Ajax::Feed:0xb756ecc8 @url="http://ajaxian.com/index.xml">
>> feed.entries.size
=> 50

About

Light Ruby Wrapper for Google Ajax Feed API. (still in use as of 2011, not much to change)

http://code.google.com/apis/ajaxfeeds/documentation/


Languages

Language:Ruby 100.0%