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
- #previews(options = {:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) ⇒ Object
- #reviews(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
37 38 39 40 41 |
# File 'lib/games_radar_api/client/news.rb', line 37 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
31 32 33 34 35 |
# File 'lib/games_radar_api/client/news.rb', line 31 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
43 44 45 46 47 |
# File 'lib/games_radar_api/client/news.rb', line 43 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
49 50 51 52 53 |
# File 'lib/games_radar_api/client/news.rb', line 49 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 |
#previews(options = {:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) ⇒ Object
18 19 20 21 22 |
# File 'lib/games_radar_api/client/news.rb', line 18 def previews(={:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) response = get('/previews',) self.total_rows = response.articles.total_rows.to_i response.articles.article end |
#reviews(options = {:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) ⇒ Object
24 25 26 27 28 |
# File 'lib/games_radar_api/client/news.rb', line 24 def reviews(={:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'}) response = get('/reviews',) self.total_rows = response.articles.total_rows.to_i response.articles.article end |