Six4Win.WebApi

<back to all web services

GetFeedHeartbeat

The following routes are available for this service:
All Verbs/qry/feed/hb
#![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, Copy, PartialEq, Eq, Hash, Default)]
#[repr(i32)]
pub enum Stages {
    #[default]
    None = 0,
    Countdown = 1,
    Processing = 2,
    Draw = 3,
    Results = 4,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct Progress {
    pub step: i32,
    pub steps: i32,
    pub pct: f32,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct FeedHeartbeat {
    #[serde(rename = "roundId")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub round_id: Option<String>,
    pub stage: Stages,
    pub step: i32,
    pub steps: i32,
    #[serde(rename = "utcTimestamp")]
    pub utc_timestamp: String,
    #[serde(rename = "lockdownStepFromEnd")]
    pub lockdown_step_from_end: i32,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub overall: Option<Progress>,
    #[serde(rename = "isHappyHour")]
    pub is_happy_hour: bool,
}

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

Rust GetFeedHeartbeat DTOs

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

HTTP + OTHER

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

POST /qry/feed/hb HTTP/1.1 
Host: s4w1.api.bettor.webhop.biz 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

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

{"roundId":"String","stage":0,"step":0,"steps":0,"utcTimestamp":"0001-01-01T00:00:00.0000000Z","lockdownStepFromEnd":0,"overall":{"step":0,"steps":0,"pct":0},"isHappyHour":false}