Six4Win.WebApi

<back to all web services

GetLastRoundsStats

The following routes are available for this service:
All Verbs/qry/stats/last10
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 Rating:
    val: int = 0
    count: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Comparison:
    v1: int = 0
    v2: int = 0
    p1: float = 0.0
    p2: float = 0.0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class LastRoundsStats:
    id: Optional[str] = None
    top_six: Optional[List[int]] = None
    bottom_six: Optional[List[int]] = None
    top_first_colors: Optional[List[Rating]] = None
    top_colors: Optional[List[Rating]] = None
    first_nr_even_vs_odd: Optional[Comparison] = None
    first_nr_less_vs_greater24_5: Optional[Comparison] = None
    sum_of_first_five_less_vs_greater_than122_5: Optional[Comparison] = None
    total_even_vs_odd: Optional[Comparison] = None


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

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

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

{
	id: String,
	topSix: 
	[
		0
	],
	bottomSix: 
	[
		0
	],
	topFirstColors: 
	[
		{
			val: 0,
			count: 0
		}
	],
	topColors: 
	[
		{
			val: 0,
			count: 0
		}
	],
	firstNrEvenVsOdd: 
	{
		v1: 0,
		v2: 0,
		p1: 0,
		p2: 0
	},
	firstNrLessVsGreater24_5: 
	{
		v1: 0,
		v2: 0,
		p1: 0,
		p2: 0
	},
	sumOfFirstFiveLessVsGreaterThan122_5: 
	{
		v1: 0,
		v2: 0,
		p1: 0,
		p2: 0
	},
	totalEvenVsOdd: 
	{
		v1: 0,
		v2: 0,
		p1: 0,
		p2: 0
	}
}