Skip to main content

lichess_api/model/swiss_tournaments/
withdraw.rs

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