Skip to main content

nil_client/client/cheat/
capital.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use crate::client::Client;
5use crate::error::Result;
6use crate::http;
7use nil_payload::request::cheat::capital::*;
8use nil_payload::response::cheat::capital::*;
9
10impl Client {
11  /// Endpoint: `PUT /cheat-get-influence`
12  pub async fn cheat_get_influence(
13    &self,
14    req: CheatGetInfluenceRequest,
15  ) -> Result<CheatGetInfluenceResponse> {
16    http::json_put("cheat-get-influence")
17      .body(req)
18      .server(self.server)
19      .maybe_authorization(self.authorization.as_ref())
20      .circuit_breaker(self.circuit_breaker())
21      .retry(&self.retry)
22      .user_agent(&self.user_agent)
23      .send()
24      .await
25  }
26
27  /// Endpoint: `POST /cheat-set-influence`
28  pub async fn cheat_set_influence(&self, req: CheatSetInfluenceRequest) -> Result<()> {
29    http::post("cheat-set-influence")
30      .body(req)
31      .server(self.server)
32      .maybe_authorization(self.authorization.as_ref())
33      .circuit_breaker(self.circuit_breaker())
34      .user_agent(&self.user_agent)
35      .send()
36      .await
37  }
38}