| All Verbs | /feed |
|---|
"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 Feed {
/** @param {{id?:string,round?:Round,lastJackpotInfo?:JackpotInfo}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
id;
/** @type {?Round} */
round;
/** @type {?JackpotInfo} */
lastJackpotInfo;
}
export class GetFeed {
constructor(init) { Object.assign(this, init) }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /feed HTTP/1.1
Host: grh1.api.bettor.webhop.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetFeed xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.WebApi.ServiceModel" />
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<Feed xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.ReadModel">
<Id>String</Id>
<LastJackpotInfo>
<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>
</LastJackpotInfo>
<Round>
<Configuration>
<CountdownDurationInSeconds>0</CountdownDurationInSeconds>
<RTPStrategy>RNG</RTPStrategy>
<RaceDurationInSeconds>0</RaceDurationInSeconds>
<ResultsDurationInSeconds>0</ResultsDurationInSeconds>
</Configuration>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<Id>String</Id>
<IsCalculated>false</IsCalculated>
<IsLocked>false</IsLocked>
<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>
<Odds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfintRound.OutcomeBB7LCH9U>
<d3p1:Key>0</d3p1:Key>
<d3p1:Value>
<Id>0</Id>
<Odds>0</Odds>
<Status>Unknown</Status>
</d3p1:Value>
</d3p1:KeyValueOfintRound.OutcomeBB7LCH9U>
</Odds>
<Progress>
<Stage>None</Stage>
<Step>0</Step>
<Steps>0</Steps>
<UTCTimestamp>0001-01-01T00:00:00</UTCTimestamp>
</Progress>
<Sequence>String</Sequence>
<Status>Pending</Status>
<UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
</Round>
</Feed>