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 .jsv suffix or ?format=jsv

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