Class: QueueIt::Api::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/queue_it/api/client.rb

Constant Summary collapse

JSON_FORMAT =
"application/json".freeze

Instance Method Summary collapse

Constructor Details

#initialize(customer_id, api_key: nil, debug: false) ⇒ Client

Returns a new instance of Client.



12
13
14
15
16
17
# File 'lib/queue_it/api/client.rb', line 12

def initialize(customer_id, api_key: nil, debug: false)
  self.customer_id = customer_id
  self.api_key = api_key
  self.debug   = debug
  self.endpoint = URI("https://#{customer_id}.api2.queue-it.net/2_0/event")
end

Instance Method Details

#put(path, body) ⇒ Object



19
20
21
# File 'lib/queue_it/api/client.rb', line 19

def put(path, body)
  connection.put(path, body)
end