Class: GamesRadar::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/games_radar/config.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_keyObject

Set your API key that is sent in every request. To request your own API key, just go to www.gamesradar.com/api-key-request


6
7
8
# File 'lib/games_radar/config.rb', line 6

def api_key
  @api_key
end

.page_sizeObject

Set how many items the API will return. Defaults to 50.


9
10
11
# File 'lib/games_radar/config.rb', line 9

def page_size
  @page_size
end

Class Method Details

.defaults!Object

Restore all default attributes accepted by GamesRadar::Config class.


13
14
15
16
17
18
# File 'lib/games_radar/config.rb', line 13

def self.defaults!
  GamesRadar.setup do |c|
    c.api_key = nil
    c.page_size = 50
  end
end