Class: Twitch::Video
- Inherits:
-
Object
- Object
- Twitch::Video
- Defined in:
- lib/twitch/video.rb
Overview
A captured broadcast or portion of a broadcast.
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Date the video was created.
-
#description ⇒ Object
readonly
Description of the video.
-
#duration ⇒ Object
readonly
Duration of the video, in the format ‘0h0m0s`.
-
#id ⇒ Object
readonly
ID of the video.
-
#language ⇒ Object
readonly
Language of the video.
-
#published_at ⇒ Object
readonly
Date the video was published.
-
#thumbnail_url ⇒ Object
readonly
URL to the thumbnail image of the video.
-
#title ⇒ Object
readonly
Title of the video.
-
#type ⇒ Object
readonly
Type of the video (archive, highlight or upload).
-
#url ⇒ Object
readonly
URL of the video.
-
#user_id ⇒ Object
readonly
ID of the user who uploaded/broadcasted the video.
-
#user_name ⇒ Object
readonly
Display name of the user who uploaded/broadcasted the video.
-
#view_count ⇒ Object
readonly
Number of views.
-
#viewable ⇒ Object
readonly
Viewability of the video (public or private).
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Video
constructor
A new instance of Video.
Constructor Details
#initialize(attributes = {}) ⇒ Video
Returns a new instance of Video.
37 38 39 40 41 |
# File 'lib/twitch/video.rb', line 37 def initialize(attributes = {}) attributes.each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Date the video was created.
19 20 21 |
# File 'lib/twitch/video.rb', line 19 def created_at @created_at end |
#description ⇒ Object (readonly)
Description of the video.
13 14 15 |
# File 'lib/twitch/video.rb', line 13 def description @description end |
#duration ⇒ Object (readonly)
Duration of the video, in the format ‘0h0m0s`
35 36 37 |
# File 'lib/twitch/video.rb', line 35 def duration @duration end |
#id ⇒ Object (readonly)
ID of the video.
9 10 11 |
# File 'lib/twitch/video.rb', line 9 def id @id end |
#language ⇒ Object (readonly)
Language of the video.
15 16 17 |
# File 'lib/twitch/video.rb', line 15 def language @language end |
#published_at ⇒ Object (readonly)
Date the video was published.
21 22 23 |
# File 'lib/twitch/video.rb', line 21 def published_at @published_at end |
#thumbnail_url ⇒ Object (readonly)
URL to the thumbnail image of the video.
23 24 25 |
# File 'lib/twitch/video.rb', line 23 def thumbnail_url @thumbnail_url end |
#title ⇒ Object (readonly)
Title of the video.
11 12 13 |
# File 'lib/twitch/video.rb', line 11 def title @title end |
#type ⇒ Object (readonly)
Type of the video (archive, highlight or upload).
25 26 27 |
# File 'lib/twitch/video.rb', line 25 def type @type end |
#url ⇒ Object (readonly)
URL of the video.
27 28 29 |
# File 'lib/twitch/video.rb', line 27 def url @url end |
#user_id ⇒ Object (readonly)
ID of the user who uploaded/broadcasted the video.
29 30 31 |
# File 'lib/twitch/video.rb', line 29 def user_id @user_id end |
#user_name ⇒ Object (readonly)
Display name of the user who uploaded/broadcasted the video.
31 32 33 |
# File 'lib/twitch/video.rb', line 31 def user_name @user_name end |
#view_count ⇒ Object (readonly)
Number of views
17 18 19 |
# File 'lib/twitch/video.rb', line 17 def view_count @view_count end |
#viewable ⇒ Object (readonly)
Viewability of the video (public or private)
33 34 35 |
# File 'lib/twitch/video.rb', line 33 def viewable @viewable end |