Class: Mediaflux::RangeQueryRequest
- Defined in:
- app/models/mediaflux/range_query_request.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#aql_query ⇒ Object
readonly
Returns the value of attribute aql_query.
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
-
#idx ⇒ Object
readonly
Returns the value of attribute idx.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Attributes inherited from Request
Class Method Summary collapse
-
.service ⇒ String
Specifies the Mediaflux service to use when running a query.
Instance Method Summary collapse
-
#initialize(session_token:, collection: nil, xpath: nil) ⇒ RangeQueryRequest
constructor
Constructor.
-
#maximum ⇒ Object
maximum value for xpath.
-
#minimum ⇒ Object
minimum value for xpath.
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:, collection: nil, xpath: nil) ⇒ RangeQueryRequest
Constructor
10 11 12 13 14 |
# File 'app/models/mediaflux/range_query_request.rb', line 10 def initialize(session_token:, collection: nil, xpath: nil) super(session_token: session_token) @collection = collection @xpath = xpath end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
4 5 6 |
# File 'app/models/mediaflux/range_query_request.rb', line 4 def action @action end |
#aql_query ⇒ Object (readonly)
Returns the value of attribute aql_query.
4 5 6 |
# File 'app/models/mediaflux/range_query_request.rb', line 4 def aql_query @aql_query end |
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
4 5 6 |
# File 'app/models/mediaflux/range_query_request.rb', line 4 def collection @collection end |
#idx ⇒ Object (readonly)
Returns the value of attribute idx.
4 5 6 |
# File 'app/models/mediaflux/range_query_request.rb', line 4 def idx @idx end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
4 5 6 |
# File 'app/models/mediaflux/range_query_request.rb', line 4 def namespace @namespace end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
4 5 6 |
# File 'app/models/mediaflux/range_query_request.rb', line 4 def size @size end |
Class Method Details
.service ⇒ String
Specifies the Mediaflux service to use when running a query
18 19 20 |
# File 'app/models/mediaflux/range_query_request.rb', line 18 def self.service "asset.query" end |
Instance Method Details
#maximum ⇒ Object
maximum value for xpath
29 30 31 32 |
# File 'app/models/mediaflux/range_query_request.rb', line 29 def maximum max_str = response_xml.xpath("/response/reply/result/value/max").text max_str.to_i end |
#minimum ⇒ Object
minimum value for xpath
23 24 25 26 |
# File 'app/models/mediaflux/range_query_request.rb', line 23 def minimum min_str = response_xml.xpath("/response/reply/result/value/min").text min_str.to_i end |