| All Verbs | /rounds/race |
|---|
"use strict";
export class Pool {
/** @param {{id?:number,name?:string,coefficient?:number,rtp?:number,threshold?:number,balance?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {?string} */
name;
/** @type {number} */
coefficient;
/** @type {number} */
rtp;
/** @type {number} */
threshold;
/** @type {number} */
balance;
}
export class RaceOutcomeRecap {
/** @param {{id?:number,coef?:number,winCount?:number,win?:number,isWin?:boolean,results?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
coef;
/** @type {number} */
winCount;
/** @type {number} */
win;
/** @type {boolean} */
isWin;
/** @type {?string} */
results;
}
export class RoundOutcome {
/** @param {{raceOutcomeRecaps?:RaceOutcomeRecap[],stake?:number,winnings?:number,balance?:number,returnToPlayer?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?RaceOutcomeRecap[]} */
raceOutcomeRecaps;
/** @type {number} */
stake;
/** @type {number} */
winnings;
/** @type {number} */
balance;
/** @type {number} */
returnToPlayer;
}
export class JackpotInfo {
/** @param {{isGiven?:boolean,id?:string,slipId?:string,jpId?:string,amount?:number,locationId?:string,locationName?:string,addressLine?:string,amountAccumulated?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
isGiven;
/** @type {?string} */
id;
/** @type {?string} */
slipId;
/** @type {?string} */
jpId;
/** @type {number} */
amount;
/** @type {?string} */
locationId;
/** @type {?string} */
locationName;
/** @type {?string} */
addressLine;
/** @type {number} */
amountAccumulated;
}
export class Race {
/** @param {{id?:string,sequence?:string,inputAccumulation?:Pool[],outputAccumulation?:Pool[],outcome?:RoundOutcome,jackpotInfo?:JackpotInfo}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
id;
/** @type {?string} */
sequence;
/** @type {?Pool[]} */
inputAccumulation;
/** @type {?Pool[]} */
outputAccumulation;
/** @type {?RoundOutcome} */
outcome;
/** @type {?JackpotInfo} */
jackpotInfo;
}
export class GetRace {
/** @param {{id?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
id;
}
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
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}}