Skip to main content

nil_client/client/infrastructure/
mod.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4mod academy;
5mod prefecture;
6mod stable;
7mod workshop;
8
9use crate::client::Client;
10use crate::error::Result;
11use crate::http;
12use nil_payload::infrastructure::*;
13
14impl Client {
15  pub async fn toggle_building(&self, req: ToggleBuildingRequest) -> Result<()> {
16    http::post("toggle-building")
17      .body(req)
18      .server(self.server)
19      .maybe_authorization(self.authorization.as_ref())
20      .user_agent(&self.user_agent)
21      .send()
22      .await
23  }
24}