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
use crate::model::{PerfType, Request};
use serde::Serialize;

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

pub type GetRequest = Request<GetQuery>;

impl GetRequest {
    pub fn new(player_count: u8, perf_type: PerfType) -> Self {
        let url = format!("/api/player/top/{player_count}/{perf_type}");
        Self::get(url, None, None)
    }
}