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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/youtube_v3/classes.rb,
generated/google/apis/youtube_v3/representations.rb,
generated/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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ VideoStatistics

Returns a new instance of VideoStatistics.


8130
8131
8132
# File 'generated/google/apis/youtube_v3/classes.rb', line 8130

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

Instance Attribute Details

#comment_countString

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

Returns:

  • (String)

8106
8107
8108
# File 'generated/google/apis/youtube_v3/classes.rb', line 8106

def comment_count
  @comment_count
end

#dislike_countString

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:

  • (String)

8112
8113
8114
# File 'generated/google/apis/youtube_v3/classes.rb', line 8112

def dislike_count
  @dislike_count
end

#favorite_countString

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

Returns:

  • (String)

8117
8118
8119
# File 'generated/google/apis/youtube_v3/classes.rb', line 8117

def favorite_count
  @favorite_count
end

#like_countString

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:

  • (String)

8123
8124
8125
# File 'generated/google/apis/youtube_v3/classes.rb', line 8123

def like_count
  @like_count
end

#view_countString

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

Returns:

  • (String)

8128
8129
8130
# File 'generated/google/apis/youtube_v3/classes.rb', line 8128

def view_count
  @view_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


8135
8136
8137
8138
8139
8140
8141
# File 'generated/google/apis/youtube_v3/classes.rb', line 8135

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