betfair 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +0 -4
- data/README.md +383 -0
- data/{README → README_OLD} +7 -3
- data/examples/bar.rb +23 -0
- data/examples/foo.rb +1 -1
- data/examples/simplebot.log +4 -0
- data/examples/simplebot/README.md +51 -0
- data/examples/simplebot/daemonize.rb +8 -0
- data/examples/simplebot/monit.conf +6 -0
- data/examples/simplebot/simplebot.log +0 -0
- data/examples/simplebot/simplebot.rb +168 -0
- data/lib/betfair/api.rb +167 -105
- data/lib/betfair/version.rb +1 -1
- data/spec/betfair/api_spec.rb +92 -16
- data/spec/fixtures/cancel_bets_by_market/failure.xml +0 -0
- data/spec/fixtures/cancel_bets_by_market/success.xml +17 -0
- data/spec/fixtures/keep_alive/fail.xml +16 -0
- data/spec/fixtures/keep_alive/success.xml +16 -0
- data/spec/fixtures/logout/fail.xml +16 -0
- data/spec/fixtures/logout/success.xml +16 -0
- data/spec/fixtures/update_bets/fail.xml +27 -0
- data/spec/fixtures/update_bets/success.xml +27 -0
- metadata +37 -13
data/lib/betfair/version.rb
CHANGED
data/spec/betfair/api_spec.rb
CHANGED
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
module Betfair
|
5
5
|
|
6
|
-
describe "Helper methods for mashing the data from the API" do
|
6
|
+
describe "Helper methods for mashing the data from the API - " do
|
7
7
|
|
8
8
|
before(:all) do
|
9
9
|
@bf = Betfair::API.new
|
@@ -63,7 +63,7 @@ module Betfair
|
|
63
63
|
|
64
64
|
end
|
65
65
|
|
66
|
-
describe "Placing and cancelling bets" do
|
66
|
+
describe "Placing and cancelling bets - " do
|
67
67
|
|
68
68
|
before(:all) do
|
69
69
|
@bf = Betfair::API.new
|
@@ -73,8 +73,8 @@ module Betfair
|
|
73
73
|
describe "place bet success" do
|
74
74
|
it "should place a bet on the exchange via the api" do
|
75
75
|
savon.expects(:place_bets).returns(:success)
|
76
|
-
bet = @bf.place_bet(@session_token, 1, 104184109, 58805, 'B',
|
77
|
-
bet.
|
76
|
+
bet = @bf.place_bet(@session_token, 1, 104184109, 58805, 'B', 2.0, 2.0)
|
77
|
+
bet[:bet_id].should eq('16939643915')
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
@@ -92,8 +92,10 @@ module Betfair
|
|
92
92
|
bets = []
|
93
93
|
bets << { market_id: 104184109, runner_id: 58805, bet_type: 'B', price: 2.0, size: 2.0, asian_line_id: 0,
|
94
94
|
bet_category_type: 'E', bet_peristence_type: 'NONE', bsp_liability: 0 }
|
95
|
+
bets << { market_id: 104184109, runner_id: 12234, bet_type: 'L', price: 1.5, size: 2.0, asian_line_id: 0,
|
96
|
+
bet_category_type: 'E', bet_peristence_type: 'NONE', bsp_liability: 0 }
|
95
97
|
bets = @bf.place_multiple_bets(@session_token, 1, bets)
|
96
|
-
bets.
|
98
|
+
bets[:bet_id].should eq('16939643915')
|
97
99
|
end
|
98
100
|
end
|
99
101
|
|
@@ -102,17 +104,61 @@ module Betfair
|
|
102
104
|
savon.expects(:place_bets).returns(:fail)
|
103
105
|
bets = []
|
104
106
|
bets << { market_id: 104184109, runner_id: 58805, bet_type: 'B', price: 2.0, size: 2.0, asian_line_id: 0,
|
105
|
-
bet_category_type: 'E', bet_peristence_type: 'NONE', bsp_liability: 0 }
|
107
|
+
bet_category_type: 'E', bet_peristence_type: 'NONE', bsp_liability: 0 }
|
108
|
+
bets << { market_id: 104184109, runner_id: 12234, bet_type: 'L', price: 1.5, size: 2.0, asian_line_id: 0,
|
109
|
+
bet_category_type: 'E', bet_peristence_type: 'NONE', bsp_liability: 0 }
|
106
110
|
error_code = @bf.place_multiple_bets(@session_token, 1, bets)
|
107
111
|
error_code[:result_code].should eq('INVALID_SIZE')
|
108
112
|
end
|
109
113
|
end
|
114
|
+
|
115
|
+
describe "update bet success" do
|
116
|
+
it "should update a bet on the exchange via the api" do
|
117
|
+
savon.expects(:update_bets).returns(:success)
|
118
|
+
bet = @bf.update_bet(@session_token, 1, 1234, 'NONE', 1.6, 10.0, 'NONE', 1.5, 5.0)
|
119
|
+
bet[:new_bet_id].should eq('19052919856')
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
describe "update bet fail after trying to change an already changed bet" do
|
124
|
+
it "should return an error message" do
|
125
|
+
savon.expects(:update_bets).returns(:fail)
|
126
|
+
bet = @bf.update_bet(@session_token, 1, 1234, 'NONE', 1.6, 10.0, 'NONE', 1.5, 5.0)
|
127
|
+
bet[:result_code].should eq('BET_TAKEN_OR_LAPSED')
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
describe "update multiple bets success"do
|
132
|
+
it "should update mutliple bets on the exchange via the api" do
|
133
|
+
savon.expects(:update_bets).returns(:success)
|
134
|
+
bets = []
|
135
|
+
bets << { bet_id: 1234, new_bet_persistence_type: 'NONE', new_price: 10.0, new_size: 10.0,
|
136
|
+
old_bet_persistence_type: 'NONE', old_price: 5.0, old_size: 5.0 }
|
137
|
+
bets << { bet_id: 1234, new_bet_persistence_type: 'NONE', new_price: 10.0, new_size: 10.0,
|
138
|
+
old_bet_persistence_type: 'NONE', old_price: 5.0, old_size: 5.0 }
|
139
|
+
bets = @bf.update_multiple_bets(@session_token, 1, bets)
|
140
|
+
bets[:new_bet_id].should eq('19052919856')
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
describe "update multiple bets fail" do
|
145
|
+
it "should return an error message" do
|
146
|
+
savon.expects(:update_bets).returns(:fail)
|
147
|
+
bets = []
|
148
|
+
bets << { bet_id: 1234, new_bet_persistence_type: 'NONE', new_price: 10.0, new_size: 10.0,
|
149
|
+
old_bet_persistence_type: 'NONE', old_price: 5.0, old_size: 5.0 }
|
150
|
+
bets << { bet_id: 1235, new_bet_persistence_type: 'NONE', new_price: 10.0, new_size: 10.0,
|
151
|
+
old_bet_persistence_type: 'NONE', old_price: 5.0, old_size: 5.0 }
|
152
|
+
bets = @bf.update_multiple_bets(@session_token, 1, bets)
|
153
|
+
bets[:result_code].should eq('BET_TAKEN_OR_LAPSED')
|
154
|
+
end
|
155
|
+
end
|
110
156
|
|
111
157
|
describe "cancel bet success" do
|
112
158
|
it "should cancel a bet on the exchange via the api" do
|
113
159
|
savon.expects(:cancel_bets).returns(:success)
|
114
160
|
bet = @bf.cancel_bet(@session_token, 3, 16939689578)
|
115
|
-
bet.
|
161
|
+
bet[:result_code].should eq('REMAINING_CANCELLED')
|
116
162
|
end
|
117
163
|
end
|
118
164
|
|
@@ -128,7 +174,7 @@ module Betfair
|
|
128
174
|
it "should cancel a bet on the exchange via the api" do
|
129
175
|
savon.expects(:cancel_bets).returns(:success)
|
130
176
|
bets = @bf.cancel_multiple_bets(@session_token, 3, [16939689578, 16939689579, 169396895710])
|
131
|
-
bets.
|
177
|
+
bets[:result_code].should eq('REMAINING_CANCELLED')
|
132
178
|
end
|
133
179
|
end
|
134
180
|
|
@@ -141,9 +187,8 @@ module Betfair
|
|
141
187
|
end
|
142
188
|
|
143
189
|
end
|
144
|
-
|
145
190
|
|
146
|
-
describe "Reading account details" do
|
191
|
+
describe "Reading account details - " do
|
147
192
|
before(:all) do
|
148
193
|
@bf = Betfair::API.new
|
149
194
|
@session_token = @bf.login('username', 'password', 82, 0, 0, nil)
|
@@ -157,9 +202,8 @@ module Betfair
|
|
157
202
|
end
|
158
203
|
end
|
159
204
|
end
|
160
|
-
|
161
205
|
|
162
|
-
describe "Basic read methods from the API" do
|
206
|
+
describe "Basic read methods from the API - " do
|
163
207
|
|
164
208
|
before(:all) do
|
165
209
|
@bf = Betfair::API.new
|
@@ -186,7 +230,7 @@ module Betfair
|
|
186
230
|
it "should return the details for a market given the exchange id and market id" do
|
187
231
|
savon.expects(:get_market).returns(:success)
|
188
232
|
market = @bf.get_market(@session_token, 2, 10038633)
|
189
|
-
market.
|
233
|
+
market[:market_id].should eq('100386338')
|
190
234
|
end
|
191
235
|
end
|
192
236
|
|
@@ -218,6 +262,7 @@ module Betfair
|
|
218
262
|
it "should return active event types given the locale" do
|
219
263
|
savon.expects(:get_active_event_types).returns(:success)
|
220
264
|
events = @bf.get_active_event_types(@session_token, 'en')
|
265
|
+
events[0][:id].should eq('6423')
|
221
266
|
events.should_not be_nil
|
222
267
|
end
|
223
268
|
end
|
@@ -226,23 +271,54 @@ module Betfair
|
|
226
271
|
it "should return all of our unmatched and matched bets on an exchange, can take a market_id as the third arguement, plus many more" do
|
227
272
|
savon.expects(:getMUBets).returns(:success)
|
228
273
|
bets = @bf.get_mu_bets(@session_token, 1)
|
229
|
-
#bets.length.should eq(2)
|
230
274
|
bets[0][:selection_id].should eq("5986909")
|
231
275
|
bets[1][:selection_id].should eq("6230544")
|
232
276
|
end
|
233
277
|
end
|
234
278
|
|
235
|
-
describe "get matched/unmatched bets" do
|
279
|
+
describe "get matched/unmatched bets fail" do
|
236
280
|
it "should return an error message given the exchange id and and array of market type ids and no session id" do
|
237
281
|
savon.expects(:getMUBets).returns(:fail)
|
238
282
|
error_code = @bf.get_mu_bets(@session_token, 1)
|
239
283
|
error_code.should eq('API_ERROR - NO_SESSION')
|
240
284
|
end
|
241
285
|
end
|
286
|
+
|
287
|
+
describe "logout success" do
|
288
|
+
it "should successfully log out of the API" do
|
289
|
+
savon.expects(:logout).returns(:success)
|
290
|
+
session_token = @bf.logout(@session_token)
|
291
|
+
session_token.should eq(nil) # Returns a blank session_token
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
describe "logout fail" do
|
296
|
+
it "should un-successfully log out of the API" do
|
297
|
+
savon.expects(:logout).returns(:fail)
|
298
|
+
error_code = @bf.logout(@session_token)
|
299
|
+
error_code.should eq('API_ERROR - NO_SESSION')
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
describe "keepalive success" do
|
304
|
+
it "should successfully keep alive the session token" do
|
305
|
+
savon.expects(:keep_alive).returns(:success)
|
306
|
+
session_token = @bf.keep_alive(@session_token)
|
307
|
+
session_token.should eq('AXwtUFENz+/mWaatVtjUosug26+TYLYWiHPhRFRiabs=')
|
308
|
+
end
|
309
|
+
end
|
310
|
+
|
311
|
+
describe "keepalive fail" do
|
312
|
+
it "should un-successfully keep alive the session token" do
|
313
|
+
savon.expects(:keep_alive).returns(:fail)
|
314
|
+
error_code = @bf.keep_alive(@session_token)
|
315
|
+
error_code.should eq('NO_SESSION')
|
316
|
+
end
|
317
|
+
end
|
242
318
|
|
243
319
|
end
|
244
320
|
|
245
|
-
describe "General logins, logouts methods and proxys and Savon logging etc" do
|
321
|
+
describe "General logins, logouts methods and proxys and Savon logging etc - " do
|
246
322
|
|
247
323
|
before(:all) do
|
248
324
|
@bf = Betfair::API.new
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n2="http://www.betfair.com/publicapi/types/exchange/v5/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
2
|
+
<soap:Body>
|
3
|
+
<n:cancelBetsByMarketResponse xmlns:n="http://www.betfair.com/publicapi/v5/BFExchangeService/">
|
4
|
+
<n:Result xsi:type="n2:CancelBetsByMarketResp">
|
5
|
+
<header xsi:type="n2:APIResponseHeader">
|
6
|
+
<errorCode xsi:type="n2:APIErrorEnum">SERVICE_NOT_AVAILABLE_IN_PRODUCT</errorCode>
|
7
|
+
<minorErrorCode xsi:nil="1"/>
|
8
|
+
<sessionToken xsi:type="xsd:string">FDUK0eLFOTk4NhbiiuhtJANO5oa6Fg79NxW0H9Dn4Fs=</sessionToken>
|
9
|
+
<timestamp xsi:type="xsd:dateTime">2012-03-28T00:42:52.881Z</timestamp>
|
10
|
+
</header>
|
11
|
+
<results xsi:nil="1"/>
|
12
|
+
<errorCode xsi:type="n2:CancelBetsByMarketErrorEnum">API_ERROR</errorCode>
|
13
|
+
<minorErrorCode xsi:nil="1"/>
|
14
|
+
</n:Result>
|
15
|
+
</n:cancelBetsByMarketResponse>
|
16
|
+
</soap:Body>
|
17
|
+
</soap:Envelope>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n2="http://www.betfair.com/publicapi/types/global/v3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
2
|
+
<soap:Body>
|
3
|
+
<n:keepAliveResponse xmlns:n="http://www.betfair.com/publicapi/v3/BFGlobalService/">
|
4
|
+
<n:Result xsi:type="n2:KeepAliveResp">
|
5
|
+
<header xsi:type="n2:APIResponseHeader">
|
6
|
+
<errorCode xsi:type="n2:APIErrorEnum">NO_SESSION</errorCode>
|
7
|
+
<minorErrorCode xsi:nil="1"/>
|
8
|
+
<sessionToken xsi:nil="1"/>
|
9
|
+
<timestamp xsi:type="xsd:dateTime">2012-03-28T00:49:17.271Z</timestamp>
|
10
|
+
</header>
|
11
|
+
<apiVersion xsi:nil="1"/>
|
12
|
+
<minorErrorCode xsi:nil="1"/>
|
13
|
+
</n:Result>
|
14
|
+
</n:keepAliveResponse>
|
15
|
+
</soap:Body>
|
16
|
+
</soap:Envelope>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n2="http://www.betfair.com/publicapi/types/global/v3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
2
|
+
<soap:Body>
|
3
|
+
<n:keepAliveResponse xmlns:n="http://www.betfair.com/publicapi/v3/BFGlobalService/">
|
4
|
+
<n:Result xsi:type="n2:KeepAliveResp">
|
5
|
+
<header xsi:type="n2:APIResponseHeader">
|
6
|
+
<errorCode xsi:type="n2:APIErrorEnum">OK</errorCode>
|
7
|
+
<minorErrorCode xsi:nil="1"/>
|
8
|
+
<sessionToken xsi:type="xsd:string">AXwtUFENz+/mWaatVtjUosug26+TYLYWiHPhRFRiabs=</sessionToken>
|
9
|
+
<timestamp xsi:type="xsd:dateTime">2012-03-28T00:49:04.951Z</timestamp>
|
10
|
+
</header>
|
11
|
+
<apiVersion xsi:nil="1"/>
|
12
|
+
<minorErrorCode xsi:nil="1"/>
|
13
|
+
</n:Result>
|
14
|
+
</n:keepAliveResponse>
|
15
|
+
</soap:Body>
|
16
|
+
</soap:Envelope>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n2="http://www.betfair.com/publicapi/types/global/v3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
2
|
+
<soap:Body>
|
3
|
+
<n:logoutResponse xmlns:n="http://www.betfair.com/publicapi/v3/BFGlobalService/">
|
4
|
+
<n:Result xsi:type="n2:LogoutResp">
|
5
|
+
<header xsi:type="n2:APIResponseHeader">
|
6
|
+
<errorCode xsi:type="n2:APIErrorEnum">NO_SESSION</errorCode>
|
7
|
+
<minorErrorCode xsi:nil="1"/>
|
8
|
+
<sessionToken xsi:nil="1"/>
|
9
|
+
<timestamp xsi:type="xsd:dateTime">2012-03-28T00:49:48.218Z</timestamp>
|
10
|
+
</header>
|
11
|
+
<minorErrorCode xsi:nil="1"/>
|
12
|
+
<errorCode xsi:type="n2:LogoutErrorEnum">API_ERROR</errorCode>
|
13
|
+
</n:Result>
|
14
|
+
</n:logoutResponse>
|
15
|
+
</soap:Body>
|
16
|
+
</soap:Envelope>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n2="http://www.betfair.com/publicapi/types/global/v3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
2
|
+
<soap:Body>
|
3
|
+
<n:logoutResponse xmlns:n="http://www.betfair.com/publicapi/v3/BFGlobalService/">
|
4
|
+
<n:Result xsi:type="n2:LogoutResp">
|
5
|
+
<header xsi:type="n2:APIResponseHeader">
|
6
|
+
<errorCode xsi:type="n2:APIErrorEnum">OK</errorCode>
|
7
|
+
<minorErrorCode xsi:nil="1"/>
|
8
|
+
<sessionToken xsi:nil="1"/>
|
9
|
+
<timestamp xsi:type="xsd:dateTime">2012-03-28T00:49:59.562Z</timestamp>
|
10
|
+
</header>
|
11
|
+
<minorErrorCode xsi:nil="1"/>
|
12
|
+
<errorCode xsi:type="n2:LogoutErrorEnum">OK</errorCode>
|
13
|
+
</n:Result>
|
14
|
+
</n:logoutResponse>
|
15
|
+
</soap:Body>
|
16
|
+
</soap:Envelope>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n2="http://www.betfair.com/publicapi/types/exchange/v5/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
2
|
+
<soap:Body>
|
3
|
+
<n:updateBetsResponse xmlns:n="http://www.betfair.com/publicapi/v5/BFExchangeService/">
|
4
|
+
<n:Result xsi:type="n2:UpdateBetsResp">
|
5
|
+
<header xsi:type="n2:APIResponseHeader">
|
6
|
+
<errorCode xsi:type="n2:APIErrorEnum">OK</errorCode>
|
7
|
+
<minorErrorCode xsi:nil="1"/>
|
8
|
+
<sessionToken xsi:type="xsd:string">FDUK0eLFOTk4NhbiiuhtJANO5oa6Fg79NxW0H9Dn4Fs=</sessionToken>
|
9
|
+
<timestamp xsi:type="xsd:dateTime">2012-03-28T00:38:51.318Z</timestamp>
|
10
|
+
</header>
|
11
|
+
<betResults xsi:type="n2:ArrayOfUpdateBetsResult">
|
12
|
+
<n2:UpdateBetsResult xsi:type="n2:UpdateBetsResult">
|
13
|
+
<betId xsi:type="xsd:long">19052919856</betId>
|
14
|
+
<newBetId xsi:type="xsd:long">0</newBetId>
|
15
|
+
<sizeCancelled xsi:type="xsd:double">0.0</sizeCancelled>
|
16
|
+
<newSize xsi:type="xsd:double">0.0</newSize>
|
17
|
+
<newPrice xsi:type="xsd:double">0.0</newPrice>
|
18
|
+
<resultCode xsi:type="n2:UpdateBetsResultEnum">BET_TAKEN_OR_LAPSED</resultCode>
|
19
|
+
<success xsi:type="xsd:boolean">false</success>
|
20
|
+
</n2:UpdateBetsResult>
|
21
|
+
</betResults>
|
22
|
+
<errorCode xsi:type="n2:UpdateBetsErrorEnum">OK</errorCode>
|
23
|
+
<minorErrorCode xsi:nil="1"/>
|
24
|
+
</n:Result>
|
25
|
+
</n:updateBetsResponse>
|
26
|
+
</soap:Body>
|
27
|
+
</soap:Envelope>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n2="http://www.betfair.com/publicapi/types/exchange/v5/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
2
|
+
<soap:Body>
|
3
|
+
<n:updateBetsResponse xmlns:n="http://www.betfair.com/publicapi/v5/BFExchangeService/">
|
4
|
+
<n:Result xsi:type="n2:UpdateBetsResp">
|
5
|
+
<header xsi:type="n2:APIResponseHeader">
|
6
|
+
<errorCode xsi:type="n2:APIErrorEnum">OK</errorCode>
|
7
|
+
<minorErrorCode xsi:nil="1"/>
|
8
|
+
<sessionToken xsi:type="xsd:string">FDUK0eLFOTk4NhbiiuhtJANO5oa6Fg79NxW0H9Dn4Fs=</sessionToken>
|
9
|
+
<timestamp xsi:type="xsd:dateTime">2012-03-28T00:37:52.445Z</timestamp>
|
10
|
+
</header>
|
11
|
+
<betResults xsi:type="n2:ArrayOfUpdateBetsResult">
|
12
|
+
<n2:UpdateBetsResult xsi:type="n2:UpdateBetsResult">
|
13
|
+
<betId xsi:type="xsd:long">19052918644</betId>
|
14
|
+
<newBetId xsi:type="xsd:long">19052919856</newBetId>
|
15
|
+
<sizeCancelled xsi:type="xsd:double">5.0</sizeCancelled>
|
16
|
+
<newSize xsi:type="xsd:double">5.0</newSize>
|
17
|
+
<newPrice xsi:type="xsd:double">2.0</newPrice>
|
18
|
+
<resultCode xsi:type="n2:UpdateBetsResultEnum">OK_REMAINING_CANCELLED</resultCode>
|
19
|
+
<success xsi:type="xsd:boolean">true</success>
|
20
|
+
</n2:UpdateBetsResult>
|
21
|
+
</betResults>
|
22
|
+
<errorCode xsi:type="n2:UpdateBetsErrorEnum">OK</errorCode>
|
23
|
+
<minorErrorCode xsi:nil="1"/>
|
24
|
+
</n:Result>
|
25
|
+
</n:updateBetsResponse>
|
26
|
+
</soap:Body>
|
27
|
+
</soap:Envelope>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: betfair
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-30 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|
16
|
-
requirement: &
|
16
|
+
requirement: &70149977750280 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70149977750280
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70149977748720 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70149977748720
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70149977747880 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70149977747880
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: savon_spec
|
49
|
-
requirement: &
|
49
|
+
requirement: &70149977747340 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70149977747340
|
58
58
|
description: Gem for accessing the Betfair API.
|
59
59
|
email:
|
60
60
|
- lukeb@lukebyrne.com
|
@@ -65,16 +65,26 @@ files:
|
|
65
65
|
- .gitignore
|
66
66
|
- API Ref Doc.pdf
|
67
67
|
- Gemfile
|
68
|
-
- README
|
68
|
+
- README.md
|
69
|
+
- README_OLD
|
69
70
|
- Rakefile
|
70
71
|
- betfair.gemspec
|
72
|
+
- examples/bar.rb
|
71
73
|
- examples/foo.rb
|
74
|
+
- examples/simplebot.log
|
75
|
+
- examples/simplebot/README.md
|
76
|
+
- examples/simplebot/daemonize.rb
|
77
|
+
- examples/simplebot/monit.conf
|
78
|
+
- examples/simplebot/simplebot.log
|
79
|
+
- examples/simplebot/simplebot.rb
|
72
80
|
- lib/betfair.rb
|
73
81
|
- lib/betfair/api.rb
|
74
82
|
- lib/betfair/version.rb
|
75
83
|
- spec/betfair/api_spec.rb
|
76
84
|
- spec/fixtures/cancel_bets/fail.xml
|
77
85
|
- spec/fixtures/cancel_bets/success.xml
|
86
|
+
- spec/fixtures/cancel_bets_by_market/failure.xml
|
87
|
+
- spec/fixtures/cancel_bets_by_market/success.xml
|
78
88
|
- spec/fixtures/get_account_funds/success.xml
|
79
89
|
- spec/fixtures/get_active_event_types/success.xml
|
80
90
|
- spec/fixtures/get_all_markets/fail.xml
|
@@ -85,11 +95,17 @@ files:
|
|
85
95
|
- spec/fixtures/get_market_prices_compressed/success.xml
|
86
96
|
- spec/fixtures/get_mu_bets/fail.xml
|
87
97
|
- spec/fixtures/get_mu_bets/success.xml
|
98
|
+
- spec/fixtures/keep_alive/fail.xml
|
99
|
+
- spec/fixtures/keep_alive/success.xml
|
88
100
|
- spec/fixtures/login/bad_password.xml
|
89
101
|
- spec/fixtures/login/fail.xml
|
90
102
|
- spec/fixtures/login/success.xml
|
103
|
+
- spec/fixtures/logout/fail.xml
|
104
|
+
- spec/fixtures/logout/success.xml
|
91
105
|
- spec/fixtures/place_bets/fail.xml
|
92
106
|
- spec/fixtures/place_bets/success.xml
|
107
|
+
- spec/fixtures/update_bets/fail.xml
|
108
|
+
- spec/fixtures/update_bets/success.xml
|
93
109
|
- spec/spec_helper.rb
|
94
110
|
homepage: https://github.com/lukebyrne/betfair
|
95
111
|
licenses: []
|
@@ -105,7 +121,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
105
121
|
version: '0'
|
106
122
|
segments:
|
107
123
|
- 0
|
108
|
-
hash:
|
124
|
+
hash: 2703877553313569064
|
109
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
126
|
none: false
|
111
127
|
requirements:
|
@@ -114,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
130
|
version: '0'
|
115
131
|
segments:
|
116
132
|
- 0
|
117
|
-
hash:
|
133
|
+
hash: 2703877553313569064
|
118
134
|
requirements: []
|
119
135
|
rubyforge_project: betfair
|
120
136
|
rubygems_version: 1.8.10
|
@@ -125,6 +141,8 @@ test_files:
|
|
125
141
|
- spec/betfair/api_spec.rb
|
126
142
|
- spec/fixtures/cancel_bets/fail.xml
|
127
143
|
- spec/fixtures/cancel_bets/success.xml
|
144
|
+
- spec/fixtures/cancel_bets_by_market/failure.xml
|
145
|
+
- spec/fixtures/cancel_bets_by_market/success.xml
|
128
146
|
- spec/fixtures/get_account_funds/success.xml
|
129
147
|
- spec/fixtures/get_active_event_types/success.xml
|
130
148
|
- spec/fixtures/get_all_markets/fail.xml
|
@@ -135,9 +153,15 @@ test_files:
|
|
135
153
|
- spec/fixtures/get_market_prices_compressed/success.xml
|
136
154
|
- spec/fixtures/get_mu_bets/fail.xml
|
137
155
|
- spec/fixtures/get_mu_bets/success.xml
|
156
|
+
- spec/fixtures/keep_alive/fail.xml
|
157
|
+
- spec/fixtures/keep_alive/success.xml
|
138
158
|
- spec/fixtures/login/bad_password.xml
|
139
159
|
- spec/fixtures/login/fail.xml
|
140
160
|
- spec/fixtures/login/success.xml
|
161
|
+
- spec/fixtures/logout/fail.xml
|
162
|
+
- spec/fixtures/logout/success.xml
|
141
163
|
- spec/fixtures/place_bets/fail.xml
|
142
164
|
- spec/fixtures/place_bets/success.xml
|
165
|
+
- spec/fixtures/update_bets/fail.xml
|
166
|
+
- spec/fixtures/update_bets/success.xml
|
143
167
|
- spec/spec_helper.rb
|