Class: Tenios::API::Client

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

Constant Summary collapse

URL =
"https://api.tenios.com"

Instance Method Summary collapse

Constructor Details

#initialize(access_key:, url: URL) ⇒ Client

Returns a new instance of Client.



12
13
14
15
# File 'lib/tenios/api/client.rb', line 12

def initialize(access_key:, url: URL)
  @access_key = access_key
  @http_client = build_http_client(url)
end

Instance Method Details

#post(path, **payload) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



37
38
39
# File 'lib/tenios/api/client.rb', line 37

def post(path, **payload)
  @http_client.post(path, payload.merge(access_key: @access_key)).body
end