lichess_api/model/bot/
online.rs1use crate::model::Request;
2use serde::Serialize;
3
4#[derive(Default, Clone, Debug, Serialize)]
5pub struct GetQuery {
6 pub nb: u32,
7}
8
9pub type GetRequest = Request<GetQuery>;
10
11impl GetRequest {
12 pub fn new(bot_count: u32) -> Self {
13 Self::get("/api/bot/online", GetQuery { nb: bot_count }, None)
14 }
15}
16
17impl From<u32> for GetRequest {
18 fn from(bot_count: u32) -> Self {
19 Self::new(bot_count)
20 }
21}
22
23pub type OnlineBot = crate::model::users::User;