nil_client/client/cheat/
npc.rs1use crate::client::Client;
5use crate::error::Result;
6use crate::http;
7use nil_payload::request::cheat::npc::*;
8use nil_payload::response::cheat::npc::*;
9
10impl Client {
11 pub async fn cheat_get_ethics(
13 &self,
14 req: CheatGetEthicsRequest,
15 ) -> Result<CheatGetEthicsResponse> {
16 http::json_put("cheat-get-ethics")
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 pub async fn cheat_set_bot_ethics(&self, req: CheatSetBotEthicsRequest) -> Result<()> {
29 http::post("cheat-set-bot-ethics")
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
39 pub async fn cheat_spawn_bot(&self, req: CheatSpawnBotRequest) -> Result<CheatSpawnBotResponse> {
41 http::json_post("cheat-spawn-bot")
42 .body(req)
43 .server(self.server)
44 .maybe_authorization(self.authorization.as_ref())
45 .circuit_breaker(self.circuit_breaker())
46 .user_agent(&self.user_agent)
47 .send()
48 .await
49 }
50}