Six4Win.WebApi

<back to all web services

GetSuperWinConfiguration

The following routes are available for this service:
All Verbs/qry/super-win/config
package dtos

import (
	"time"
)

type SuperWinPoolState int

const (
	SuperWinPoolStateIdle         SuperWinPoolState = 0
	SuperWinPoolStateAccumulating SuperWinPoolState = 1
	SuperWinPoolStateAwarding     SuperWinPoolState = 2
)

type BettingApp struct {
	Name    *string `json:"name,omitempty"`
	Version *string `json:"version,omitempty"`
}

type Ref struct {
	Id  string `json:"id"`
	Val string `json:"val"`
}

type RefEx struct {
	Ref
	Data RecordDictionary[string, string] `json:"data"`
}

type Origin struct {
	Application   *BettingApp `json:"application,omitempty"`
	Ip            *string     `json:"ip,omitempty"`
	Organization  *RefEx      `json:"organization,omitempty"`
	Region        *Ref        `json:"region,omitempty"`
	LocationGroup *Ref        `json:"locationGroup,omitempty"`
	Location      *RefEx      `json:"location,omitempty"`
	Device        *RefEx      `json:"device,omitempty"`
	Clerk         *Ref        `json:"clerk,omitempty"`
}

type SuperWinWinner struct {
	IsDrawn                     bool      `json:"isDrawn,omitempty"`
	DrawnAtUtc                  time.Time `json:"drawnAtUtc,omitempty"`
	RoundId                     *string   `json:"roundId,omitempty"`
	BetId                       *string   `json:"betId,omitempty"`
	SlipId                      *string   `json:"slipId,omitempty"`
	Origin                      *Origin   `json:"origin,omitempty"`
	Bettor                      *Ref      `json:"bettor,omitempty"`
	Code                        *string   `json:"code,omitempty"`
	Amount                      float64   `json:"amount,omitempty"`
	LocationAddressOrBettorInfo *string   `json:"locationAddressOrBettorInfo,omitempty"`
}

type SuperWinPrize struct {
	Id          int             `json:"id,omitempty"`
	Amount      float64         `json:"amount,omitempty"`
	ScheduledAt time.Time       `json:"scheduledAt,omitempty"`
	Winner      *SuperWinWinner `json:"winner,omitempty"`
}

type SuperWinPool struct {
	Id       int                        `json:"id,omitempty"`
	State    SuperWinPoolState          `json:"state,omitempty"`
	Amount   float64                    `json:"amount,omitempty"`
	Schedule *RecordList[SuperWinPrize] `json:"schedule,omitempty"`
}

type SuperWinState struct {
	CurrentDate     *string                              `json:"currentDate,omitempty"`
	AvailableAmount float64                              `json:"availableAmount,omitempty"`
	Pools           *RecordDictionary[int, SuperWinPool] `json:"pools,omitempty"`
}

type SuperWinStateDoc struct {
	Id           *string        `json:"id,omitempty"`
	State        *SuperWinState `json:"state,omitempty"`
	ChangeVector *string        `json:"changeVector,omitempty"`
}

type GetSuperWinConfiguration struct {
}

type RecordDictionary[TKey any, TVal any] map[TKey]TVal

type RecordList[T any] []T

Go GetSuperWinConfiguration 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/config HTTP/1.1 
Host: s4w2.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
}