Class: Yt::Models::StatisticsSet

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

Overview

Encapsulates statistics about the resource, such as the number of times the resource has been viewed or liked.

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 = {}) ⇒ StatisticsSet



9
10
11
# File 'lib/yt/models/statistics_set.rb', line 9

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

Instance Method Details

#comment_countInteger



17
# File 'lib/yt/models/statistics_set.rb', line 17

has_attribute :comment_count, type: Integer

#dislike_countInteger



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

has_attribute :dislike_count, type: Integer

#favorite_countInteger



27
# File 'lib/yt/models/statistics_set.rb', line 27

has_attribute :favorite_count, type: Integer

#like_countInteger



20
# File 'lib/yt/models/statistics_set.rb', line 20

has_attribute :like_count, type: Integer

#subscriber_countInteger



33
# File 'lib/yt/models/statistics_set.rb', line 33

has_attribute :subscriber_count, type: Integer

#subscriber_count_visible?Boolean



36
37
38
# File 'lib/yt/models/statistics_set.rb', line 36

has_attribute :subscriber_count_visible?, from: :hidden_subscriber_count do |hidden|
  hidden == false
end

#video_countInteger



30
# File 'lib/yt/models/statistics_set.rb', line 30

has_attribute :video_count, type: Integer

#view_countInteger



14
# File 'lib/yt/models/statistics_set.rb', line 14

has_attribute :view_count, type: Integer