Class: Twitch::V2::Video

Inherits:
Object
  • Object
show all
Defined in:
lib/kappa/video.rb

Overview

Videos are broadcasts or highlights owned by a channel. Broadcasts are unedited videos that are saved after a streaming session. Highlights are videos edited from broadcasts by the channel's owner.

Instance Attribute Summary collapse

Instance Attribute Details

#channelChannel (readonly)

Returns The channel on which this video was originally streamed.

Returns:

  • (Channel)

    The channel on which this video was originally streamed.



98
99
100
# File 'lib/kappa/video.rb', line 98

def channel
  @channel
end

#descriptionString (readonly)

Returns Description of this video.

Returns:

  • (String)

    Description of this video.



80
81
82
# File 'lib/kappa/video.rb', line 80

def description
  @description
end

#embed_htmlString (readonly)

Returns HTML code for embedding this video on a web page.

Examples:

"<object data='http://www.twitch.tv/widgets/archive_embed_player.swf'>...</object>"

Returns:

  • (String)

    HTML code for embedding this video on a web page.



103
104
105
# File 'lib/kappa/video.rb', line 103

def embed_html
  @embed_html
end

#game_nameString (readonly)

Returns The name of the game played in this video.

Examples:

"StarCraft II: Heart of the Swarm"

Returns:

  • (String)

    The name of the game played in this video.



90
91
92
# File 'lib/kappa/video.rb', line 90

def game_name
  @game_name
end

#idString (readonly)

Note:

This is a String, not a Fixnum like most other object IDs.

Returns Unique Twitch ID for this video.

Examples:

"a396294648"

Returns:

  • (String)

    Unique Twitch ID for this video.



57
58
59
# File 'lib/kappa/video.rb', line 57

def id
  @id
end

#lengthFixnum (readonly)

Returns The length of this video (seconds).

Examples:

4205 # (1 hour, 10 minutes, 5 seconds)

Returns:

  • (Fixnum)

    The length of this video (seconds).



85
86
87
# File 'lib/kappa/video.rb', line 85

def length
  @length
end

#preview_urlString (readonly)

Returns URL of a preview screenshot taken from the video stream.

Examples:

"http://static-cdn.jtvnw.net/jtv.thumbs/archive-396294648-320x240.jpg"

Returns:

  • (String)

    URL of a preview screenshot taken from the video stream.



95
96
97
# File 'lib/kappa/video.rb', line 95

def preview_url
  @preview_url
end

#recorded_atTime (readonly)

Returns When this video was recorded (UTC).

Examples:

2013-04-27 09:37:30 UTC

Returns:

  • (Time)

    When this video was recorded (UTC).



67
68
69
# File 'lib/kappa/video.rb', line 67

def recorded_at
  @recorded_at
end

#titleString (readonly)

Returns Title of this video. This is seen on the video's page.

Examples:

"DreamHack Open Stockholm 26-27 April"

Returns:

  • (String)

    Title of this video. This is seen on the video's page.



62
63
64
# File 'lib/kappa/video.rb', line 62

def title
  @title
end

#urlString (readonly)

Returns URL of this video on Twitch.

Examples:

"http://www.twitch.tv/dreamhacktv/b/396294648"

Returns:

  • (String)

    URL of this video on Twitch.



72
73
74
# File 'lib/kappa/video.rb', line 72

def url
  @url
end

#view_countFixnum (readonly)

Returns The number of views this video has received all-time.

Examples:

81754

Returns:

  • (Fixnum)

    The number of views this video has received all-time.



77
78
79
# File 'lib/kappa/video.rb', line 77

def view_count
  @view_count
end