| All Verbs | /qry/rounds/draw |
|---|
"use strict";
export class Pool {
/** @param {{id?:number,name?:string,coefficient?:number,rtp?:number,threshold?:number,balance?:number,rrtp?:number,rBalance?: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;
/** @type {number} */
rrtp;
/** @type {number} */
rBalance;
}
export class DrawItem {
/** @param {{ordinal?:number,number?:number,coefficient?:number,isDoubleTriple?:boolean,constitutesJackpot?:boolean,hits?:number,win?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ordinal;
/** @type {number} */
number;
/** @type {number} */
coefficient;
/** @type {boolean} */
isDoubleTriple;
/** @type {boolean} */
constitutesJackpot;
/** @type {number} */
hits;
/** @type {number} */
win;
}
/** @typedef {number} */
export var CustomBetType;
(function (CustomBetType) {
CustomBetType[CustomBetType["FirstNumberOdd"] = 4] = "FirstNumberOdd"
CustomBetType[CustomBetType["FirstNumberEven"] = 5] = "FirstNumberEven"
CustomBetType[CustomBetType["FirstNumberLessThan24_5"] = 6] = "FirstNumberLessThan24_5"
CustomBetType[CustomBetType["FirstNumberGreaterThan24_5"] = 7] = "FirstNumberGreaterThan24_5"
CustomBetType[CustomBetType["SumOfFirstFiveLessThan122_5"] = 8] = "SumOfFirstFiveLessThan122_5"
CustomBetType[CustomBetType["SumOfFirstFiveGreaterThan122_5"] = 9] = "SumOfFirstFiveGreaterThan122_5"
CustomBetType[CustomBetType["FirstColor1"] = 10] = "FirstColor1"
CustomBetType[CustomBetType["FirstColor2"] = 11] = "FirstColor2"
CustomBetType[CustomBetType["FirstColor3"] = 12] = "FirstColor3"
CustomBetType[CustomBetType["FirstColor4"] = 13] = "FirstColor4"
CustomBetType[CustomBetType["FirstColor5"] = 14] = "FirstColor5"
CustomBetType[CustomBetType["FirstColor6"] = 15] = "FirstColor6"
CustomBetType[CustomBetType["FirstColor7"] = 16] = "FirstColor7"
CustomBetType[CustomBetType["FirstColor8"] = 17] = "FirstColor8"
CustomBetType[CustomBetType["MoreOddNumbers"] = 18] = "MoreOddNumbers"
CustomBetType[CustomBetType["MoreEvenNumbers"] = 19] = "MoreEvenNumbers"
})(CustomBetType || (CustomBetType = {}));
export class CustomBetOutcome {
/** @param {{type?:CustomBetType,coef?:number,winCount?:number,win?:number,isWin?:boolean,results?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {CustomBetType} */
type;
/** @type {number} */
coef;
/** @type {number} */
winCount;
/** @type {number} */
win;
/** @type {boolean} */
isWin;
/** @type {string} */
results;
}
export class BettingApp {
/** @param {{name?:string,version?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
/** @type {string} */
version;
}
export class Ref {
/** @param {{id?:string,val?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
val;
}
export class RefEx extends Ref {
/** @param {{data?:RecordDictionary<string, string>,id?:string,val?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {RecordDictionary<string, string>} */
data;
}
export class Origin {
/** @param {{application?:BettingApp,ip?:string,organization?:RefEx,region?:Ref,locationGroup?:Ref,location?:RefEx,device?:RefEx,clerk?:Ref}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BettingApp} */
application;
/** @type {string} */
ip;
/** @type {RefEx} */
organization;
/** @type {Ref} */
region;
/** @type {Ref} */
locationGroup;
/** @type {RefEx} */
location;
/** @type {RefEx} */
device;
/** @type {Ref} */
clerk;
}
export class WinnerByCode {
/** @param {{roundId?:string,drawnAtUtc?:string,slipId?:string,betId?:string,code?:string,amount?:number,origin?:Origin,bettor?:Ref,locationAddressOrBettorInfo?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
roundId;
/** @type {string} */
drawnAtUtc;
/** @type {string} */
slipId;
/** @type {string} */
betId;
/** @type {string} */
code;
/** @type {number} */
amount;
/** @type {Origin} */
origin;
/** @type {Ref} */
bettor;
/** @type {string} */
locationAddressOrBettorInfo;
}
export class SuperWinWinner {
/** @param {{isDrawn?:boolean,drawnAtUtc?:string,roundId?:string,betId?:string,slipId?:string,origin?:Origin,bettor?:Ref,code?:string,amount?:number,locationAddressOrBettorInfo?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
isDrawn;
/** @type {string} */
drawnAtUtc;
/** @type {string} */
roundId;
/** @type {string} */
betId;
/** @type {string} */
slipId;
/** @type {Origin} */
origin;
/** @type {Ref} */
bettor;
/** @type {string} */
code;
/** @type {number} */
amount;
/** @type {string} */
locationAddressOrBettorInfo;
}
export class SuperWinInfo {
/** @param {{isActive?:boolean,winner?:SuperWinWinner,availableAmount?:number,allPrizesAwarded?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
isActive;
/** @type {SuperWinWinner} */
winner;
/** @type {number} */
availableAmount;
/** @type {boolean} */
allPrizesAwarded;
}
export class JackPot5Winner {
/** @param {{betId?:string,nrOfCombinations?:number,winningsAmount?:number,origin?:Origin,bettor?:Ref,payload?:{ [index:string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
betId;
/** @type {number} */
nrOfCombinations;
/** @type {number} */
winningsAmount;
/** @type {Origin} */
origin;
/** @type {Ref} */
bettor;
/** @type {{ [index:string]: string; }} */
payload;
}
export class Jackpot5Info {
/** @param {{isHit?:boolean,amountAccumulated?:number,amountAwarded?:number,nrOfWinners?:number,jackPot5Winners?:JackPot5Winner[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
isHit;
/** @type {number} */
amountAccumulated;
/** @type {number} */
amountAwarded;
/** @type {number} */
nrOfWinners;
/** @type {JackPot5Winner[]} */
jackPot5Winners;
}
export class GlobalCodePotInfo {
/** @param {{isActive?:boolean,isDrawn?:boolean,winner?:WinnerByCode,inertCode?:string,accumulation?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
isActive;
/** @type {boolean} */
isDrawn;
/** @type {WinnerByCode} */
winner;
/** @type {string} */
inertCode;
/** @type {number} */
accumulation;
}
export class RoundOutcome {
/** @param {{draw?:DrawItem[],customBetOutcomes?:CustomBetOutcome[],lcpWinners?:WinnerByCode[],superWinInfo?:SuperWinInfo,jackpot5Info?:Jackpot5Info,globalCodePotInfo?:GlobalCodePotInfo,stake?:number,betCount?:number,winnings?:number,balance?:number,returnToPlayer?:number,winCount?:number,slipWinCount?:number,winCountPct?:number,slipCount?:number,unitBetCount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {DrawItem[]} */
draw;
/** @type {CustomBetOutcome[]} */
customBetOutcomes;
/** @type {WinnerByCode[]} */
lcpWinners;
/** @type {SuperWinInfo} */
superWinInfo;
/** @type {Jackpot5Info} */
jackpot5Info;
/** @type {GlobalCodePotInfo} */
globalCodePotInfo;
/** @type {number} */
stake;
/** @type {number} */
betCount;
/** @type {number} */
winnings;
/** @type {number} */
balance;
/** @type {number} */
returnToPlayer;
/** @type {number} */
winCount;
/** @type {number} */
slipWinCount;
/** @type {number} */
winCountPct;
/** @type {number} */
slipCount;
/** @type {number} */
unitBetCount;
}
export class Draw {
/** @param {{id?:string,sequence?:string,inputAccumulation?:Pool[],outputAccumulation?:Pool[],outcome?:RoundOutcome}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
sequence;
/** @type {Pool[]} */
inputAccumulation;
/** @type {Pool[]} */
outputAccumulation;
/** @type {RoundOutcome} */
outcome;
}
export class GetDraw {
/** @param {{id?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
}
class Dictionary {}
/** @typedef TKey {any} */
/** @typedef TVal {any} */
export class RecordDictionary extends Dictionary {
constructor(init) { super(init); Object.assign(this, init) }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/rounds/draw HTTP/1.1
Host: s4w2.api.bettor.cc
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,
reserveAmount: 0
}
],
outputAccumulation:
[
{
id: 0,
name: String,
amount: 0,
reserveAmount: 0
}
],
outcome:
{
draw:
[
{
ordinal: 0,
number: 0,
coefficient: 0,
isDoubleTriple: False,
constitutesJackpot: False,
hits: 0,
win: 0
}
],
customBetOutcomes:
[
{
type: 4,
coef: 0,
winCount: 0,
win: 0,
isWin: False,
results: String
}
],
lcpWinners:
[
{
roundId: String,
drawnAtUtc: 0001-01-01,
slipId: String,
betId: String,
code: String,
amount: 0,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
locationAddressOrBettorInfo: String
}
],
superWinInfo:
{
isActive: False,
winner:
{
isDrawn: False,
drawnAtUtc: 0001-01-01,
roundId: String,
betId: String,
slipId: String,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
code: String,
amount: 0,
locationAddressOrBettorInfo: String
},
availableAmount: 0,
allPrizesAwarded: False
},
jackpot5Info:
{
isHit: False,
amountAccumulated: 0,
amountAwarded: 0,
nrOfWinners: 0,
jackPot5Winners:
[
{
betId: String,
nrOfCombinations: 0,
winningsAmount: 0,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
payload:
{
String: String
}
}
]
},
globalCodePotInfo:
{
isActive: False,
isDrawn: True,
winner:
{
roundId: String,
drawnAtUtc: 0001-01-01,
slipId: String,
betId: String,
code: String,
amount: 0,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
locationAddressOrBettorInfo: String
},
inertCode: String,
accumulation: 0
},
stake: 0,
betCount: 0,
winnings: 0,
balance: 0,
returnToPlayer: 0,
winCount: 0,
slipWinCount: 0,
winCountPct: 0,
slipCount: 0,
unitBetCount: 0
}
}