Class: Mediaflux::ScriptUploadRequest
- Defined in:
- app/models/mediaflux/script_upload_request.rb
Instance Attribute Summary
Attributes inherited from Request
Class Method Summary collapse
-
.service ⇒ String
Specifies the Mediaflux service to use.
Instance Method Summary collapse
-
#initialize(session_token:, namespace:, name:, url:, session_user: nil) ⇒ ScriptUploadRequest
constructor
Constructor.
-
#result ⇒ Object
Returns the id of the asset created.
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:, namespace:, name:, url:, session_user: nil) ⇒ ScriptUploadRequest
Constructor
9 10 11 12 13 14 |
# File 'app/models/mediaflux/script_upload_request.rb', line 9 def initialize(session_token:, namespace:, name:, url:, session_user: nil) super(session_token: session_token, session_user: session_user) @namespace = namespace @name = name @url = url end |
Class Method Details
.service ⇒ String
Specifies the Mediaflux service to use
18 19 20 |
# File 'app/models/mediaflux/script_upload_request.rb', line 18 def self.service "asset.create" end |
Instance Method Details
#result ⇒ Object
Returns the id of the asset created
23 24 25 |
# File 'app/models/mediaflux/script_upload_request.rb', line 23 def result response_xml.xpath("/response/reply/result/id").text.to_i end |