-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
50 lines (40 loc) · 1.32 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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