Greyhounds.WebApi

<back to all web services

GetRace

The following routes are available for this service:
All Verbs/rounds/race
// @ts-nocheck

export class Pool
{
    public id: number;
    public name?: string;
    public coefficient: number;
    public rtp: number;
    public threshold: number;
    public balance: number;

    public constructor(init?: Partial<Pool>) { (Object as any).assign(this, init); }
}

export class RaceOutcomeRecap
{
    public id: number;
    public coef: number;
    public winCount: number;
    public win: number;
    public isWin: boolean;
    public results?: string;

    public constructor(init?: Partial<RaceOutcomeRecap>) { (Object as any).assign(this, init); }
}

export class RoundOutcome
{
    public raceOutcomeRecaps?: RaceOutcomeRecap[];
    public stake: number;
    public winnings: number;
    public balance: number;
    public returnToPlayer: number;

    public constructor(init?: Partial<RoundOutcome>) { (Object as any).assign(this, init); }
}

export class JackpotInfo
{
    public isGiven: boolean;
    public id?: string;
    public slipId?: string;
    public jpId?: string;
    public amount: number;
    public locationId?: string;
    public locationName?: string;
    public addressLine?: string;
    public amountAccumulated: number;

    public constructor(init?: Partial<JackpotInfo>) { (Object as any).assign(this, init); }
}

export class Race
{
    public id?: string;
    public sequence?: string;
    public inputAccumulation?: Pool[];
    public outputAccumulation?: Pool[];
    public outcome?: RoundOutcome;
    public jackpotInfo?: JackpotInfo;

    public constructor(init?: Partial<Race>) { (Object as any).assign(this, init); }
}

export class GetRace
{
    public id?: string;

    public constructor(init?: Partial<GetRace>) { (Object as any).assign(this, init); }
}

TypeScript GetRace DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
Content-Type: application/json
Content-Length: length

{"id":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
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}}