betfair 0.0.12
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 +6 -0
- data/API Ref Doc.pdf +42565 -27
- data/Gemfile +11 -0
- data/README +110 -0
- data/Rakefile +2 -0
- data/betfair.gemspec +26 -0
- data/examples/foo.rb +42 -0
- data/lib/betfair.rb +3 -0
- data/lib/betfair/api.rb +288 -0
- data/lib/betfair/version.rb +3 -0
- data/spec/betfair/api_spec.rb +214 -0
- data/spec/fixtures/cancel_bets/fail.xml +17 -0
- data/spec/fixtures/cancel_bets/success.xml +25 -0
- data/spec/fixtures/get_active_event_types/success.xml +211 -0
- data/spec/fixtures/get_all_markets/fail.xml +18 -0
- data/spec/fixtures/get_all_markets/success.xml +18 -0
- data/spec/fixtures/get_market/fail.xml +18 -0
- data/spec/fixtures/get_market/success.xml +62 -0
- data/spec/fixtures/get_market_prices_compressed/fail.xml +18 -0
- data/spec/fixtures/get_market_prices_compressed/success.xml +18 -0
- data/spec/fixtures/login/fail.xml +18 -0
- data/spec/fixtures/login/success.xml +19 -0
- data/spec/fixtures/place_bets/fail.xml +25 -0
- data/spec/fixtures/place_bets/success.xml +25 -0
- data/spec/spec_helper.rb +10 -0
- metadata +135 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<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">
|
3
|
+
<soap:Body>
|
4
|
+
<n:getAllMarketsResponse xmlns:n="http://www.betfair.com/publicapi/v5/BFExchangeService/">
|
5
|
+
<n:Result xsi:type="n2:GetAllMarketsResp">
|
6
|
+
<header xsi:type="n2:APIResponseHeader">
|
7
|
+
<errorCode xsi:type="n2:APIErrorEnum">NO_SESSION</errorCode>
|
8
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
9
|
+
<sessionToken xsi:nil="1"></sessionToken>
|
10
|
+
<timestamp xsi:type="xsd:dateTime">2011-09-27T06:53:43.316Z</timestamp>
|
11
|
+
</header>
|
12
|
+
<errorCode xsi:type="n2:GetAllMarketsErrorEnum">API_ERROR</errorCode>
|
13
|
+
<marketData xsi:nil="1"></marketData>
|
14
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
15
|
+
</n:Result>
|
16
|
+
</n:getAllMarketsResponse>
|
17
|
+
</soap:Body>
|
18
|
+
</soap:Envelope>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<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">
|
3
|
+
<soap:Body>
|
4
|
+
<n:getAllMarketsResponse xmlns:n="http://www.betfair.com/publicapi/v5/BFExchangeService/">
|
5
|
+
<n:Result xsi:type="n2:GetAllMarketsResp">
|
6
|
+
<header xsi:type="n2:APIResponseHeader">
|
7
|
+
<errorCode xsi:type="n2:APIErrorEnum">OK</errorCode>
|
8
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
9
|
+
<sessionToken xsi:type="xsd:string">G5BZzazUKWNLUCU1yDHjDWKDJxMp3F/nzxCxHve8dls=</sessionToken>
|
10
|
+
<timestamp xsi:type="xsd:dateTime">2011-09-27T06:51:24.682Z</timestamp>
|
11
|
+
</header>
|
12
|
+
<errorCode xsi:type="n2:GetAllMarketsErrorEnum">OK</errorCode>
|
13
|
+
<marketData xsi:type="xsd:string">:100343773~Grand Final Winner~O~ACTIVE~1318051800000~\Soccer\Australian Soccer\A-League 2011/12~/1/26716549/26721473/100343773~0~2~AUS~1317106182614~10~1~577.66~N~Y:100384583~Match Odds~O~ACTIVE~1318055400000~\Soccer\Australian Soccer\A-League 2011/12\Fixtures 08 October\Newcastle v Melbourne Heart~/1/26716549/26721473/26755417/26755418/100384583~0~2~AUS~1317106182614~3~1~17.46~N~Y:100384611~Match Odds~O~ACTIVE~1318062600000~\Soccer\Australian Soccer\A-League 2011/12\Fixtures 08 October\Melbourne Victory v Sydney~/1/26716549/26721473/26755417/26755427/100384611~0~2~AUS~1317106182614~3~1~4.86~N~Y:100384639~Match Odds~O~ACTIVE~1318067100000~\Soccer\Australian Soccer\A-League 2011/12\Fixtures 08 October\Brisbane v Central Coast~/1/26716549/26721473/26755417/26755438/100384639~0~2~AUS~1317106182614~3~1~19.84~N~Y:100384667~Match Odds~O~ACTIVE~1318140000000~\Soccer\Australian Soccer\A-League 2011/12\Fixtures 09 October\Gold Coast v Wellington~/1/26716549/26721473/26755445/26755446/100384667~0~2~AUS~1317106182614~3~1~0.0~N~Y:100384695~Match Odds~O~ACTIVE~1318149000000~\Soccer\Australian Soccer\A-League 2011/12\Fixtures 09 October\Perth v Adelaide~/1/26716549/26721473/26755445/26755451/100384695~0~2~AUS~1317106182614~3~1~0.0~N~Y</marketData>
|
14
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
15
|
+
</n:Result>
|
16
|
+
</n:getAllMarketsResponse>
|
17
|
+
</soap:Body>
|
18
|
+
</soap:Envelope>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<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">
|
3
|
+
<soap:Body>
|
4
|
+
<n:getMarketResponse xmlns:n="http://www.betfair.com/publicapi/v5/BFExchangeService/">
|
5
|
+
<n:Result xsi:type="n2:GetMarketResp">
|
6
|
+
<header xsi:type="n2:APIResponseHeader">
|
7
|
+
<errorCode xsi:type="n2:APIErrorEnum">OK</errorCode>
|
8
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
9
|
+
<sessionToken xsi:type="xsd:string">XEOkVJyFKZJ+VMFIdbYm1atWD19j/B502NQq5ekMGLc=</sessionToken>
|
10
|
+
<timestamp xsi:type="xsd:dateTime">2011-09-27T06:20:09.494Z</timestamp>
|
11
|
+
</header>
|
12
|
+
<errorCode xsi:type="n2:GetMarketErrorEnum">INVALID_MARKET</errorCode>
|
13
|
+
<market xsi:nil="1"></market>
|
14
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
15
|
+
</n:Result>
|
16
|
+
</n:getMarketResponse>
|
17
|
+
</soap:Body>
|
18
|
+
</soap:Envelope>
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<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">
|
3
|
+
<soap:Body>
|
4
|
+
<n:getMarketResponse xmlns:n="http://www.betfair.com/publicapi/v5/BFExchangeService/">
|
5
|
+
<n:Result xsi:type="n2:GetMarketResp">
|
6
|
+
<header xsi:type="n2:APIResponseHeader">
|
7
|
+
<errorCode xsi:type="n2:APIErrorEnum">OK</errorCode>
|
8
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
9
|
+
<sessionToken xsi:type="xsd:string">XEOkVJyFKZJ+VMFIdbYm1atWD19j/B502NQq5ekMGLc=</sessionToken>
|
10
|
+
<timestamp xsi:type="xsd:dateTime">2011-09-27T06:17:50.362Z</timestamp>
|
11
|
+
</header>
|
12
|
+
<errorCode xsi:type="n2:GetMarketErrorEnum">OK</errorCode>
|
13
|
+
<market xsi:type="n2:Market">
|
14
|
+
<countryISO3 xsi:type="xsd:string">AUS</countryISO3>
|
15
|
+
<discountAllowed xsi:type="xsd:boolean">true</discountAllowed>
|
16
|
+
<eventTypeId xsi:type="xsd:int">61420</eventTypeId>
|
17
|
+
<lastRefresh xsi:type="xsd:long">1317104157810</lastRefresh>
|
18
|
+
<marketBaseRate xsi:type="xsd:float">5.0</marketBaseRate>
|
19
|
+
<marketDescription xsi:type="xsd:string"><br><b>MARKET INFORMATION</b><br><br>For further information please see <a href=http://content.betfair.com/aboutus/content.asp?sWhichKey=Rules%20and%20Regulations#undefined.do style=color:0163ad; text-decoration: underline; target=_blank>Rules & Regs</a>.<br><br>Who will win this AFL match? At the start of the match all unmatched bets will be cancelled and the market will be turned <b>IN PLAY</b>. This market will not be actively managed therefore it is the responsibility of all users to manage their own positions. Dead Heat rules apply.
|
20
|
+
<br><br>This is a <a href="http://cross-matching.betfair.com.au/" target="_blank">cross-matching</a> market.<br><br>Customers should be aware that:<b><br><br><li>Transmissions described as “live” by some broadcasters may actually be delayed and that all in-play matches are not necessarily televised.</li><br><li>The extent of any such delay may vary between customers, depending on the set-up through which they are receiving pictures or data.</li><br></b><br><br><b>BET IN-PLAY</b><br><br>Australian customers call Telbet to bet in-play on this market – call <b>132BET (132238)</b><br><br><table cellborder="0" width="100%"><tr><td><a href="http://help.betfair.com/contents/itemId/i65767577/index.en.html" target="_blank"><img src="http://content.betfair.com/images/en_GB/homepage/ausflag.jpg" border="0"></a></td><td width="5">&nbsp;</td><td class="marketInfo_GreyText"><a href="http://help.betfair.com/contents/itemId/i65767577/index.en.html" target="_blank">This market is regulated by the Tasmanian Gaming Commission under a Tasmanian Gaming Licence (TGL) issued to Betfair Pty Ltd.</a></td></tr></table><br></marketDescription>
|
21
|
+
<marketDescriptionHasDate xsi:type="xsd:boolean">true</marketDescriptionHasDate>
|
22
|
+
<marketDisplayTime xsi:type="xsd:dateTime">0001-01-01T00:00:00.000Z</marketDisplayTime>
|
23
|
+
<marketId xsi:type="xsd:int">100386338</marketId>
|
24
|
+
<marketStatus xsi:type="n2:MarketStatusEnum">ACTIVE</marketStatus>
|
25
|
+
<marketSuspendTime xsi:type="xsd:dateTime">2011-10-01T04:30:00.000Z</marketSuspendTime>
|
26
|
+
<marketTime xsi:type="xsd:dateTime">2011-10-01T04:30:00.000Z</marketTime>
|
27
|
+
<marketType xsi:type="n2:MarketTypeEnum">O</marketType>
|
28
|
+
<marketTypeVariant xsi:type="n2:MarketTypeVariantEnum">D</marketTypeVariant>
|
29
|
+
<menuPath xsi:type="xsd:string">\AFL 2011\Grand Final - 01 October\Collingwood v Geelong</menuPath>
|
30
|
+
<eventHierarchy xsi:nil="1"></eventHierarchy>
|
31
|
+
<name xsi:type="xsd:string">Match Odds</name>
|
32
|
+
<numberOfWinners xsi:type="xsd:int">1</numberOfWinners>
|
33
|
+
<parentEventId xsi:type="xsd:int">26757142</parentEventId>
|
34
|
+
<runners xsi:type="n2:ArrayOfRunner">
|
35
|
+
<n2:Runner xsi:type="n2:Runner">
|
36
|
+
<asianLineId xsi:type="xsd:int">0</asianLineId>
|
37
|
+
<handicap xsi:type="xsd:double">0.0</handicap>
|
38
|
+
<name xsi:type="xsd:string">Collingwood Magpies</name>
|
39
|
+
<selectionId xsi:type="xsd:int">39983</selectionId>
|
40
|
+
</n2:Runner>
|
41
|
+
<n2:Runner xsi:type="n2:Runner">
|
42
|
+
<asianLineId xsi:type="xsd:int">0</asianLineId>
|
43
|
+
<handicap xsi:type="xsd:double">0.0</handicap>
|
44
|
+
<name xsi:type="xsd:string">Geelong Cats</name>
|
45
|
+
<selectionId xsi:type="xsd:int">244663</selectionId>
|
46
|
+
</n2:Runner>
|
47
|
+
</runners>
|
48
|
+
<unit xsi:nil="1"></unit>
|
49
|
+
<maxUnitValue xsi:type="xsd:double">0.0</maxUnitValue>
|
50
|
+
<minUnitValue xsi:type="xsd:double">0.0</minUnitValue>
|
51
|
+
<interval xsi:type="xsd:double">0.0</interval>
|
52
|
+
<runnersMayBeAdded xsi:type="xsd:boolean">false</runnersMayBeAdded>
|
53
|
+
<timezone xsi:type="xsd:string">AEST</timezone>
|
54
|
+
<licenceId xsi:type="xsd:int">2</licenceId>
|
55
|
+
<couponLinks xsi:nil="1"></couponLinks>
|
56
|
+
<bspMarket xsi:type="xsd:boolean">false</bspMarket>
|
57
|
+
</market>
|
58
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
59
|
+
</n:Result>
|
60
|
+
</n:getMarketResponse>
|
61
|
+
</soap:Body>
|
62
|
+
</soap:Envelope>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<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">
|
3
|
+
<soap:Body>
|
4
|
+
<n:getMarketPricesCompressedResponse xmlns:n="http://www.betfair.com/publicapi/v5/BFExchangeService/">
|
5
|
+
<n:Result xsi:type="n2:GetMarketPricesCompressedResp">
|
6
|
+
<header xsi:type="n2:APIResponseHeader">
|
7
|
+
<errorCode xsi:type="n2:APIErrorEnum">OK</errorCode>
|
8
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
9
|
+
<sessionToken xsi:type="xsd:string">XEOkVJyFKZJ+VMFIdbYm1atWD19j/B502NQq5ekMGLc=</sessionToken>
|
10
|
+
<timestamp xsi:type="xsd:dateTime">2011-09-27T06:19:53.318Z</timestamp>
|
11
|
+
</header>
|
12
|
+
<errorCode xsi:type="n2:GetMarketPricesErrorEnum">INVALID_MARKET</errorCode>
|
13
|
+
<marketPrices xsi:nil="1"></marketPrices>
|
14
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
15
|
+
</n:Result>
|
16
|
+
</n:getMarketPricesCompressedResponse>
|
17
|
+
</soap:Body>
|
18
|
+
</soap:Envelope>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<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">
|
3
|
+
<soap:Body>
|
4
|
+
<n:getMarketPricesCompressedResponse xmlns:n="http://www.betfair.com/publicapi/v5/BFExchangeService/">
|
5
|
+
<n:Result xsi:type="n2:GetMarketPricesCompressedResp">
|
6
|
+
<header xsi:type="n2:APIResponseHeader">
|
7
|
+
<errorCode xsi:type="n2:APIErrorEnum">OK</errorCode>
|
8
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
9
|
+
<sessionToken xsi:type="xsd:string">XEOkVJyFKZJ+VMFIdbYm1atWD19j/B502NQq5ekMGLc=</sessionToken>
|
10
|
+
<timestamp xsi:type="xsd:dateTime">2011-09-27T06:19:24.747Z</timestamp>
|
11
|
+
</header>
|
12
|
+
<errorCode xsi:type="n2:GetMarketPricesErrorEnum">OK</errorCode>
|
13
|
+
<marketPrices xsi:type="xsd:string">100386338~GBP~ACTIVE~0~1~~true~5.0~1317104156654~~N:39983~0~20363.72~2.12~~~false~~~~|2.1~225.82~L~1~2.08~1497.98~L~2~2.06~915.42~L~3~|2.12~66.41~B~1~2.14~3.16~B~2~2.2~51.23~B~3~:244663~1~43737.06~1.9~~~false~~~~|1.89~54.0~L~1~1.85~33.0~L~2~1.84~19.61~L~3~|1.92~1705.25~B~1~1.93~271.38~B~2~1.94~127.72~B~3~</marketPrices>
|
14
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
15
|
+
</n:Result>
|
16
|
+
</n:getMarketPricesCompressedResponse>
|
17
|
+
</soap:Body>
|
18
|
+
</soap:Envelope>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<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">
|
3
|
+
<soap:Body>
|
4
|
+
<n:loginResponse xmlns:n="http://www.betfair.com/publicapi/v3/BFGlobalService/">
|
5
|
+
<n:Result xsi:type="n2:LoginResp">
|
6
|
+
<header xsi:type="n2:APIResponseHeader">
|
7
|
+
<errorCode xsi:type="n2:APIErrorEnum">PRODUCT_REQUIRES_FUNDED_ACCOUNT</errorCode>
|
8
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode><sessionToken xsi:nil="1"></sessionToken>
|
9
|
+
<timestamp xsi:type="xsd:dateTime">2011-09-26T11:32:58.651Z</timestamp>
|
10
|
+
</header>
|
11
|
+
<currency xsi:nil="1"></currency>
|
12
|
+
<errorCode xsi:type="n2:LoginErrorEnum">API_ERROR</errorCode>
|
13
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
14
|
+
<validUntil xsi:type="xsd:dateTime">0001-01-01T00:00:00.000Z</validUntil>
|
15
|
+
</n:Result>
|
16
|
+
</n:loginResponse>
|
17
|
+
</soap:Body>
|
18
|
+
</soap:Envelope>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<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">
|
3
|
+
<soap:Body>
|
4
|
+
<n:loginResponse xmlns:n="http://www.betfair.com/publicapi/v3/BFGlobalService/">
|
5
|
+
<n:Result xsi:type="n2:LoginResp">
|
6
|
+
<header xsi:type="n2:APIResponseHeader">
|
7
|
+
<errorCode xsi:type="n2:APIErrorEnum">OK</errorCode>
|
8
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
9
|
+
<sessionToken xsi:type="xsd:string">ws2RTxfNCiFjBEmVMQuPyxMbobl1FA+vf//K7CGQoUo=</sessionToken>
|
10
|
+
<timestamp xsi:type="xsd:dateTime">2011-09-26T10:56:48.397Z</timestamp>
|
11
|
+
</header>
|
12
|
+
<currency xsi:type="xsd:string">GBP</currency>
|
13
|
+
<errorCode xsi:type="n2:LoginErrorEnum">OK</errorCode>
|
14
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
15
|
+
<validUntil xsi:type="xsd:dateTime">0001-01-01T00:00:00.000Z</validUntil>
|
16
|
+
</n:Result>
|
17
|
+
</n:loginResponse>
|
18
|
+
</soap:Body>
|
19
|
+
</soap:Envelope>
|
@@ -0,0 +1,25 @@
|
|
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:placeBetsResponse xmlns:n="http://www.betfair.com/publicapi/v5/BFExchangeService/">
|
4
|
+
<n:Result xsi:type="n2:PlaceBetsResp">
|
5
|
+
<header xsi:type="n2:APIResponseHeader">
|
6
|
+
<errorCode xsi:type="n2:APIErrorEnum">API_ERROR</errorCode>
|
7
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
8
|
+
<sessionToken xsi:type="xsd:string">T0fSCYclMyf2iuL4FbGQyoINXuNeaxpKxtAq/7VnAjo=</sessionToken>
|
9
|
+
<timestamp xsi:type="xsd:dateTime">2011-10-30T08:15:22.098Z</timestamp>
|
10
|
+
</header>
|
11
|
+
<betResults xsi:type="n2:ArrayOfPlaceBetsResult">
|
12
|
+
<n2:PlaceBetsResult xsi:type="n2:PlaceBetsResult">
|
13
|
+
<averagePriceMatched xsi:type="xsd:double">0.0</averagePriceMatched>
|
14
|
+
<betId xsi:type="xsd:long">0</betId>
|
15
|
+
<resultCode xsi:type="n2:PlaceBetsResultEnum">INVALID_SIZE</resultCode>
|
16
|
+
<sizeMatched xsi:type="xsd:double">0.0</sizeMatched>
|
17
|
+
<success xsi:type="xsd:boolean">false</success>
|
18
|
+
</n2:PlaceBetsResult>
|
19
|
+
</betResults>
|
20
|
+
<errorCode xsi:type="n2:PlaceBetsErrorEnum">OK</errorCode>
|
21
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
22
|
+
</n:Result>
|
23
|
+
</n:placeBetsResponse>
|
24
|
+
</soap:Body>
|
25
|
+
</soap:Envelope>
|
@@ -0,0 +1,25 @@
|
|
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:placeBetsResponse xmlns:n="http://www.betfair.com/publicapi/v5/BFExchangeService/">
|
4
|
+
<n:Result xsi:type="n2:PlaceBetsResp">
|
5
|
+
<header xsi:type="n2:APIResponseHeader">
|
6
|
+
<errorCode xsi:type="n2:APIErrorEnum">OK</errorCode>
|
7
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
8
|
+
<sessionToken xsi:type="xsd:string">T0fSCYclMyf2iuL4FbGQyoINXuNeaxpKxtAq/7VnAjo=</sessionToken>
|
9
|
+
<timestamp xsi:type="xsd:dateTime">2011-10-30T08:18:51.211Z</timestamp>
|
10
|
+
</header>
|
11
|
+
<betResults xsi:type="n2:ArrayOfPlaceBetsResult">
|
12
|
+
<n2:PlaceBetsResult xsi:type="n2:PlaceBetsResult">
|
13
|
+
<averagePriceMatched xsi:type="xsd:double">5.2</averagePriceMatched>
|
14
|
+
<betId xsi:type="xsd:long">16939643915</betId>
|
15
|
+
<resultCode xsi:type="n2:PlaceBetsResultEnum">OK</resultCode>
|
16
|
+
<sizeMatched xsi:type="xsd:double">5.0</sizeMatched>
|
17
|
+
<success xsi:type="xsd:boolean">true</success>
|
18
|
+
</n2:PlaceBetsResult>
|
19
|
+
</betResults>
|
20
|
+
<errorCode xsi:type="n2:PlaceBetsErrorEnum">OK</errorCode>
|
21
|
+
<minorErrorCode xsi:nil="1"></minorErrorCode>
|
22
|
+
</n:Result>
|
23
|
+
</n:placeBetsResponse>
|
24
|
+
</soap:Body>
|
25
|
+
</soap:Envelope>
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: betfair
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.12
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Luke Byrne
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-01-18 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: savon
|
16
|
+
requirement: &70257646476680 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70257646476680
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rake
|
27
|
+
requirement: &70257646476140 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70257646476140
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &70257646475580 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70257646475580
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: savon_spec
|
49
|
+
requirement: &70257646474980 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70257646474980
|
58
|
+
description: Gem for accessing the Betfair API.
|
59
|
+
email:
|
60
|
+
- lukeb@lukebyrne.com
|
61
|
+
executables: []
|
62
|
+
extensions: []
|
63
|
+
extra_rdoc_files: []
|
64
|
+
files:
|
65
|
+
- .gitignore
|
66
|
+
- API Ref Doc.pdf
|
67
|
+
- Gemfile
|
68
|
+
- README
|
69
|
+
- Rakefile
|
70
|
+
- betfair.gemspec
|
71
|
+
- examples/foo.rb
|
72
|
+
- lib/betfair.rb
|
73
|
+
- lib/betfair/api.rb
|
74
|
+
- lib/betfair/version.rb
|
75
|
+
- spec/betfair/api_spec.rb
|
76
|
+
- spec/fixtures/cancel_bets/fail.xml
|
77
|
+
- spec/fixtures/cancel_bets/success.xml
|
78
|
+
- spec/fixtures/get_active_event_types/success.xml
|
79
|
+
- spec/fixtures/get_all_markets/fail.xml
|
80
|
+
- spec/fixtures/get_all_markets/success.xml
|
81
|
+
- spec/fixtures/get_market/fail.xml
|
82
|
+
- spec/fixtures/get_market/success.xml
|
83
|
+
- spec/fixtures/get_market_prices_compressed/fail.xml
|
84
|
+
- spec/fixtures/get_market_prices_compressed/success.xml
|
85
|
+
- spec/fixtures/login/fail.xml
|
86
|
+
- spec/fixtures/login/success.xml
|
87
|
+
- spec/fixtures/place_bets/fail.xml
|
88
|
+
- spec/fixtures/place_bets/success.xml
|
89
|
+
- spec/spec_helper.rb
|
90
|
+
homepage: https://github.com/lukebyrne/betfair
|
91
|
+
licenses: []
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options: []
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
hash: -3602817033406674363
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
segments:
|
112
|
+
- 0
|
113
|
+
hash: -3602817033406674363
|
114
|
+
requirements: []
|
115
|
+
rubyforge_project: betfair
|
116
|
+
rubygems_version: 1.8.10
|
117
|
+
signing_key:
|
118
|
+
specification_version: 3
|
119
|
+
summary: Betfair API gem.
|
120
|
+
test_files:
|
121
|
+
- spec/betfair/api_spec.rb
|
122
|
+
- spec/fixtures/cancel_bets/fail.xml
|
123
|
+
- spec/fixtures/cancel_bets/success.xml
|
124
|
+
- spec/fixtures/get_active_event_types/success.xml
|
125
|
+
- spec/fixtures/get_all_markets/fail.xml
|
126
|
+
- spec/fixtures/get_all_markets/success.xml
|
127
|
+
- spec/fixtures/get_market/fail.xml
|
128
|
+
- spec/fixtures/get_market/success.xml
|
129
|
+
- spec/fixtures/get_market_prices_compressed/fail.xml
|
130
|
+
- spec/fixtures/get_market_prices_compressed/success.xml
|
131
|
+
- spec/fixtures/login/fail.xml
|
132
|
+
- spec/fixtures/login/success.xml
|
133
|
+
- spec/fixtures/place_bets/fail.xml
|
134
|
+
- spec/fixtures/place_bets/success.xml
|
135
|
+
- spec/spec_helper.rb
|