Module: GamesRadarApi::Client::News

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

Instance Method Summary collapse

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(options={:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'})
  response = get('/features',options)
  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,options={:region=>'us',:page_num=>1,:page_size=>10})
  response = get("/game/features/#{id}",options)
  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,options={:region=>'us',:page_num=>1,:page_size=>10})
  response = get("/game/news/#{id}",options)
  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,options={:region=>'us',:page_num=>1,:page_size=>10})
  response = get("/game/previews/#{id}",options)
  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,options={:region=>'us',:page_num=>1,:page_size=>10})
  response = get("/game/reviews/#{id}",options)
  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(options={:region=>'us',:platform=>'all',:genre=>'all',:game_name=>'',:page_num=>1,:page_size=>10,:sort=>'newest'})
   response = get('/news',options)
   self.total_rows = response.articles.total_rows.to_i
   response.articles.article
end