Betting.WebApi

<back to all web services

FindResponseMetrics

The following routes are available for this service:
All Verbs/qry//metrics/e2e/slips/responses
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 PaginatedQuery:
    current_page: int = 0
    page_size: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ResponseMetrics:
    id: int = 0
    rqc: int = 0
    oc: int = 0
    sc: int = 0
    tc: int = 0
    adr: int = 0


class TimeResolution(IntEnum):
    SECOND = 1
    MINUTE = 2
    HOUR = 5
    DAY = 10


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FindResponseMetrics(PaginatedQuery):
    resolution: Optional[TimeResolution] = None
    timepoint_from: int = 0
    timepoint_to: int = 0


T = TypeVar('T')


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PaginatedResult(Generic[T], IPaginatedResult):
    data: List[ResponseMetrics] = field(default_factory=list)
    current_page: int = 0
    page_size: int = 0
    total_items: int = 0
    total_pages: int = 0

Python FindResponseMetrics DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /qry//metrics/e2e/slips/responses HTTP/1.1 
Host: api.sbbet.ath.cx 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<FindResponseMetrics xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Betting.WebApi.ServiceModel">
  <CurrentPage>0</CurrentPage>
  <PageSize>0</PageSize>
  <Resolution>Second</Resolution>
  <TimepointFrom>0</TimepointFrom>
  <TimepointTo>0</TimepointTo>
</FindResponseMetrics>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PaginatedResultOfResponseMetricsrl_PWBLso xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Starnet.Common">
  <CurrentPage>0</CurrentPage>
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/Betting.ReadModel.E2E.SlipRequestMetrics">
    <d2p1:ResponseMetrics>
      <d2p1:Adr>0</d2p1:Adr>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Oc>0</d2p1:Oc>
      <d2p1:Rqc>0</d2p1:Rqc>
      <d2p1:Sc>0</d2p1:Sc>
      <d2p1:Tc>0</d2p1:Tc>
    </d2p1:ResponseMetrics>
  </Data>
  <PageSize>0</PageSize>
  <TotalItems>0</TotalItems>
  <TotalPages>0</TotalPages>
</PaginatedResultOfResponseMetricsrl_PWBLso>