Class: Google::Apis::YoutubeV3::VideoStatistics

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/youtube_v3/classes.rb,
lib/google/apis/youtube_v3/representations.rb,
lib/google/apis/youtube_v3/representations.rb

Overview

Statistics about the video, such as the number of times the video was viewed or liked.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ VideoStatistics

Returns a new instance of VideoStatistics.



8662
8663
8664
# File 'lib/google/apis/youtube_v3/classes.rb', line 8662

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#comment_countFixnum

The number of comments for the video. Corresponds to the JSON property commentCount

Returns:

  • (Fixnum)


8638
8639
8640
# File 'lib/google/apis/youtube_v3/classes.rb', line 8638

def comment_count
  @comment_count
end

#dislike_countFixnum

The number of users who have indicated that they disliked the video by giving it a negative rating. Corresponds to the JSON property dislikeCount

Returns:

  • (Fixnum)


8644
8645
8646
# File 'lib/google/apis/youtube_v3/classes.rb', line 8644

def dislike_count
  @dislike_count
end

#favorite_countFixnum

The number of users who currently have the video marked as a favorite video. Corresponds to the JSON property favoriteCount

Returns:

  • (Fixnum)


8649
8650
8651
# File 'lib/google/apis/youtube_v3/classes.rb', line 8649

def favorite_count
  @favorite_count
end

#like_countFixnum

The number of users who have indicated that they liked the video by giving it a positive rating. Corresponds to the JSON property likeCount

Returns:

  • (Fixnum)


8655
8656
8657
# File 'lib/google/apis/youtube_v3/classes.rb', line 8655

def like_count
  @like_count
end

#view_countFixnum

The number of times the video has been viewed. Corresponds to the JSON property viewCount

Returns:

  • (Fixnum)


8660
8661
8662
# File 'lib/google/apis/youtube_v3/classes.rb', line 8660

def view_count
  @view_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8667
8668
8669
8670
8671
8672
8673
# File 'lib/google/apis/youtube_v3/classes.rb', line 8667

def update!(**args)
  @comment_count = args[:comment_count] if args.key?(:comment_count)
  @dislike_count = args[:dislike_count] if args.key?(:dislike_count)
  @favorite_count = args[:favorite_count] if args.key?(:favorite_count)
  @like_count = args[:like_count] if args.key?(:like_count)
  @view_count = args[:view_count] if args.key?(:view_count)
end