Skip to content

collin/google_ajax_feed_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages