pub async fn delete_user(&self, user_key: &str) -> Result<(), APIError> {
        // Build the request.
        let request = self.request(DIRECTORY_ENDPOINT, Method::DELETE, &format!("users/{}", user_key), (), None);

        let resp = self.client.execute(request).await.unwrap();
        match resp.status() {
            StatusCode::OK => (),
            s => {
                return Err(APIError {
                    status_code: s,
                    body: resp.text().await.unwrap(),
                });
            }
        };

        Ok(())
    }
/// Delete a user.
/// The `user_key` can be the user's primary email address, alias email address, or unique user ID.
/// FROM: https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/delete
Delete a user.
The `user_key` can be the user's primary email address, alias email address, or unique user ID.
Delete a user . The ` user_key ` can be the user ' s primary email address alias email address or unique user ID .
pub async fn delete_user(&self, user_key: &str) -> Result<(), APIError> {
        // Build the request.
        let request = self.request(DIRECTORY_ENDPOINT, Method::DELETE, &format!("users/{}", user_key), (), None);
        let resp = self.client.execute(request).await.unwrap();
        match resp.status() {
            StatusCode::OK => (),
            s => {
                return Err(APIError {
                    status_code: s,
                    body: resp.text().await.unwrap(),
                });
            }
        };
        Ok(())
    }
pub async fn delete_user ( & self , user_key : & str ) -> Result < ( ) , APIError > { // Build the request. let request = self . request ( DIRECTORY_ENDPOINT , Method :: DELETE , & format ! ( " " user_key ) , ( ) , None ) ; let resp = self . client . execute ( request ) . await . unwrap ( ) ; match resp . status ( ) { StatusCode :: OK => ( ) , s => { return Err ( APIError { status_code : s , body : resp . text ( ) . await . unwrap ( ) , } ) ; } } ; Ok ( ( ) ) }
Delete a user.
Delete a user .
&self
user_key
&str
&self
user_key
&str