| 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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: String,
sequence: String,
inputAccumulation:
[
{
id: 0,
name: String,
amount: 0
}
],
outputAccumulation:
[
{
id: 0,
name: String,
amount: 0
}
],
outcome:
{
raceOutcomeRecaps:
[
{
id: 0,
coef: 0,
winCount: 0,
win: 0,
isWin: False,
results: String
}
],
stake: 0,
winnings: 0,
balance: 0,
returnToPlayer: 0
},
jackpotInfo:
{
isGiven: False,
id: String,
slipId: String,
jpId: String,
amount: 0,
locationId: String,
locationName: String,
addressLine: String,
amountAccumulated: 0
}
}