Module: GamesRadarApi::Client::Videos

Included in:
GamesRadarApi::Client
Defined in:
lib/games_radar_api/client/videos.rb

Instance Method Summary collapse

Instance Method Details

#game_videos(id, options = {:region=>'us',:page_num=>1,:page_size=>10}) ⇒ Object



10
11
12
13
14
# File 'lib/games_radar_api/client/videos.rb', line 10

def game_videos(id,options={:region=>'us',:page_num=>1,:page_size=>10})
  response = get("/game/videos/#{id}",options)
  self.total_rows = response.videos.total_rows.to_i
  response.videos.video
end

#videos(options = {:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) ⇒ Object



4
5
6
7
8
# File 'lib/games_radar_api/client/videos.rb', line 4

def videos(options={:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'})
   response = get('/videos',options)
   self.total_rows = response.videos.total_rows.to_i
   response.videos.video
end