Module: GamesRadarApi::Client::Screenshots
- Included in:
- GamesRadarApi::Client
- Defined in:
- lib/games_radar_api/client/screenshots.rb
Instance Method Summary collapse
- #game_screenshots(id, options = {:region=>'us',:page_num=>1,:page_size=>10}) ⇒ Object
- #screenshots(options = {:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:unique_game=>false,:page_num=>1,:page_size=>10,:sort=>'newest'}) ⇒ Object
Instance Method Details
#game_screenshots(id, options = {:region=>'us',:page_num=>1,:page_size=>10}) ⇒ Object
12 13 14 15 16 |
# File 'lib/games_radar_api/client/screenshots.rb', line 12 def game_screenshots(id,={:region=>'us',:page_num=>1,:page_size=>10}) response = get("/game/screenshots/#{id}",) self.total_rows = response.screenshots.total_rows.to_i response.screenshots.screenshot end |
#screenshots(options = {:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:unique_game=>false,:page_num=>1,:page_size=>10,:sort=>'newest'}) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/games_radar_api/client/screenshots.rb', line 4 def screenshots(={:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:unique_game=>false,:page_num=>1,:page_size=>10,:sort=>'newest'}) puts "NOTE: Tested the Screenshot API on 26 September 2012 and it wasn't returning any rows" puts "This module will therefore appear in this gem, but please don't be suprised if it doesn't work" response = get('/screenshots',) self.total_rows = response.screenshots.total_rows.to_i response.screenshots.screenshot end |