Skip to main content

lichess_api/model/studies/
study_metadata.rs

1use crate::model::Request;
2use serde::Serialize;
3
4#[derive(Default, Clone, Debug, Serialize)]
5pub struct HeadQuery;
6
7pub type HeadRequest = Request<HeadQuery>;
8
9impl HeadRequest {
10    pub fn new(study_id: &str) -> Self {
11        Self::head(format!("/api/study/{study_id}.pgn"), None, None)
12    }
13}
14
15impl<S: AsRef<str>> From<S> for HeadRequest {
16    fn from(study_id: S) -> Self {
17        Self::new(study_id.as_ref())
18    }
19}