Commit 4f4fe3bb authored by Sergey Gernyak's avatar Sergey Gernyak

Move api urls to constants

parent ec426803
...@@ -5,7 +5,6 @@ module BetfairApiNgRails ...@@ -5,7 +5,6 @@ module BetfairApiNgRails
attr_accessor :application_key, attr_accessor :application_key,
:ssl_key_filepath, :ssl_key_filepath,
:ssl_crt_filepath, :ssl_crt_filepath,
:api_url,
:username, :username,
:password, :password,
:locale, :locale,
......
...@@ -12,21 +12,27 @@ module BetfairApiNgRails ...@@ -12,21 +12,27 @@ module BetfairApiNgRails
"Accept" => "application/json" "Accept" => "application/json"
} }
ALLOWED_RESOURCES = [ ALLOWED_RESOURCES = {
"listEventTypes", betting:[
"listCompetitions", "listEventTypes",
"listTimeRanges", "listCompetitions",
"listEvents", "listTimeRanges",
"listMarketTypes", "listEvents",
"listCountries", "listMarketTypes",
"listVenues", "listCountries",
"listMarketCatalogue", "listVenues",
"listMarketBook", "listMarketCatalogue",
"listCurrentOrders", "listMarketBook",
"listClearedOrders", "listCurrentOrders",
"listMarketProfitAndLoss", "listClearedOrders",
"placeOrders" "listMarketProfitAndLoss",
] "placeOrders"
],
account:[
"getAccountDetails",
"getAccountFunds"
]
}
ALLOWED_FORMATTING = [ ALLOWED_FORMATTING = [
"listEventTypes", "listEventTypes",
...@@ -46,7 +52,6 @@ module BetfairApiNgRails ...@@ -46,7 +52,6 @@ module BetfairApiNgRails
LOADABLE_CONFIG_OPTIONS = [ LOADABLE_CONFIG_OPTIONS = [
:application_key, :application_key,
:api_url,
:username, :username,
:password, :password,
:go_localuser, :go_localuser,
......
development: development:
application_key: YOUR_APP_KEY application_key: YOUR_APP_KEY
api_url: https://api-ng.betstores.com/betting/betfair/services/api.betfair.com/exchange/betting/json-rpc/v1
username: YOUR_ACCOUNT_USERNAME username: YOUR_ACCOUNT_USERNAME
password: YOUR_ACCOUNT_PASSWORD password: YOUR_ACCOUNT_PASSWORD
go_localuser: YOURUSERNAME go_localuser: YOURUSERNAME
...@@ -8,7 +7,6 @@ development: ...@@ -8,7 +7,6 @@ development:
production: production:
application_key: YOUR_APP_KEY application_key: YOUR_APP_KEY
api_url: https://api-ng.betstores.com/betting/betfair/services/api.betfair.com/exchange/betting/json-rpc/v1
username: YOUR_ACCOUNT_USERNAME username: YOUR_ACCOUNT_USERNAME
password: YOUR_ACCOUNT_PASSWORD password: YOUR_ACCOUNT_PASSWORD
go_localuser: YOURUSERNAME go_localuser: YOURUSERNAME
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment