lib/betfair/api/rest.rb in betfair-ng-0.2.0 vs lib/betfair/api/rest.rb in betfair-ng-0.2.1

- old
+ new

@@ -9,12 +9,12 @@ "Accept" => "application/json", "Content-Type" => "application/json" }) apis = { - betting: "https://api.betfair.com/exchange/betting/rest/v1.0", - account: "https://api.betfair.com/exchange/account/rest/v1.0" + betting: "https://#{obj.endpoint}.betfair.com/exchange/betting/rest/v1.0", + account: "https://#{obj.endpoint}.betfair.com/exchange/account/rest/v1.0", } obj.class::OPERATIONS.each do |api, operations| operations.each do |operation| define_method(operation) do |body = nil| @@ -41,11 +41,11 @@ # password: Betfair account password string # cert_key_file_path: Path to Betfair client certificate private key file # cert_key_path: Path to Betfair client certificate public key file associated with Betfair account def non_interactive_login(username, password, cert_key_file_path, cert_file_path) json = post({ - url: "https://identitysso.betfair.com/api/certlogin", + url: "https://identitysso-cert.betfair.com/api/certlogin", body: { username: username, password: password }, headers: { "Content-Type" => "application/x-www-form-urlencoded" }, cert_key_file_path: cert_key_file_path, cert_file_path: cert_file_path }) @@ -77,6 +77,6 @@ def handle_errors(response) end end end -end \ No newline at end of file +end