Class: Twitch::Clip
- Inherits:
-
Object
- Object
- Twitch::Clip
- Defined in:
- lib/twitch/clip.rb
Overview
A small segment of a broadcast captured by another user.
Instance Attribute Summary collapse
-
#broadcaster_id ⇒ Object
readonly
(User) ID of the clip’s source broadcaster.
-
#broadcaster_name ⇒ Object
readonly
(User) name of the clip’s source broadcaster.
-
#created_at ⇒ Object
readonly
Date the clip was created.
-
#creator_id ⇒ Object
readonly
(User) ID of the clip’s creator.
-
#creator_name ⇒ Object
readonly
(User) name of the clip’s creator.
-
#embed_url ⇒ Object
readonly
URL for embedding the clip.
-
#game_id ⇒ Object
readonly
ID of the game being played.
-
#id ⇒ Object
readonly
ID of the clip.
-
#language ⇒ Object
readonly
Language of the originating broadcast.
-
#thumbnail_url ⇒ Object
readonly
URL of the thumbnail image.
-
#title ⇒ Object
readonly
Title of the clip.
-
#url ⇒ Object
readonly
URL of the clip.
-
#video_id ⇒ Object
readonly
ID of the archived broadcast (may not be available).
-
#view_count ⇒ Object
readonly
Number of views.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Clip
constructor
A new instance of Clip.
Constructor Details
#initialize(attributes = {}) ⇒ Clip
Returns a new instance of Clip.
35 36 37 38 39 |
# File 'lib/twitch/clip.rb', line 35 def initialize(attributes = {}) attributes.each do |key, value| instance_variable_set "@#{key}", value end end |
Instance Attribute Details
#broadcaster_id ⇒ Object (readonly)
(User) ID of the clip’s source broadcaster.
23 24 25 |
# File 'lib/twitch/clip.rb', line 23 def broadcaster_id @broadcaster_id end |
#broadcaster_name ⇒ Object (readonly)
(User) name of the clip’s source broadcaster
25 26 27 |
# File 'lib/twitch/clip.rb', line 25 def broadcaster_name @broadcaster_name end |
#created_at ⇒ Object (readonly)
Date the clip was created.
11 12 13 |
# File 'lib/twitch/clip.rb', line 11 def created_at @created_at end |
#creator_id ⇒ Object (readonly)
(User) ID of the clip’s creator.
27 28 29 |
# File 'lib/twitch/clip.rb', line 27 def creator_id @creator_id end |
#creator_name ⇒ Object (readonly)
(User) name of the clip’s creator.
29 30 31 |
# File 'lib/twitch/clip.rb', line 29 def creator_name @creator_name end |
#embed_url ⇒ Object (readonly)
URL for embedding the clip.
17 18 19 |
# File 'lib/twitch/clip.rb', line 17 def @embed_url end |
#game_id ⇒ Object (readonly)
ID of the game being played.
31 32 33 |
# File 'lib/twitch/clip.rb', line 31 def game_id @game_id end |
#id ⇒ Object (readonly)
ID of the clip.
7 8 9 |
# File 'lib/twitch/clip.rb', line 7 def id @id end |
#language ⇒ Object (readonly)
Language of the originating broadcast.
21 22 23 |
# File 'lib/twitch/clip.rb', line 21 def language @language end |
#thumbnail_url ⇒ Object (readonly)
URL of the thumbnail image.
15 16 17 |
# File 'lib/twitch/clip.rb', line 15 def thumbnail_url @thumbnail_url end |
#title ⇒ Object (readonly)
Title of the clip.
9 10 11 |
# File 'lib/twitch/clip.rb', line 9 def title @title end |
#url ⇒ Object (readonly)
URL of the clip.
13 14 15 |
# File 'lib/twitch/clip.rb', line 13 def url @url end |
#video_id ⇒ Object (readonly)
ID of the archived broadcast (may not be available).
33 34 35 |
# File 'lib/twitch/clip.rb', line 33 def video_id @video_id end |
#view_count ⇒ Object (readonly)
Number of views.
19 20 21 |
# File 'lib/twitch/clip.rb', line 19 def view_count @view_count end |