Class: YourMembership::Feeds
Overview
YourMembership Feeds Namespace
Class Method Summary collapse
-
.feed_get(session, feed_id, options = {}) ⇒ Nokogiri::XML
Returns a RSS 2.0 community feed.
-
.get(session) ⇒ Array
Returns a list of RSS 2.0 community feeds.
Methods inherited from Base
build_XML_request, new_call_id, response_to_array, response_to_array_of_hashes, response_valid?, response_ym_error?
Class Method Details
.feed_get(session, feed_id, options = {}) ⇒ Nokogiri::XML
Returns a RSS 2.0 community feed
27 28 29 30 31 32 33 34 35 |
# File 'lib/your_membership/feeds.rb', line 27 def self.feed_get(session, feed_id, = {}) [:FeedID] = feed_id response = post('/', :body => build_XML_request('Feeds.Feed.Get', session, )) response_valid? response xml_body = Nokogiri::XML response.body xml_body.at_xpath '//rss' end |
.get(session) ⇒ Array
Returns a list of RSS 2.0 community feeds.
10 11 12 13 14 15 |
# File 'lib/your_membership/feeds.rb', line 10 def self.get(session) response = post('/', :body => build_XML_request('Feeds.Get', session)) response_valid? response response_to_array_of_hashes response['YourMembership_Response']['Feeds.Get'], ['Feed'] end |