Skip to main content

lichess_api/model/arena_tournaments/
teams.rs

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