Commit e9b19383 authored by Sergey Gernyak's avatar Sergey Gernyak

Some logging

parent 4a899a3c
......@@ -44,6 +44,7 @@ module BetfairApiNgRails
def account
acc = BetfairApiNgRails.account_manager.get account_name
throw BetfairApiNgRails::NoAccountProvided unless acc
BetfairApiNgRails.log.write("==> Using account #{account_name}")
acc
end
end
......
......@@ -53,6 +53,7 @@ module BetfairApiNgRails
def create_http
@uri = URI.parse prepare_url
BetfairApiNgRails.log.write("==> Using url #{prepare_url}")
@http = Net::HTTP.new uri.host, uri.port
@request = Net::HTTP::Post.new uri.request_uri
end
......
......@@ -15,17 +15,23 @@ module BetfairApiNgRails
def type
return :no_type unless allowed?
allow_data.keys.first
allow_data.keys.first.tap do |t|
BetfairApiNgRails.log.write("==> Type of #{name} is #{t}")
end
end
def api_url
return :no_api_url unless allowed?
API_URL[type]
API_URL[type].tap do |u|
BetfairApiNgRails.log.write("==> Api url of #{name} is #{u}")
end
end
def json_method
return :no_method unless allowed?
JSON_METHOD[type]
JSON_METHOD[type].tap do |j|
BetfairApiNgRails.log.write("==> Json method of #{name} is #{j}")
end
end
private
......
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