| All Verbs | /rounds/race |
|---|
import Foundation
import ServiceStack
public class GetRace : Codable
{
public var id:String
required public init(){}
}
public class Race : Codable
{
public var id:String
public var sequence:String
public var inputAccumulation:[Pool]
public var outputAccumulation:[Pool]
public var outcome:RoundOutcome
public var jackpotInfo:JackpotInfo
required public init(){}
}
public class Pool : Codable
{
public var id:Int
public var name:String
public var coefficient:Double
public var rtp:Double
public var threshold:Double
public var balance:Double
required public init(){}
}
public class RoundOutcome : Codable
{
public var raceOutcomeRecaps:[RaceOutcomeRecap]
public var stake:Double
public var winnings:Double
public var balance:Double
public var returnToPlayer:Double
required public init(){}
}
public class RaceOutcomeRecap : Codable
{
public var id:Int
public var coef:Float
public var winCount:Int
public var win:Double
public var isWin:Bool
public var results:String
required public init(){}
}
public class JackpotInfo : Codable
{
public var isGiven:Bool
public var id:String
public var slipId:String
public var jpId:String
public var amount:Double
public var locationId:String
public var locationName:String
public var addressLine:String
public var amountAccumulated:Double
required public init(){}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /rounds/race HTTP/1.1
Host: grh1.api.bettor.webhop.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetRace xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.WebApi.ServiceModel">
<Id>String</Id>
</GetRace>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<Race xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.ReadModel">
<Id>String</Id>
<InputAccumulation>
<Accumulation.Pool>
<Amount>0</Amount>
<Id>0</Id>
<Name>String</Name>
</Accumulation.Pool>
</InputAccumulation>
<JackpotInfo>
<AddressLine>String</AddressLine>
<Amount>0</Amount>
<AmountAccumulated>0</AmountAccumulated>
<Id>String</Id>
<IsGiven>false</IsGiven>
<JPId>String</JPId>
<LocationId>String</LocationId>
<LocationName>String</LocationName>
<SlipId>String</SlipId>
</JackpotInfo>
<Outcome>
<Balance>0</Balance>
<RaceOutcomeRecaps>
<RaceOutcomeRecap>
<Coef>0</Coef>
<Id>0</Id>
<IsWin>false</IsWin>
<Results>String</Results>
<Win>0</Win>
<WinCount>0</WinCount>
</RaceOutcomeRecap>
</RaceOutcomeRecaps>
<ReturnToPlayer>0</ReturnToPlayer>
<Stake>0</Stake>
<Winnings>0</Winnings>
</Outcome>
<OutputAccumulation>
<Accumulation.Pool>
<Amount>0</Amount>
<Id>0</Id>
<Name>String</Name>
</Accumulation.Pool>
</OutputAccumulation>
<Sequence>String</Sequence>
</Race>