Class: PerfectAudit::Connection

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Defined in:
lib/perfect_audit/connection.rb

Constant Summary collapse

BASE_PATH =
'https://www.perfectaudit.com/api/v1/'.freeze

Instance Method Summary collapse

Instance Method Details

#get(path, params = {}) ⇒ Object



17
18
19
# File 'lib/perfect_audit/connection.rb', line 17

def get(path, params = {})
  HTTP.basic_auth(:user => api_key, :pass => api_secret).get(url(path), params)
end

#post(path, params = {}) ⇒ Object



13
14
15
# File 'lib/perfect_audit/connection.rb', line 13

def post(path, params = {})
  HTTP.basic_auth(:user => api_key, :pass => api_secret).post(url(path), params)
end