Class: Mediaflux::VersionRequest
- Defined in:
- app/models/mediaflux/version_request.rb
Instance Attribute Summary
Attributes inherited from Request
Class Method Summary collapse
-
.service ⇒ String
Specifies the Mediaflux service to use when querying the version.
Instance Method Summary collapse
-
#initialize(session_token:) ⇒ VersionRequest
constructor
Constructor.
- #version ⇒ 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:) ⇒ VersionRequest
Constructor
6 7 8 |
# File 'app/models/mediaflux/version_request.rb', line 6 def initialize(session_token:) super(session_token: session_token) end |
Class Method Details
.service ⇒ String
Specifies the Mediaflux service to use when querying the version
12 13 14 |
# File 'app/models/mediaflux/version_request.rb', line 12 def self.service "server.version" end |
Instance Method Details
#version ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/models/mediaflux/version_request.rb', line 16 def version xml = response_xml { vendor: xml.xpath("/response/reply/result/vendor").text, version: xml.xpath("/response/reply/result/version").text } end |