Six4Win.WebApi

<back to all web services

GetRoundIntegrity

The following routes are available for this service:
All Verbs/qry/rounds/integrity
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


class CheckStatus(IntEnum):
    OK = 1
    ERROR = 2


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BettingApp:
    name: Optional[str] = None
    version: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Ref:
    id: Optional[str] = None
    val: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RefEx(Ref):
    data: Optional[RecordDictionary[str, str]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Origin:
    application: Optional[BettingApp] = None
    ip: Optional[str] = None
    organization: Optional[RefEx] = None
    region: Optional[Ref] = None
    location_group: Optional[Ref] = None
    location: Optional[RefEx] = None
    device: Optional[RefEx] = None
    clerk: Optional[Ref] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class JackPot5Winner:
    bet_id: Optional[str] = None
    nr_of_combinations: int = 0
    winnings_amount: Decimal = decimal.Decimal(0)
    origin: Optional[Origin] = None
    bettor: Optional[Ref] = None
    payload: Optional[Dict[str, str]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Jackpot5Info:
    is_hit: bool = False
    amount_accumulated: Decimal = decimal.Decimal(0)
    amount_awarded: Decimal = decimal.Decimal(0)
    nr_of_winners: int = 0
    jack_pot5_winners: Optional[List[JackPot5Winner]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RoundIntegrityCheckResult:
    status: Optional[CheckStatus] = None
    extra_winnings: Decimal = decimal.Decimal(0)
    bet_count: int = 0
    jp_info: Optional[Jackpot5Info] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetRoundIntegrity:
    round_id: Optional[str] = None


TKey = TypeVar('TKey')
TVal = TypeVar('TVal')


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RecordDictionary(Generic[TKey, TVal], Dict[TKey,TVal]):
    pass

Python GetRoundIntegrity 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/integrity HTTP/1.1 
Host: s4w2.api.bettor.cc 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

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

{
	status: 1,
	extraWinnings: 0,
	betCount: 0,
	jpInfo: 
	{
		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
				}
			}
		]
	}
}