Class: Luchadeer::Client
- Inherits:
-
Object
- Object
- Luchadeer::Client
- Includes:
- API
- Defined in:
- lib/luchadeer/client.rb
Constant Summary collapse
- GIANT_BOMB =
'http://www.giantbomb.com/api'
Constants included from API
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Attributes included from API
Instance Method Summary collapse
- #get(path, params = {}) ⇒ Object
-
#initialize(opts = {}) {|_self| ... } ⇒ Client
constructor
A new instance of Client.
Methods included from API
Constructor Details
#initialize(opts = {}) {|_self| ... } ⇒ Client
Returns a new instance of Client.
18 19 20 21 |
# File 'lib/luchadeer/client.rb', line 18 def initialize(opts = {}) @api_key = opts[:api_key] if opts[:api_key] yield self if block_given? end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
16 17 18 |
# File 'lib/luchadeer/client.rb', line 16 def api_key @api_key end |
Instance Method Details
#get(path, params = {}) ⇒ Object
23 24 25 |
# File 'lib/luchadeer/client.rb', line 23 def get(path, params = {}) request(:get, path, params) end |