Class: YourMembership::Members
- Defined in:
- lib/your_membership/members.rb
Overview
YourMembership Members Namespace
Class Method Summary collapse
-
.connections_categories_get(session, member_id) ⇒ Array
Returns a member’s connection category list.
-
.connections_get(session, member_id, options = {}) ⇒ Array
Returns a member’s connection list, optionally filtered by category.
-
.mediaGallery_albums_get(session, member_id) ⇒ Array
Returns a member’s media gallery album list.
-
.mediaGallery_get(session, member_id, options = {}) ⇒ Array
Returns a member’s media gallery item list, optionally filtered by album.
-
.mediaGallery_item_get(session, member_id, item_id) ⇒ Hash
Returns a single media gallery item.
-
.wall_get(session, member_id, options = {}) ⇒ Hash
Returns a member’s wall.
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
.connections_categories_get(session, member_id) ⇒ Array
If you attempt to retrieve a member’s connection category list and they have not assigned any connections to categories an execption of type 406 from YourMembership.com ‘Method could not uniquely identify a record on which to operate’ will be raised.
Returns a member’s connection category list.
14 15 16 17 18 19 20 21 |
# File 'lib/your_membership/members.rb', line 14 def self.connections_categories_get(session, member_id) = {} [:ID] = member_id response = post('/', :body => build_XML_request('Members.Connections.Categories.Get', session, )) response_valid? response response_to_array_of_hashes response['YourMembership_Response']['Members.Connections.Categories.Get'], ['Category'] end |
.connections_get(session, member_id, options = {}) ⇒ Array
Returns a member’s connection list, optionally filtered by category. Returns a maximum of 100 records per request.
34 35 36 37 38 39 40 41 |
# File 'lib/your_membership/members.rb', line 34 def self.connections_get(session, member_id, = {}) = {} [:ID] = member_id response = post('/', :body => build_XML_request('Members.Connections.Get', session, )) response_valid? response response_to_array_of_hashes response['YourMembership_Response']['Members.Connections.Get'], ['Connection'] end |
.mediaGallery_albums_get(session, member_id) ⇒ Array
Contact YourMembership.com dev team to see if we’re doing this correctly.
BUG NOTED - This method seems to raise an exception on every call saying that Method Call Failed one or more elements is missing or invalid
Returns a member’s media gallery album list. The returned list will include <AlbumID>-1</AlbumID> which is a virtual album containing all of the member’s media gallery items.
54 55 56 57 58 59 60 61 62 |
# File 'lib/your_membership/members.rb', line 54 def self.mediaGallery_albums_get(session, member_id) # rubocop:disable Style/MethodName = {} [:ID] = member_id # puts build_XML_request('Members.MediaGallery.Albums.Get', session, options) response = post('/', :body => build_XML_request('Members.MediaGallery.Albums.Get', session, )) response_valid? response response_to_array_of_hashes response['YourMembership_Response']['Members.MediaGallery.Albums.Get'], ['Album'] end |
.mediaGallery_get(session, member_id, options = {}) ⇒ Array
If you attempt to retrieve a member’s gallery item list and they have no media an exception will be thrown of type 406 from YourMembership.com ‘Method could not uniquely identify a record on which to operate’
Returns a member’s media gallery item list, optionally filtered by album. Returns a maximum of 100 records per request.
78 79 80 81 82 83 84 85 |
# File 'lib/your_membership/members.rb', line 78 def self.mediaGallery_get(session, member_id, = {}) # rubocop:disable Style/MethodName = {} [:ID] = member_id response = post('/', :body => build_XML_request('Members.MediaGallery.Get', session, )) response_valid? response response_to_array_of_hashes response['YourMembership_Response']['Members.MediaGallery.Get'], ['Item'] end |
.mediaGallery_item_get(session, member_id, item_id) ⇒ Hash
Returns a single media gallery item.
95 96 97 98 99 100 101 102 103 |
# File 'lib/your_membership/members.rb', line 95 def self.mediaGallery_item_get(session, member_id, item_id) # rubocop:disable Style/MethodName = {} [:ID] = member_id [:ItemID] = item_id response = post('/', :body => build_XML_request('Members.MediaGallery.Item.Get', session, )) response_valid? response response['YourMembership_Response']['Members.MediaGallery.Item.Get'] end |
.wall_get(session, member_id, options = {}) ⇒ Hash
Returns a member’s wall.
115 116 117 118 119 120 121 122 |
# File 'lib/your_membership/members.rb', line 115 def self.wall_get(session, member_id, = {}) = {} [:ID] = member_id response = post('/', :body => build_XML_request('Members.Wall.Get', session, )) response_valid? response response['YourMembership_Response']['Members.Wall.Get'] end |