Class: Twitch::Clip

Inherits:
Object
  • Object
show all
Defined in:
lib/twitch/clip.rb

Overview

A small segment of a broadcast captured by another user.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject (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_nameObject (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_atObject (readonly)

Date the clip was created.



11
12
13
# File 'lib/twitch/clip.rb', line 11

def created_at
  @created_at
end

#creator_idObject (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_nameObject (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_urlObject (readonly)

URL for embedding the clip.



17
18
19
# File 'lib/twitch/clip.rb', line 17

def embed_url
  @embed_url
end

#game_idObject (readonly)

ID of the game being played.



31
32
33
# File 'lib/twitch/clip.rb', line 31

def game_id
  @game_id
end

#idObject (readonly)

ID of the clip.



7
8
9
# File 'lib/twitch/clip.rb', line 7

def id
  @id
end

#languageObject (readonly)

Language of the originating broadcast.



21
22
23
# File 'lib/twitch/clip.rb', line 21

def language
  @language
end

#thumbnail_urlObject (readonly)

URL of the thumbnail image.



15
16
17
# File 'lib/twitch/clip.rb', line 15

def thumbnail_url
  @thumbnail_url
end

#titleObject (readonly)

Title of the clip.



9
10
11
# File 'lib/twitch/clip.rb', line 9

def title
  @title
end

#urlObject (readonly)

URL of the clip.



13
14
15
# File 'lib/twitch/clip.rb', line 13

def url
  @url
end

#video_idObject (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_countObject (readonly)

Number of views.



19
20
21
# File 'lib/twitch/clip.rb', line 19

def view_count
  @view_count
end