Module: GamesRadarApi::Client::Cheats
- Included in:
- GamesRadarApi::Client
- Defined in:
- lib/games_radar_api/client/cheats.rb
Instance Method Summary collapse
- #cheats(options = {:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) ⇒ Object
- #game_cheats(id, options = {:region=>'us',:page_num=>1,:page_size=>10,:content=>'all_cheat'}) ⇒ Object
Instance Method Details
#cheats(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/cheats.rb', line 4 def cheats(={:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) response = get('/cheats',) self.total_rows = response.cheats.total_rows.to_i response.cheats.cheat end |
#game_cheats(id, options = {:region=>'us',:page_num=>1,:page_size=>10,:content=>'all_cheat'}) ⇒ Object
10 11 12 13 14 |
# File 'lib/games_radar_api/client/cheats.rb', line 10 def game_cheats(id,={:region=>'us',:page_num=>1,:page_size=>10,:content=>'all_cheat'}) response = get("/game/cheats/#{id}",) self.total_rows = response.cheats.total_rows.to_i response.cheats.cheat end |