lichess-api 1.0.0

A client library for the Lichess API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::Serialize;

#[derive(Default, Clone, Debug, Serialize)]
pub struct GetQuery;

pub type GetRequest = crate::model::Request<GetQuery>;

impl GetRequest {
    pub fn new(id: u32) -> Self {
        Self::get(format!("/api/fide/player/{id}"), None, None)
    }
}

impl From<u32> for GetRequest {
    fn from(id: u32) -> Self {
        Self::new(id)
    }
}