Six4Win.WebApi

<back to all web services

GetRecentGlobalCodePotWinners

The following routes are available for this service:
GET/qry/recentGlobalCodePotWinners
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


@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 WinnerByCode:
    round_id: Optional[str] = None
    drawn_at_utc: datetime.datetime = datetime.datetime(1, 1, 1)
    slip_id: Optional[str] = None
    bet_id: Optional[str] = None
    code: Optional[str] = None
    amount: Decimal = decimal.Decimal(0)
    origin: Optional[Origin] = None
    bettor: Optional[Ref] = None
    location_address_or_bettor_info: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RecentGlobalCodePotWinners:
    id: Optional[str] = None
    recent_winners: Optional[List[WinnerByCode]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetRecentGlobalCodePotWinners:
    pass


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 GetRecentGlobalCodePotWinners 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.

GET /qry/recentGlobalCodePotWinners HTTP/1.1 
Host: s4w2.api.bettor.cc 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: RecentGlobalCodePotWinners-1,
	recentWinners: []
}