| All Verbs | /feed/odds |
|---|
"use strict";
/** @typedef {number} */
export var RoundStatus;
(function (RoundStatus) {
RoundStatus[RoundStatus["Pending"] = 0] = "Pending"
RoundStatus[RoundStatus["InProgress"] = 1] = "InProgress"
RoundStatus[RoundStatus["Ended"] = 2] = "Ended"
})(RoundStatus || (RoundStatus = {}));
/** @typedef {number} */
export var RTPStrategies;
(function (RTPStrategies) {
RTPStrategies[RTPStrategies["RNG"] = 0] = "RNG"
RTPStrategies[RTPStrategies["Default"] = 1] = "Default"
})(RTPStrategies || (RTPStrategies = {}));
export class RoundConfiguration {
/** @param {{countdownDurationInSeconds?:number,raceDurationInSeconds?:number,resultsDurationInSeconds?:number,rtpStrategy?:RTPStrategies}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
countdownDurationInSeconds;
/** @type {number} */
raceDurationInSeconds;
/** @type {number} */
resultsDurationInSeconds;
/** @type {RTPStrategies} */
rtpStrategy;
}
/** @typedef {number} */
export var OutcomeStatus;
(function (OutcomeStatus) {
OutcomeStatus[OutcomeStatus["Unknown"] = 0] = "Unknown"
OutcomeStatus[OutcomeStatus["Lost"] = 1] = "Lost"
OutcomeStatus[OutcomeStatus["Won"] = 2] = "Won"
OutcomeStatus[OutcomeStatus["Void"] = 3] = "Void"
})(OutcomeStatus || (OutcomeStatus = {}));
export class Outcome {
/** @param {{id?:number,odds?:number,status?:OutcomeStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
odds;
/** @type {OutcomeStatus} */
status;
}
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;
}
/** @typedef {number} */
export var Stages;
(function (Stages) {
Stages[Stages["None"] = 0] = "None"
Stages[Stages["Countdown"] = 1] = "Countdown"
Stages[Stages["Processing"] = 2] = "Processing"
Stages[Stages["Race"] = 3] = "Race"
Stages[Stages["Results"] = 4] = "Results"
})(Stages || (Stages = {}));
export class RoundProgress {
/** @param {{stage?:Stages,step?:number,steps?:number,utcTimestamp?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Stages} */
stage;
/** @type {number} */
step;
/** @type {number} */
steps;
/** @type {string} */
utcTimestamp;
}
export class Round {
/** @param {{id?:string,createdAt?:string,updatedAt?:string,status?:RoundStatus,configuration?:RoundConfiguration,odds?:{ [index:number]: Outcome; },jackpotInfo?:JackpotInfo,sequence?:string,progress?:RoundProgress,isLocked?:boolean,isCalculated?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
id;
/** @type {string} */
createdAt;
/** @type {string} */
updatedAt;
/** @type {RoundStatus} */
status;
/** @type {?RoundConfiguration} */
configuration;
/** @type {?{ [index:number]: Outcome; }} */
odds;
/** @type {?JackpotInfo} */
jackpotInfo;
/** @type {?string} */
sequence;
/** @type {?RoundProgress} */
progress;
/** @type {boolean} */
isLocked;
/** @type {boolean} */
isCalculated;
}
export class AvailableRounds {
/** @param {{id?:string,rounds?:Round[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
id;
/** @type {?Round[]} */
rounds;
}
export class GetOdds {
constructor(init) { Object.assign(this, init) }
}
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 /feed/odds HTTP/1.1
Host: grh1.api.bettor.webhop.biz
Accept: application/json
Content-Type: application/json
Content-Length: length
{}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"String","rounds":[{"id":"String","odds":[{"id":0,"val":0}]}]}