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
use crate::model::Request;
use crate::model::studies::PgnExportQuery;
use serde::Serialize;

#[derive(Default, Clone, Debug, Serialize)]
pub struct GetQuery {
    #[serde(flatten)]
    pub options: PgnExportQuery,
}

pub type GetRequest = Request<GetQuery>;

impl GetRequest {
    pub fn new(study_id: &str, query: GetQuery) -> Self {
        Self::get(format!("/api/study/{study_id}.pgn"), query, None)
    }
}