Class: GoogleAjax::Feed
- Inherits:
-
Object
- Object
- GoogleAjax::Feed
- Defined in:
- lib/google_ajax/feed.rb
Defined Under Namespace
Constant Summary collapse
- FEED_VERSION =
1.0
Class Method Summary collapse
-
.find(query, args = {}) ⇒ Object
will return a list of feeds that match the given query.
- .get(method, query, args = {}) ⇒ Object
-
.load(query, args = {}) ⇒ Object
downloads this feed from Google’s servers Optional: args { :num => number of entries to download(default is 4, maximum is 100) }.
-
.lookup(query, args = {}) ⇒ Object
will return the associated feed if it exists for a given url.
Class Method Details
.find(query, args = {}) ⇒ Object
will return a list of feeds that match the given query
10 11 12 |
# File 'lib/google_ajax/feed.rb', line 10 def self.find(query, args = {}) self.get(:find, query) end |
.get(method, query, args = {}) ⇒ Object
4 5 6 7 |
# File 'lib/google_ajax/feed.rb', line 4 def self.get(method, query, args = {}) args = { :v => FEED_VERSION }.merge!(args) GoogleAjax::get(:feed, method, query, args) end |
.load(query, args = {}) ⇒ Object
downloads this feed from Google’s servers Optional: args { :num => number of entries to download(default is 4, maximum is 100) }
16 17 18 |
# File 'lib/google_ajax/feed.rb', line 16 def self.load(query, args = {}) self.get(:load, query, args) end |
.lookup(query, args = {}) ⇒ Object
will return the associated feed if it exists for a given url
21 22 23 |
# File 'lib/google_ajax/feed.rb', line 21 def self.lookup(query, args = {}) self.get(:lookup, query) end |