Module: GamesRadarApi::Client::News
- Included in:
- GamesRadarApi::Client
- Defined in:
- lib/games_radar_api/client/news.rb
Instance Method Summary collapse
- #features(options = {:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) ⇒ Object
- #game_features(id, options = {:region=>'us',:page_num=>1,:page_size=>10}) ⇒ Object
- #game_news(id, options = {:region=>'us',:page_num=>1,:page_size=>10}) ⇒ Object
- #game_previews(id, options = {:region=>'us',:page_num=>1,:page_size=>10}) ⇒ Object
- #game_reviews(id, options = {:region=>'us',:page_num=>1,:page_size=>10}) ⇒ Object
- #news(options = {:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) ⇒ Object
Instance Method Details
#features(options = {:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) ⇒ Object
12 13 14 15 16 |
# File 'lib/games_radar_api/client/news.rb', line 12 def features(={:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) response = get('/features',) self.total_rows = response.articles.total_rows.to_i response.articles.article end |
#game_features(id, options = {:region=>'us',:page_num=>1,:page_size=>10}) ⇒ Object
24 25 26 27 28 |
# File 'lib/games_radar_api/client/news.rb', line 24 def game_features(id,={:region=>'us',:page_num=>1,:page_size=>10}) response = get("/game/features/#{id}",) self.total_rows = response.articles.total_rows.to_i response.articles.article end |
#game_news(id, options = {:region=>'us',:page_num=>1,:page_size=>10}) ⇒ Object
18 19 20 21 22 |
# File 'lib/games_radar_api/client/news.rb', line 18 def game_news(id,={:region=>'us',:page_num=>1,:page_size=>10}) response = get("/game/news/#{id}",) self.total_rows = response.articles.total_rows.to_i response.articles.article end |
#game_previews(id, options = {:region=>'us',:page_num=>1,:page_size=>10}) ⇒ Object
30 31 32 33 34 |
# File 'lib/games_radar_api/client/news.rb', line 30 def game_previews(id,={:region=>'us',:page_num=>1,:page_size=>10}) response = get("/game/previews/#{id}",) self.total_rows = response.articles.total_rows.to_i response.articles.article end |
#game_reviews(id, options = {:region=>'us',:page_num=>1,:page_size=>10}) ⇒ Object
36 37 38 39 40 |
# File 'lib/games_radar_api/client/news.rb', line 36 def game_reviews(id,={:region=>'us',:page_num=>1,:page_size=>10}) response = get("/game/reviews/#{id}",) self.total_rows = response.articles.total_rows.to_i response.articles.article end |
#news(options = {:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) ⇒ Object
6 7 8 9 10 |
# File 'lib/games_radar_api/client/news.rb', line 6 def news(={:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) response = get('/news',) self.total_rows = response.articles.total_rows.to_i response.articles.article end |