pub async fn delete(
    client: &mut BoxClient<'_>,
    user_id: &str,
    notify: Option<bool>,
    force: Option<bool>
) -> Result<(), AuthError>
Expand description

Deletes a user. By default this will fail if the user still owns any content. Move their owned content first before proceeding, or use the force field to delete the user and their files.

Sample usage:

use rusty_box::{
    auth::{
        auth_developer::DevAuth,
        AuthError,
    },
    box_client::BoxClient,
    config::Config,
    rest_api::users::users_api,
};
use dotenv;
use std::env;
#[tokio::main]
async fn main() -> Result<(), AuthError> {

    dotenv::from_filename(".dev.env").ok();
    let access_token = env::var("DEVELOPER_TOKEN").expect("DEVELOPER_TOKEN must be set");

    let config = Config::new();
    let auth = DevAuth::new(
        config,
        access_token,
    );
    let mut client = BoxClient::new(Box::new(auth));

    let user_id = "12345";
    users_api::delete(&mut client, &user_id, None, None).await?;

    Ok(())
}