lichess_api/model/fide/
mod.rs

1pub mod player;
2pub mod search;
3
4use crate::model::Title;
5use serde::{Deserialize, Serialize};
6
7#[serde_with::skip_serializing_none]
8#[derive(Clone, Debug, Serialize, Deserialize)]
9pub struct Player {
10    pub id: u32,
11    pub name: String,
12    pub federation: Federation,
13    pub title: Option<Title>,
14    pub year: Option<u32>,
15    pub inactive: Option<bool>,
16    pub standard: Option<u32>,
17    pub rapid: Option<u32>,
18    pub blitz: Option<u32>,
19}
20
21#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Serialize)]
22#[serde(rename_all = "UPPERCASE")]
23pub enum Federation {
24    Ind,
25    Usa,
26    Rus,
27    Chn,
28    Nor,
29    Fra,
30    Ger,
31    Arm,
32    Aze,
33    Esp,
34    Nld,
35    Pol,
36    Hun,
37    Ukr,
38    Rou,
39    Cze,
40    Isr,
41    Ita,
42    Eng,
43    Geo,
44    Irn,
45    Uzb,
46    Vie,
47    Phi,
48    #[serde(other)]
49    Other,
50}