Class: BOTR::VideoTag
Overview
The BOTR::VideoTag class contains calls for manipulating video tags.
Tags are essentially labels that can be used for the classification of videos.
Class Attribute Summary collapse
-
.last_status ⇒ Object
readonly
Returns the value of attribute last_status.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#videos ⇒ Object
readonly
Returns the value of attribute videos.
Class Method Summary collapse
- .all ⇒ Object
-
.list(**options) ⇒ Array
Return a list of video tags.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ VideoTag
constructor
A new instance of VideoTag.
Methods included from Authentication
Methods included from API
#api_call_class, #api_format, #api_key, #api_nonce, #api_protocol, #api_secret_key, #api_server, #api_timestamp, #api_url, #api_version, #progress_url, #upload_address, #upload_key, #upload_protocol, #upload_token, #upload_url
Methods included from HTTP
#client, #delete_request, #get_request, #post_request, #put_request
Constructor Details
#initialize(params = {}) ⇒ VideoTag
Returns a new instance of VideoTag.
63 64 65 66 67 68 69 |
# File 'lib/botr/videos/video_tag.rb', line 63 def initialize(params = {}) params.each do |key, val| param = "@#{key.to_s}" next unless methods.include? key.to_sym instance_variable_set(param, val) end end |
Class Attribute Details
.last_status ⇒ Object (readonly)
Returns the value of attribute last_status.
11 12 13 |
# File 'lib/botr/videos/video_tag.rb', line 11 def last_status @last_status end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
61 62 63 |
# File 'lib/botr/videos/video_tag.rb', line 61 def name @name end |
#videos ⇒ Object (readonly)
Returns the value of attribute videos.
61 62 63 |
# File 'lib/botr/videos/video_tag.rb', line 61 def videos @videos end |
Class Method Details
.all ⇒ Object
43 44 45 |
# File 'lib/botr/videos/video_tag.rb', line 43 def all list({}) end |
.list(**options) ⇒ Array
Return a list of video tags.
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/botr/videos/video_tag.rb', line 30 def list(**) json = get_request(.merge(:method => 'list')) res = JSON.parse(json.body) if json.status == 200 results = process_list_response(res) else raise "HTTP Error #{json.status}: #{json.body}" end return results end |