Class: RPXNow::Api
- Inherits:
-
Object
- Object
- RPXNow::Api
- Defined in:
- lib/rpx_now/api.rb
Overview
low-level interaction with rpxnow.com api
-
send requests
-
parse response
-
handle server errors
Constant Summary collapse
- SSL_CERT =
File.join(File.dirname(__FILE__), '..', '..', 'certs', 'ssl_cert.pem')
Class Method Summary collapse
Class Method Details
.call(method, data) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/rpx_now/api.rb', line 13 def self.call(method, data) data = data.dup version = RPXNow.extract_version(data) data.delete(:api_version) path = "/api/v#{version}/#{method}" response = request(path, {:apiKey => RPXNow.api_key}.merge(data)) parse_response(response) end |