Six4Win.WebApi

<back to all web services

GetLastRoundsStats

The following routes are available for this service:
All Verbs/qry/stats/last10
#![allow(
    dead_code,
    non_camel_case_types,
    non_snake_case,
    clippy::upper_case_acronyms
)]

use serde::{Deserialize, Serialize};
use serde_json::Value;
use std::collections::HashMap;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct Rating {
    pub val: i32,
    pub count: i32,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct Comparison {
    pub v1: i32,
    pub v2: i32,
    pub p1: f32,
    pub p2: f32,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct LastRoundsStats {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "topSix")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub top_six: Option<Vec<i32>>,
    #[serde(rename = "bottomSix")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bottom_six: Option<Vec<i32>>,
    #[serde(rename = "topFirstColors")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub top_first_colors: Option<Vec<Rating>>,
    #[serde(rename = "topColors")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub top_colors: Option<Vec<Rating>>,
    #[serde(rename = "firstNrEvenVsOdd")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub first_nr_even_vs_odd: Option<Comparison>,
    #[serde(rename = "firstNrLessVsGreater24_5")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub first_nr_less_vs_greater24_5: Option<Comparison>,
    #[serde(rename = "sumOfFirstFiveLessVsGreaterThan122_5")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sum_of_first_five_less_vs_greater_than122_5: Option<Comparison>,
    #[serde(rename = "totalEvenVsOdd")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub total_even_vs_odd: Option<Comparison>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct GetLastRoundsStats {}

Rust GetLastRoundsStats DTOs

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

HTTP + CSV

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: s4w1.api.bettor.webhop.biz 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/csv
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}}