lichess_api/model/games/stream/add_ids.rs
1use crate::model::Body;
2use serde::Serialize;
3
4#[derive(Default, Clone, Debug, Serialize)]
5pub struct PostQuery;
6
7pub type PostRequest = crate::model::Request<PostQuery, Vec<String>>;
8
9impl PostRequest {
10 pub fn new(stream_id: &str, game_ids: Vec<String>) -> Self {
11 let path = format!("/api/stream/games/{}/add", stream_id);
12 Self::post(path, None, Body::PlainText(game_ids.join(",")), None)
13 }
14}