Class: Brainzz::VideoStatsCommand

Inherits:
AnalyticsCommand show all
Defined in:
lib/brainzz/commands/video_stats_command.rb

Class Method Summary collapse

Class Method Details

.execute(video_id, start_date, end_date) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/brainzz/commands/video_stats_command.rb', line 4

def execute(video_id, start_date, end_date)
  video_stats_params = VideoStatsParams.new ({
    :video_id   => video_id,
    :start_date => start_date,
    :end_date   => end_date,
  })

  if video_stats_params.valid?
    response.new get(video_stats_params)
  else
    response.new
  end
end