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



37
38
39
40
41
# File 'lib/games_radar_api/client/news.rb', line 37

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



31
32
33
34
35
# File 'lib/games_radar_api/client/news.rb', line 31

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



43
44
45
46
47
# File 'lib/games_radar_api/client/news.rb', line 43

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



49
50
51
52
53
# File 'lib/games_radar_api/client/news.rb', line 49

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

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