Class: Yt::Models::StatisticsSet
- 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 Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#comment_count ⇒ Integer
The number of comments for the resource.
-
#dislike_count ⇒ Integer
The number of users who disliked the resource.
-
#favorite_count ⇒ Integer
The number of users who currently have the resource marked as a favorite resource.
-
#initialize(options = {}) ⇒ StatisticsSet
constructor
A new instance of StatisticsSet.
-
#like_count ⇒ Integer
The number of users who liked the resource.
-
#subscriber_count ⇒ Integer
The number of subscriber the resource has.
-
#subscriber_count_visible? ⇒ Boolean
Whether the number of subscribers is publicly visible.
-
#video_count ⇒ Integer
The number of videos updated to the resource.
-
#view_count ⇒ Integer
The number of times the resource has been viewed.
Methods included from Associations::HasReports
Methods included from Associations::HasViewerPercentages
Methods included from Associations::HasOne
Methods included from Associations::HasMany
Methods included from Associations::HasAuthentication
Constructor Details
#initialize(options = {}) ⇒ StatisticsSet
Returns a new instance of StatisticsSet.
11 12 13 |
# File 'lib/yt/models/statistics_set.rb', line 11 def initialize( = {}) @data = [:data] end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
9 10 11 |
# File 'lib/yt/models/statistics_set.rb', line 9 def data @data end |
Instance Method Details
#comment_count ⇒ Integer
Returns the number of comments for the resource.
19 |
# File 'lib/yt/models/statistics_set.rb', line 19 has_attribute :comment_count, type: Integer |
#dislike_count ⇒ Integer
Returns the number of users who disliked the resource.
25 |
# File 'lib/yt/models/statistics_set.rb', line 25 has_attribute :dislike_count, type: Integer |
#favorite_count ⇒ Integer
Returns the number of users who currently have the resource marked as a favorite resource.
29 |
# File 'lib/yt/models/statistics_set.rb', line 29 has_attribute :favorite_count, type: Integer |
#like_count ⇒ Integer
Returns the number of users who liked the resource.
22 |
# File 'lib/yt/models/statistics_set.rb', line 22 has_attribute :like_count, type: Integer |
#subscriber_count ⇒ Integer
Returns the number of subscriber the resource has.
35 |
# File 'lib/yt/models/statistics_set.rb', line 35 has_attribute :subscriber_count, type: Integer |
#subscriber_count_visible? ⇒ Boolean
Returns whether the number of subscribers is publicly visible.
38 39 40 |
# File 'lib/yt/models/statistics_set.rb', line 38 has_attribute :subscriber_count_visible?, from: :hidden_subscriber_count do |hidden| hidden == false end |
#video_count ⇒ Integer
Returns the number of videos updated to the resource.
32 |
# File 'lib/yt/models/statistics_set.rb', line 32 has_attribute :video_count, type: Integer |
#view_count ⇒ Integer
Returns the number of times the resource has been viewed.
16 |
# File 'lib/yt/models/statistics_set.rb', line 16 has_attribute :view_count, type: Integer |