Six4Win.WebApi

<back to all web services

GetDraw

The following routes are available for this service:
All Verbs/qry/rounds/draw
const std = @import("std");

pub const Pool = struct {
    id: i32 = 0,
    name: ?[]const u8 = null,
    coefficient: f64 = 0,
    rtp: f64 = 0,
    threshold: f64 = 0,
    balance: f64 = 0,
    rrtp: f64 = 0,
    rBalance: f64 = 0,
};

pub const DrawItem = struct {
    ordinal: i32 = 0,
    number: i32 = 0,
    coefficient: f32 = 0,
    isDoubleTriple: bool = false,
    constitutesJackpot: bool = false,
    hits: i32 = 0,
    win: f64 = 0,
};

pub const CustomBetType = enum(i32) {
    FirstNumberOdd = 4,
    FirstNumberEven = 5,
    FirstNumberLessThan24_5 = 6,
    FirstNumberGreaterThan24_5 = 7,
    SumOfFirstFiveLessThan122_5 = 8,
    SumOfFirstFiveGreaterThan122_5 = 9,
    FirstColor1 = 10,
    FirstColor2 = 11,
    FirstColor3 = 12,
    FirstColor4 = 13,
    FirstColor5 = 14,
    FirstColor6 = 15,
    FirstColor7 = 16,
    FirstColor8 = 17,
    MoreOddNumbers = 18,
    MoreEvenNumbers = 19,
};

pub const CustomBetOutcome = struct {
    type: ?CustomBetType = null,
    coef: f32 = 0,
    winCount: i32 = 0,
    win: f64 = 0,
    isWin: bool = false,
    results: ?[]const u8 = null,
};

pub const BettingApp = struct {
    name: ?[]const u8 = null,
    version: ?[]const u8 = null,
};

pub const Ref = struct {
    id: ?[]const u8 = null,
    val: ?[]const u8 = null,
};

pub const RefEx = struct {
    id: ?[]const u8 = null,
    val: ?[]const u8 = null,
    data: ?RecordDictionary = null,
};

pub const Origin = struct {
    application: ?BettingApp = null,
    ip: ?[]const u8 = null,
    organization: ?RefEx = null,
    region: ?Ref = null,
    locationGroup: ?Ref = null,
    location: ?RefEx = null,
    device: ?RefEx = null,
    clerk: ?Ref = null,
};

pub const WinnerByCode = struct {
    roundId: ?[]const u8 = null,
    drawnAtUtc: ?[]const u8 = null,
    slipId: ?[]const u8 = null,
    betId: ?[]const u8 = null,
    code: ?[]const u8 = null,
    amount: f64 = 0,
    origin: ?Origin = null,
    bettor: ?Ref = null,
    locationAddressOrBettorInfo: ?[]const u8 = null,
};

pub const SuperWinWinner = struct {
    isDrawn: bool = false,
    drawnAtUtc: ?[]const u8 = null,
    roundId: ?[]const u8 = null,
    betId: ?[]const u8 = null,
    slipId: ?[]const u8 = null,
    origin: ?Origin = null,
    bettor: ?Ref = null,
    code: ?[]const u8 = null,
    amount: f64 = 0,
    locationAddressOrBettorInfo: ?[]const u8 = null,
};

pub const SuperWinInfo = struct {
    isActive: bool = false,
    winner: ?SuperWinWinner = null,
    availableAmount: f64 = 0,
    allPrizesAwarded: bool = false,
};

pub const JackPot5Winner = struct {
    betId: ?[]const u8 = null,
    nrOfCombinations: i32 = 0,
    winningsAmount: f64 = 0,
    origin: ?Origin = null,
    bettor: ?Ref = null,
    payload: ?std.json.Value = null,
};

pub const Jackpot5Info = struct {
    isHit: bool = false,
    amountAccumulated: f64 = 0,
    amountAwarded: f64 = 0,
    nrOfWinners: i32 = 0,
    jackPot5Winners: ?[]JackPot5Winner = null,
};

pub const GlobalCodePotInfo = struct {
    isActive: bool = false,
    isDrawn: bool = false,
    winner: ?WinnerByCode = null,
    inertCode: ?[]const u8 = null,
    accumulation: f64 = 0,
};

pub const RoundOutcome = struct {
    draw: ?[]DrawItem = null,
    customBetOutcomes: ?[]CustomBetOutcome = null,
    lcpWinners: ?[]WinnerByCode = null,
    superWinInfo: ?SuperWinInfo = null,
    jackpot5Info: ?Jackpot5Info = null,
    globalCodePotInfo: ?GlobalCodePotInfo = null,
    stake: f64 = 0,
    betCount: i32 = 0,
    winnings: f64 = 0,
    balance: f64 = 0,
    returnToPlayer: f64 = 0,
    winCount: i32 = 0,
    slipWinCount: i32 = 0,
    winCountPct: f32 = 0,
    slipCount: i32 = 0,
    unitBetCount: i32 = 0,
};

pub const Draw = struct {
    id: ?[]const u8 = null,
    sequence: ?[]const u8 = null,
    inputAccumulation: ?[]Pool = null,
    outputAccumulation: ?[]Pool = null,
    outcome: ?RoundOutcome = null,
};

pub const GetDraw = struct {
    id: ?[]const u8 = null,
};

pub fn RecordDictionary(comptime TKey: type, comptime TVal: type) type {
    _ = TKey;
    _ = TVal;
    return struct {};
}

Zig GetDraw DTOs

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

HTTP + 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.webhop.biz 
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
	}
}