Class: YTAnalytics::Model::TemporalMetrics

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/yt_analytics/model/temporal_metrics.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Logging

#logger

Constructor Details

#initialize(params) ⇒ TemporalMetrics

Returns a new instance of TemporalMetrics.



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 8

def initialize params
  @end_date = params[:endDate] if params[:endDate]
  @views = params[:views] if params[:views]
  @comments = params[:comments] if params[:comments]
  @favorites_added = params[:favoritesAdded] if params[:favoritesAdded]
  @favorites_removed = params[:favoritesRemoved] if params[:favoritesRemoved]
  @likes = params[:likes] if params[:likes]
  @dislikes = params[:dislikes] if params[:dislikes]
  @shares = params[:shares] if params[:shares]
  @subscribers_gained = params[:subscribersGained] if params[:subscribersGained]
  @subscribers_lost = params[:subscribersLost] if params[:subscribersLost]
  @uniques = params[:uniques] if params[:uniques]
end

Instance Attribute Details

#commentsObject

Returns the value of attribute comments.



6
7
8
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 6

def comments
  @comments
end

#dislikesObject

Returns the value of attribute dislikes.



6
7
8
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 6

def dislikes
  @dislikes
end

#end_dateObject

Returns the value of attribute end_date.



6
7
8
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 6

def end_date
  @end_date
end

#favorites_addedObject

Returns the value of attribute favorites_added.



6
7
8
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 6

def favorites_added
  @favorites_added
end

#favorites_removedObject

Returns the value of attribute favorites_removed.



6
7
8
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 6

def favorites_removed
  @favorites_removed
end

#likesObject

Returns the value of attribute likes.



6
7
8
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 6

def likes
  @likes
end

#sharesObject

Returns the value of attribute shares.



6
7
8
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 6

def shares
  @shares
end

#subscribers_gainedObject

Returns the value of attribute subscribers_gained.



6
7
8
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 6

def subscribers_gained
  @subscribers_gained
end

#subscribers_lostObject

Returns the value of attribute subscribers_lost.



6
7
8
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 6

def subscribers_lost
  @subscribers_lost
end

#uniquesObject

Returns the value of attribute uniques.



6
7
8
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 6

def uniques
  @uniques
end

#viewsObject

Returns the value of attribute views.



6
7
8
# File 'lib/yt_analytics/model/temporal_metrics.rb', line 6

def views
  @views
end