use serde::Deserialize;
use time::OffsetDateTime;
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "api_debug", serde(deny_unknown_fields))]
pub struct UserSettings {
pub user_number: i64,
pub name: String,
pub username: String,
pub image: String,
pub header_image: Option<String>,
pub offline_image: Option<String>,
pub bio: Option<String>,
pub pronouns: Option<String>,
pub bluesky_url: Option<String>,
pub website_url: Option<String>,
pub discord_url: Option<String>,
pub kofi_url: Option<String>,
pub chat_color: Option<String>,
pub gaming_shelf: Vec<GameInfo>,
#[serde(with = "time::serde::iso8601")]
pub created_at: OffsetDateTime,
#[serde(with = "time::serde::iso8601::option")]
pub followed_at: Option<OffsetDateTime>,
#[serde(with = "time::serde::iso8601::option")]
pub banned_until: Option<OffsetDateTime>,
pub is_subscriber: bool,
pub is_alt_stream_supporter: bool,
pub is_channel_supporter: bool,
pub is_site_admin: bool,
pub tester_badge: Option<String>,
pub channel_points_name: Option<String>,
pub referral_count: u64,
pub is_referral_badge_unlocked: bool,
}
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "api_debug", serde(deny_unknown_fields))]
pub struct ChannelEmotes {
pub channel: String,
pub emotes: Vec<ChannelEmoteInfo>,
}
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "api_debug", serde(deny_unknown_fields))]
pub struct ChannelEmoteInfo {
pub id: i64,
pub name: String,
pub url: String,
pub display_order: i64,
}
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "api_debug", serde(deny_unknown_fields))]
pub struct ChannelRewards {
pub channel: String,
pub rewards: Vec<ChannelRewardInfo>,
}
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "api_debug", serde(deny_unknown_fields))]
pub struct ChannelRewardInfo {
pub id: i64,
pub name: String,
pub description: Option<String>,
pub cost: u64,
pub enabled: bool,
pub is_highlight: bool,
pub cooldown_seconds: Option<u64>,
pub global_cooldown_seconds: Option<u64>,
pub max_per_stream: Option<u64>,
pub max_global_per_stream: Option<u64>,
}
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "api_debug", serde(deny_unknown_fields))]
pub struct Panels {
pub channel: String,
pub panels: Vec<PanelInfo>,
}
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "api_debug", serde(deny_unknown_fields))]
pub struct PanelInfo {
pub id: i64,
pub slug: String,
pub title: String,
pub content: String, pub display_order: i64,
}
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "api_debug", serde(deny_unknown_fields))]
pub struct ChannelInfo {
pub avatar_url: String,
pub bio: Option<String>,
#[serde(with = "time::serde::iso8601")]
pub created_at: OffsetDateTime,
pub display_name: String,
pub stream: StreamInfo,
pub username: String,
}
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "api_debug", serde(deny_unknown_fields))]
pub struct StreamInfo {
pub is_live: bool,
#[serde(with = "time::serde::iso8601::option")]
pub started_at: Option<OffsetDateTime>,
pub title: String,
#[serde(rename = "viewers")]
pub viewer_count: u64,
pub game: Option<GameInfo>,
pub tags: Vec<String>,
}
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "api_debug", serde(deny_unknown_fields))]
pub struct StreamTags {
pub channel: String,
pub tags: Vec<String>,
}
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "api_debug", serde(deny_unknown_fields))]
pub struct GameInfo {
pub id: i64,
pub igdb_id: Option<i64>,
pub name: String,
pub summary: Option<String>,
pub slug: String,
pub cover_url: Option<String>,
pub ai_details: Option<serde_json::Value>, pub ai_disclosed: Option<bool>,
pub steam_app_id: Option<String>, pub has_steam_disclosure: Option<bool>,
}