Class: Pricesphere::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/pricesphere/base.rb

Direct Known Subclasses

Product, Watch

Instance Method Summary collapse

Constructor Details

#initialize(api_key = '', version = 'v1') ⇒ Base

Returns a new instance of Base.

Raises:



8
9
10
11
12
# File 'lib/pricesphere/base.rb', line 8

def initialize(api_key = '', version = 'v1')
  raise Error.new("Missing API Key", 'You did not supply an API ey, please sign up for an account at https://www.pricesphere.com') if api_key == ''
  @api_key = api_key
  @version = version
end