lib/rpx_now/request.rb in rpx_now-0.5.11 vs lib/rpx_now/request.rb in rpx_now-0.6.1

- old
+ new

@@ -1,11 +1,14 @@ module RPXNow class Request HOST = 'rpxnow.com' SSL_CERT = File.join(File.dirname(__FILE__), '..', '..', 'certs', 'ssl_cert.pem') - def self.post(path, data) - parse_response(request(path,data)) + def self.post(method, data) + version = RPXNow.extract_version! data + path = "/api/v#{version}/#{method}" + response = request(path, {:apiKey => RPXNow.api_key}.merge(data)) + parse_response(response) end private def self.request(path, data) \ No newline at end of file