Method: Scale::API#initialize
- Defined in:
- lib/scale/api.rb
#initialize(params = {}) ⇒ API
Returns a new instance of API.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/scale/api.rb', line 10 def initialize(params = {}) params = DEFAULT_PARAMS.merge params @params = Scale.hash(params) @endpoint = fetch_attribute :endpoint @api_key = fetch_attribute :api_key @callback_key = fetch_attribute :callback_key @default_request_params = fetch_attribute :default_request_params validate! end |