| All Verbs | /rounds/race |
|---|
import 'package:servicestack/servicestack.dart';
class Pool implements IConvertible
{
int id = 0;
String? name;
double coefficient = 0;
double rtp = 0;
double threshold = 0;
double balance = 0;
Pool({this.id,this.name,this.coefficient,this.rtp,this.threshold,this.balance});
Pool.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
coefficient = JsonConverters.toDouble(json['coefficient']);
rtp = JsonConverters.toDouble(json['rtp']);
threshold = JsonConverters.toDouble(json['threshold']);
balance = JsonConverters.toDouble(json['balance']);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'coefficient': coefficient,
'rtp': rtp,
'threshold': threshold,
'balance': balance
};
getTypeName() => "Pool";
TypeContext? context = _ctx;
}
class RaceOutcomeRecap implements IConvertible
{
int id = 0;
double coef = 0;
int winCount = 0;
double win = 0;
bool isWin;
String? results;
RaceOutcomeRecap({this.id,this.coef,this.winCount,this.win,this.isWin,this.results});
RaceOutcomeRecap.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
coef = JsonConverters.toDouble(json['coef']);
winCount = json['winCount'];
win = JsonConverters.toDouble(json['win']);
isWin = json['isWin'];
results = json['results'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'coef': coef,
'winCount': winCount,
'win': win,
'isWin': isWin,
'results': results
};
getTypeName() => "RaceOutcomeRecap";
TypeContext? context = _ctx;
}
class RoundOutcome implements IConvertible
{
List<RaceOutcomeRecap>? raceOutcomeRecaps;
double stake = 0;
double winnings = 0;
double balance = 0;
double returnToPlayer = 0;
RoundOutcome({this.raceOutcomeRecaps,this.stake,this.winnings,this.balance,this.returnToPlayer});
RoundOutcome.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
raceOutcomeRecaps = JsonConverters.fromJson(json['raceOutcomeRecaps'],'List<RaceOutcomeRecap>',context!);
stake = JsonConverters.toDouble(json['stake']);
winnings = JsonConverters.toDouble(json['winnings']);
balance = JsonConverters.toDouble(json['balance']);
returnToPlayer = JsonConverters.toDouble(json['returnToPlayer']);
return this;
}
Map<String, dynamic> toJson() => {
'raceOutcomeRecaps': JsonConverters.toJson(raceOutcomeRecaps,'List<RaceOutcomeRecap>',context!),
'stake': stake,
'winnings': winnings,
'balance': balance,
'returnToPlayer': returnToPlayer
};
getTypeName() => "RoundOutcome";
TypeContext? context = _ctx;
}
class JackpotInfo implements IConvertible
{
bool isGiven;
String? id;
String? slipId;
String? jpId;
double amount = 0;
String? locationId;
String? locationName;
String? addressLine;
double amountAccumulated = 0;
JackpotInfo({this.isGiven,this.id,this.slipId,this.jpId,this.amount,this.locationId,this.locationName,this.addressLine,this.amountAccumulated});
JackpotInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
isGiven = json['isGiven'];
id = json['id'];
slipId = json['slipId'];
jpId = json['jpId'];
amount = JsonConverters.toDouble(json['amount']);
locationId = json['locationId'];
locationName = json['locationName'];
addressLine = json['addressLine'];
amountAccumulated = JsonConverters.toDouble(json['amountAccumulated']);
return this;
}
Map<String, dynamic> toJson() => {
'isGiven': isGiven,
'id': id,
'slipId': slipId,
'jpId': jpId,
'amount': amount,
'locationId': locationId,
'locationName': locationName,
'addressLine': addressLine,
'amountAccumulated': amountAccumulated
};
getTypeName() => "JackpotInfo";
TypeContext? context = _ctx;
}
class Race implements IConvertible
{
String? id;
String? sequence;
List<Pool>? inputAccumulation;
List<Pool>? outputAccumulation;
RoundOutcome? outcome;
JackpotInfo? jackpotInfo;
Race({this.id,this.sequence,this.inputAccumulation,this.outputAccumulation,this.outcome,this.jackpotInfo});
Race.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
sequence = json['sequence'];
inputAccumulation = JsonConverters.fromJson(json['inputAccumulation'],'List<Pool>',context!);
outputAccumulation = JsonConverters.fromJson(json['outputAccumulation'],'List<Pool>',context!);
outcome = JsonConverters.fromJson(json['outcome'],'RoundOutcome',context!);
jackpotInfo = JsonConverters.fromJson(json['jackpotInfo'],'JackpotInfo',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'sequence': sequence,
'inputAccumulation': JsonConverters.toJson(inputAccumulation,'List<Pool>',context!),
'outputAccumulation': JsonConverters.toJson(outputAccumulation,'List<Pool>',context!),
'outcome': JsonConverters.toJson(outcome,'RoundOutcome',context!),
'jackpotInfo': JsonConverters.toJson(jackpotInfo,'JackpotInfo',context!)
};
getTypeName() => "Race";
TypeContext? context = _ctx;
}
class GetRace implements IConvertible
{
String? id;
GetRace({this.id});
GetRace.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id
};
getTypeName() => "GetRace";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'grh1.api.bettor.webhop.biz', types: <String, TypeInfo> {
'Pool': TypeInfo(TypeOf.Class, create:() => Pool()),
'RaceOutcomeRecap': TypeInfo(TypeOf.Class, create:() => RaceOutcomeRecap()),
'RoundOutcome': TypeInfo(TypeOf.Class, create:() => RoundOutcome()),
'List<RaceOutcomeRecap>': TypeInfo(TypeOf.Class, create:() => <RaceOutcomeRecap>[]),
'JackpotInfo': TypeInfo(TypeOf.Class, create:() => JackpotInfo()),
'Race': TypeInfo(TypeOf.Class, create:() => Race()),
'List<Pool>': TypeInfo(TypeOf.Class, create:() => <Pool>[]),
'GetRace': TypeInfo(TypeOf.Class, create:() => GetRace()),
});
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>