Greyhounds.WebApi

<back to all web services

GetRace

The following routes are available for this service:
All Verbs/rounds/race
namespace Greyhounds.WebApi.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type Pool() = 
        member val Id:Int32 = new Int32() with get,set
        member val Name:String = null with get,set
        member val Coefficient:Decimal = new Decimal() with get,set
        member val RTP:Decimal = new Decimal() with get,set
        member val Threshold:Decimal = new Decimal() with get,set
        member val Balance:Decimal = new Decimal() with get,set

    [<AllowNullLiteral>]
    type RaceOutcomeRecap() = 
        member val Id:Int32 = new Int32() with get,set
        member val Coef:Single = new Single() with get,set
        member val WinCount:Int32 = new Int32() with get,set
        member val Win:Decimal = new Decimal() with get,set
        member val IsWin:Boolean = new Boolean() with get,set
        member val Results:String = null with get,set

    [<AllowNullLiteral>]
    type RoundOutcome() = 
        member val RaceOutcomeRecaps:ResizeArray<RaceOutcomeRecap> = null with get,set
        member val Stake:Decimal = new Decimal() with get,set
        member val Winnings:Decimal = new Decimal() with get,set
        member val Balance:Decimal = new Decimal() with get,set
        member val ReturnToPlayer:Decimal = new Decimal() with get,set

    [<AllowNullLiteral>]
    type JackpotInfo() = 
        member val IsGiven:Boolean = new Boolean() with get,set
        member val Id:String = null with get,set
        member val SlipId:String = null with get,set
        member val JPId:String = null with get,set
        member val Amount:Decimal = new Decimal() with get,set
        member val LocationId:String = null with get,set
        member val LocationName:String = null with get,set
        member val AddressLine:String = null with get,set
        member val AmountAccumulated:Decimal = new Decimal() with get,set

    [<AllowNullLiteral>]
    type Race() = 
        member val Id:String = null with get,set
        member val Sequence:String = null with get,set
        member val InputAccumulation:ResizeArray<Pool> = null with get,set
        member val OutputAccumulation:ResizeArray<Pool> = null with get,set
        member val Outcome:RoundOutcome = null with get,set
        member val JackpotInfo:JackpotInfo = null with get,set

    [<AllowNullLiteral>]
    type GetRace() = 
        member val Id:String = null with get,set

F# 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>