Class: QcloudVod::Client
- Inherits:
-
Object
- Object
- QcloudVod::Client
- Defined in:
- lib/qcloud_vod/client.rb
Instance Attribute Summary collapse
-
#access_id ⇒ Object
Returns the value of attribute access_id.
-
#access_key ⇒ Object
Returns the value of attribute access_key.
-
#http ⇒ Object
Returns the value of attribute http.
-
#region ⇒ Object
Returns the value of attribute region.
Instance Method Summary collapse
- #apply_upload(media_type, params = {}) ⇒ Object
- #commit_upload(vod_session_key, params = {}) ⇒ Object
- #describe_class ⇒ Object
-
#initialize(region: nil, access_id: nil, access_key: nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(region: nil, access_id: nil, access_key: nil) ⇒ Client
Returns a new instance of Client.
5 6 7 8 9 10 |
# File 'lib/qcloud_vod/client.rb', line 5 def initialize(region: nil, access_id: nil, access_key: nil) @region = region @access_id = access_id @access_key = access_key @http = QcloudVod::Http.new(region: region, access_id: access_id, access_key: access_key) end |
Instance Attribute Details
#access_id ⇒ Object
Returns the value of attribute access_id.
3 4 5 |
# File 'lib/qcloud_vod/client.rb', line 3 def access_id @access_id end |
#access_key ⇒ Object
Returns the value of attribute access_key.
3 4 5 |
# File 'lib/qcloud_vod/client.rb', line 3 def access_key @access_key end |
#http ⇒ Object
Returns the value of attribute http.
3 4 5 |
# File 'lib/qcloud_vod/client.rb', line 3 def http @http end |
#region ⇒ Object
Returns the value of attribute region.
3 4 5 |
# File 'lib/qcloud_vod/client.rb', line 3 def region @region end |
Instance Method Details
#apply_upload(media_type, params = {}) ⇒ Object
17 18 19 20 21 |
# File 'lib/qcloud_vod/client.rb', line 17 def apply_upload(media_type, params = {}) params["MediaType"] = media_type res = http.get("ApplyUpload", "2018-07-17", params) res["Response"] end |
#commit_upload(vod_session_key, params = {}) ⇒ Object
23 24 25 26 27 |
# File 'lib/qcloud_vod/client.rb', line 23 def commit_upload(vod_session_key, params = {}) params["VodSessionKey"] = vod_session_key res = http.get("CommitUpload", "2018-07-17", params) res["Response"] end |
#describe_class ⇒ Object
12 13 14 15 |
# File 'lib/qcloud_vod/client.rb', line 12 def describe_class res = http.get("DescribeAllClass", "2018-07-17") res["Response"]["ClassInfoSet"] end |