Class: Mediaflux::StoreListRequest
- Defined in:
- app/models/mediaflux/store_list_request.rb
Instance Attribute Summary
Attributes inherited from Request
Class Method Summary collapse
-
.service ⇒ String
Specifies the Mediaflux service to use when creating assets.
Instance Method Summary collapse
-
#initialize(session_token:) ⇒ StoreListRequest
constructor
Constructor.
- #stores ⇒ Object
Methods inherited from Request
build_post_request, default_xml_namespace, default_xml_namespace_uri, #error?, find_or_create_http_client, format_date_for_mediaflux, request_path, #resolve, #resolved?, #response_body, #response_error, #response_xml, uri, #xml_payload, #xtoshell_xml
Constructor Details
#initialize(session_token:) ⇒ StoreListRequest
Constructor
10 11 12 |
# File 'app/models/mediaflux/store_list_request.rb', line 10 def initialize(session_token:) super(session_token: session_token) end |
Class Method Details
.service ⇒ String
Specifies the Mediaflux service to use when creating assets
16 17 18 |
# File 'app/models/mediaflux/store_list_request.rb', line 16 def self.service "asset.store.list" end |
Instance Method Details
#stores ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/models/mediaflux/store_list_request.rb', line 20 def stores @stores ||= begin xml = response_xml xml.xpath("/response/reply/result/store").map do |node| { id: node.xpath("@id").text, type: node.xpath("./type").text, name: node.xpath("./name").text, tag: node.xpath("./tag").text } end end end |