| All Verbs | /rounds/race |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
Object = TypeVar('Object')
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Pool:
id: int = 0
name: Optional[str] = None
coefficient: Decimal = decimal.Decimal(0)
rtp: Decimal = decimal.Decimal(0)
threshold: Decimal = decimal.Decimal(0)
balance: Decimal = decimal.Decimal(0)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RaceOutcomeRecap:
id: int = 0
coef: float = 0.0
win_count: int = 0
win: Decimal = decimal.Decimal(0)
is_win: bool = False
results: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RoundOutcome:
race_outcome_recaps: Optional[List[RaceOutcomeRecap]] = None
stake: Decimal = decimal.Decimal(0)
winnings: Decimal = decimal.Decimal(0)
balance: Decimal = decimal.Decimal(0)
return_to_player: Decimal = decimal.Decimal(0)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class JackpotInfo:
is_given: bool = False
id: Optional[str] = None
slip_id: Optional[str] = None
jp_id: Optional[str] = None
amount: Decimal = decimal.Decimal(0)
location_id: Optional[str] = None
location_name: Optional[str] = None
address_line: Optional[str] = None
amount_accumulated: Decimal = decimal.Decimal(0)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Race:
id: Optional[str] = None
sequence: Optional[str] = None
input_accumulation: Optional[List[Pool]] = None
output_accumulation: Optional[List[Pool]] = None
outcome: Optional[RoundOutcome] = None
jackpot_info: Optional[JackpotInfo] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetRace:
id: Optional[str] = None
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>