Module: AwarenessApi
- Defined in:
- lib/awareness_api.rb,
lib/awareness_api/feed.rb,
lib/awareness_api/item.rb,
lib/awareness_api/entry.rb,
lib/awareness_api/referer.rb,
lib/awareness_api/response.rb
Overview
The Response object is the ruby object version of the webservice response.
Defined Under Namespace
Modules: FeedAttributes Classes: Entry, Feed, Item, Referer, Response
Constant Summary collapse
- ROOT_API_URL =
'http://api.feedburner.com/awareness/1.0/'
Class Method Summary collapse
-
.get_feed_data(options) ⇒ Object
Current Basic Feed Awareness Data.
-
.get_item_data(options) ⇒ Object
Current Item Awareness Data.
-
.get_resyndication_data(options) ⇒ Object
Current Item Resyndication Feed Awareness Data.
Class Method Details
.get_feed_data(options) ⇒ Object
Current Basic Feed Awareness Data
Arguments
uri The URI of the feed (same as http://feeds.feedburner.com/<feeduri>) Must be used if id is not specified
id The FeedBurner id of the feed (visible when editing a feed in your account, e.g., http://www.feedburner.com/fb/a/optimize?id=<id>). May be used instead if uri is not specified.
dates Dates are used to specify the period for which data is need (see note on dates)
31 32 33 34 35 36 37 |
# File 'lib/awareness_api.rb', line 31 def self.get_feed_data() raise "options must include a feed id or uri" unless [:id] or [:uri] option_string = () response_xml = open("#{ROOT_API_URL}GetFeedData?#{option_string}").read return parse_xml(response_xml) end |
.get_item_data(options) ⇒ Object
Current Item Awareness Data
Arguments
uri The URI of the feed (same as http://feeds.feedburner.com/<feeduri>)
itemurl The source URL of item (not the FeedBurner generated URL, but the original source URL). Multiple itemurl parameters may be provided in a single request in order to retrieve additional items.
dates Dates are used to specify the period for which data is need (see note on dates)
47 48 49 50 51 52 53 |
# File 'lib/awareness_api.rb', line 47 def self.get_item_data() raise "options must include a feed uri" unless [:uri] option_string = () response_xml = open("#{ROOT_API_URL}GetItemData?#{option_string}").read return parse_xml(response_xml) end |
.get_resyndication_data(options) ⇒ Object
Current Item Resyndication Feed Awareness Data
Arguments
uri The URI of the feed (same as http://feeds.feedburner.com/<feeduri>)
itemurl The source URL of item (not the FeedBurner generated URL, but the original source URL). Multiple itemurl parameters may be provided in a single request in order to retrieve additional items.
dates Dates are used to specify the period for which data is need (see note on dates)
63 64 65 66 67 68 69 |
# File 'lib/awareness_api.rb', line 63 def self.() raise "options must include a feed uri" unless [:uri] option_string = () response_xml = open("#{ROOT_API_URL}GetResyndicationData?#{option_string}").read return parse_xml(response_xml) end |