pub async fn update_cli_secret(&self, id: i64, secret: &str) -> Result<()> {
        let path = format!("/users/{}/cli_secret", id);
        let payload = json!({ "secret": secret });
        let resp = self.build_request(Method::PUT, path).json(&payload).send().await?;
        if resp.status().eq(&StatusCode::OK) {
            Ok(())
        } else {
            Err(anyhow!("failed to update cli secret: {}", resp.text().await?))
        }
    }
/// Set CLI secret for a user.
Set CLI secret for a user.
Set CLI secret for a user .
pub async fn update_cli_secret(&self, id: i64, secret: &str) -> Result<()> {
        let path = format!("/users/{}/cli_secret", id);
        let payload = json!({ "secret": secret });
        let resp = self.build_request(Method::PUT, path).json(&payload).send().await?;
        if resp.status().eq(&StatusCode::OK) {
            Ok(())
        } else {
            Err(anyhow!("failed to update cli secret: {}", resp.text().await?))
        }
    }
pub async fn update_cli_secret ( & self , id : i64 , secret : & str ) -> Result < ( ) > { let path = format ! ( " " id ) ; let payload = json ! ( { " " secret } ) ; let resp = self . build_request ( Method :: PUT , path ) . json ( & payload ) . send ( ) . await ? ; if resp . status ( ) . eq ( & StatusCode :: OK ) { Ok ( ( ) ) } else { Err ( anyhow ! ( " " resp text ( ) await ) ) } }
Set CLI secret for a user.
Set CLI secret for a user .
&self
id
i64
secret
&str
&self
id
i64
secret
&str