Greyhounds.WebApi

<back to all web services

GetRace

The following routes are available for this service:
All Verbs/rounds/race
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class GetRace
    {
        public String id = null;
        
        public String getId() { return id; }
        public GetRace setId(String value) { this.id = value; return this; }
    }

    public static class Race
    {
        public String id = null;
        public String sequence = null;
        public ArrayList<Pool> inputAccumulation = null;
        public ArrayList<Pool> outputAccumulation = null;
        public RoundOutcome outcome = null;
        public JackpotInfo jackpotInfo = null;
        
        public String getId() { return id; }
        public Race setId(String value) { this.id = value; return this; }
        public String getSequence() { return sequence; }
        public Race setSequence(String value) { this.sequence = value; return this; }
        public ArrayList<Pool> getInputAccumulation() { return inputAccumulation; }
        public Race setInputAccumulation(ArrayList<Pool> value) { this.inputAccumulation = value; return this; }
        public ArrayList<Pool> getOutputAccumulation() { return outputAccumulation; }
        public Race setOutputAccumulation(ArrayList<Pool> value) { this.outputAccumulation = value; return this; }
        public RoundOutcome getOutcome() { return outcome; }
        public Race setOutcome(RoundOutcome value) { this.outcome = value; return this; }
        public JackpotInfo getJackpotInfo() { return jackpotInfo; }
        public Race setJackpotInfo(JackpotInfo value) { this.jackpotInfo = value; return this; }
    }

    public static class Pool
    {
        public Integer id = null;
        public String name = null;
        public BigDecimal coefficient = null;
        public BigDecimal rtp = null;
        public BigDecimal threshold = null;
        public BigDecimal balance = null;
        
        public Integer getId() { return id; }
        public Pool setId(Integer value) { this.id = value; return this; }
        public String getName() { return name; }
        public Pool setName(String value) { this.name = value; return this; }
        public BigDecimal getCoefficient() { return coefficient; }
        public Pool setCoefficient(BigDecimal value) { this.coefficient = value; return this; }
        public BigDecimal getRtp() { return rtp; }
        public Pool setRtp(BigDecimal value) { this.rtp = value; return this; }
        public BigDecimal getThreshold() { return threshold; }
        public Pool setThreshold(BigDecimal value) { this.threshold = value; return this; }
        public BigDecimal getBalance() { return balance; }
        public Pool setBalance(BigDecimal value) { this.balance = value; return this; }
    }

    public static class RoundOutcome
    {
        public ArrayList<RaceOutcomeRecap> raceOutcomeRecaps = null;
        public BigDecimal stake = null;
        public BigDecimal winnings = null;
        public BigDecimal balance = null;
        public BigDecimal returnToPlayer = null;
        
        public ArrayList<RaceOutcomeRecap> getRaceOutcomeRecaps() { return raceOutcomeRecaps; }
        public RoundOutcome setRaceOutcomeRecaps(ArrayList<RaceOutcomeRecap> value) { this.raceOutcomeRecaps = value; return this; }
        public BigDecimal getStake() { return stake; }
        public RoundOutcome setStake(BigDecimal value) { this.stake = value; return this; }
        public BigDecimal getWinnings() { return winnings; }
        public RoundOutcome setWinnings(BigDecimal value) { this.winnings = value; return this; }
        public BigDecimal getBalance() { return balance; }
        public RoundOutcome setBalance(BigDecimal value) { this.balance = value; return this; }
        public BigDecimal getReturnToPlayer() { return returnToPlayer; }
        public RoundOutcome setReturnToPlayer(BigDecimal value) { this.returnToPlayer = value; return this; }
    }

    public static class RaceOutcomeRecap
    {
        public Integer id = null;
        public Float coef = null;
        public Integer winCount = null;
        public BigDecimal win = null;
        public Boolean isWin = null;
        public String results = null;
        
        public Integer getId() { return id; }
        public RaceOutcomeRecap setId(Integer value) { this.id = value; return this; }
        public Float getCoef() { return coef; }
        public RaceOutcomeRecap setCoef(Float value) { this.coef = value; return this; }
        public Integer getWinCount() { return winCount; }
        public RaceOutcomeRecap setWinCount(Integer value) { this.winCount = value; return this; }
        public BigDecimal getWin() { return win; }
        public RaceOutcomeRecap setWin(BigDecimal value) { this.win = value; return this; }
        public Boolean getIsWin() { return isWin; }
        public RaceOutcomeRecap setIsWin(Boolean value) { this.isWin = value; return this; }
        public String getResults() { return results; }
        public RaceOutcomeRecap setResults(String value) { this.results = value; return this; }
    }

    public static class JackpotInfo
    {
        public Boolean isGiven = null;
        public String id = null;
        public String slipId = null;
        public String jpId = null;
        public BigDecimal amount = null;
        public String locationId = null;
        public String locationName = null;
        public String addressLine = null;
        public BigDecimal amountAccumulated = null;
        
        public Boolean getIsGiven() { return isGiven; }
        public JackpotInfo setIsGiven(Boolean value) { this.isGiven = value; return this; }
        public String getId() { return id; }
        public JackpotInfo setId(String value) { this.id = value; return this; }
        public String getSlipId() { return slipId; }
        public JackpotInfo setSlipId(String value) { this.slipId = value; return this; }
        public String getJpId() { return jpId; }
        public JackpotInfo setJpId(String value) { this.jpId = value; return this; }
        public BigDecimal getAmount() { return amount; }
        public JackpotInfo setAmount(BigDecimal value) { this.amount = value; return this; }
        public String getLocationId() { return locationId; }
        public JackpotInfo setLocationId(String value) { this.locationId = value; return this; }
        public String getLocationName() { return locationName; }
        public JackpotInfo setLocationName(String value) { this.locationName = value; return this; }
        public String getAddressLine() { return addressLine; }
        public JackpotInfo setAddressLine(String value) { this.addressLine = value; return this; }
        public BigDecimal getAmountAccumulated() { return amountAccumulated; }
        public JackpotInfo setAmountAccumulated(BigDecimal value) { this.amountAccumulated = value; return this; }
    }

}

Java GetRace DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + 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>