Six4Win.WebApi

<back to all web services

GetSuperWinAccumulations

The following routes are available for this service:
All Verbs/qry/super-win/accumulations
const std = @import("std");

pub const SuperWinPoolState = enum(i32) {
    Idle = 0,
    Accumulating = 1,
    Awarding = 2,
};

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 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 SuperWinPrize = struct {
    id: i32 = 0,
    amount: f64 = 0,
    scheduledAt: ?[]const u8 = null,
    winner: ?SuperWinWinner = null,
};

pub const SuperWinPool = struct {
    id: i32 = 0,
    state: ?SuperWinPoolState = null,
    amount: f64 = 0,
    schedule: ?RecordList = null,
};

pub const SuperWinState = struct {
    currentDate: ?[]const u8 = null,
    availableAmount: f64 = 0,
    pools: ?RecordDictionary = null,
};

pub const SuperWinStateDoc = struct {
    id: ?[]const u8 = null,
    state: ?SuperWinState = null,
    changeVector: ?[]const u8 = null,
};

pub const GetSuperWinAccumulations = struct {};

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

pub fn RecordList(comptime T: type) type {
    _ = T;
    return struct {
        pub const ss_collection = "items";

        items: []T = &.{},
    };

Zig GetSuperWinAccumulations 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/super-win/accumulations HTTP/1.1 
Host: s4w1.api.bettor.webhop.biz 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	state: 
	{
		currentDate: String,
		availableAmount: 0,
		pools: 
		{
			0: 
			{
				id: 0,
				state: 0,
				amount: 0,
				schedule: 
				[
					{
						id: 0,
						amount: 0,
						scheduledAt: 0001-01-01,
						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
						}
					}
				]
			}
		}
	},
	changeVector: String
}