Class: Yt::Models::LiveStreamingDetail

Inherits:
Base
  • Object
show all
Defined in:
lib/yt/models/live_streaming_detail.rb

Overview

Encapsulates information about a live video broadcast. The object will only be present in a video resource if the video is an upcoming, live, or completed live broadcast.

Instance Method Summary collapse

Methods included from Associations::HasReports

#has_report

Methods included from Associations::HasViewerPercentages

#has_viewer_percentages

Methods included from Associations::HasOne

#has_one

Methods included from Associations::HasMany

#has_many

Methods included from Associations::HasAuthentication

#has_authentication

Constructor Details

#initialize(options = {}) ⇒ LiveStreamingDetail

Returns a new instance of LiveStreamingDetail.



11
12
13
# File 'lib/yt/models/live_streaming_detail.rb', line 11

def initialize(options = {})
  @data = options[:data] || {}
end

Instance Method Details

#actual_end_timeTime?

Returns:

  • (Time)

    if the broadcast is over, the time that the broadcast actually ended.

  • (nil)

    if the broadcast is not over.



23
# File 'lib/yt/models/live_streaming_detail.rb', line 23

has_attribute :actual_end_time, type: Time

#actual_start_timeTime?

Returns:

  • (Time)

    if the broadcast has begun, the time that the broadcast actually started.

  • (nil)

    if the broadcast has not begun.



18
# File 'lib/yt/models/live_streaming_detail.rb', line 18

has_attribute :actual_start_time, type: Time

#concurrent_viewersInteger?

Returns:

  • (Integer)

    if the broadcast has current viewers and the broadcast owner has not hidden the viewcount for the video, the number of viewers currently watching the broadcast.

  • (nil)

    if the broadcast has ended or the broadcast owner has hidden the viewcount for the video.



38
# File 'lib/yt/models/live_streaming_detail.rb', line 38

has_attribute :concurrent_viewers, type: Integer

#scheduled_end_timeTime?

Returns:

  • (Time)

    if the broadcast is scheduled to end, the time that the broadcast is scheduled to end.

  • (nil)

    if the broadcast is scheduled to continue indefinitely.



31
# File 'lib/yt/models/live_streaming_detail.rb', line 31

has_attribute :scheduled_end_time, type: Time

#scheduled_start_timeTime

Returns the time that the broadcast is scheduled to begin.

Returns:

  • (Time)

    the time that the broadcast is scheduled to begin.



26
# File 'lib/yt/models/live_streaming_detail.rb', line 26

has_attribute :scheduled_start_time, type: Time