pub async fn group_update_member(&self, group_id: &str, email: &str, role: &str) -> Result<(), APIError> {
        let member = Member {
            role: role.to_string(),
            email: email.to_string(),
            delivery_settings: "ALL_MAIL".to_string(),
            etag: "".to_string(),
            id: "".to_string(),
            kind: "".to_string(),
            status: "".to_string(),
            typev: "".to_string(),
        };

        // Build the request.
        let request = self.request(DIRECTORY_ENDPOINT, Method::PUT, &format!("groups/{}/members/{}", group_id, email), member, 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(())
    }
/// Update a member of a Google group.
Update a member of a Google group.
Update a member of a Google group .
pub async fn group_update_member(&self, group_id: &str, email: &str, role: &str) -> Result<(), APIError> {
        let member = Member {
            role: role.to_string(),
            email: email.to_string(),
            delivery_settings: "ALL_MAIL".to_string(),
            etag: "".to_string(),
            id: "".to_string(),
            kind: "".to_string(),
            status: "".to_string(),
            typev: "".to_string(),
        };
        // Build the request.
        let request = self.request(DIRECTORY_ENDPOINT, Method::PUT, &format!("groups/{}/members/{}", group_id, email), member, 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 group_update_member ( & self , group_id : & str , email : & str , role : & str ) -> Result < ( ) , APIError > { let member = Member { role : role . to_string ( ) , email : email . to_string ( ) , delivery_settings : " " . to_string ( ) , etag : " " . to_string ( ) , id : " " . to_string ( ) , kind : " " . to_string ( ) , status : " " . to_string ( ) , typev : " " . to_string ( ) , } ; // Build the request. let request = self . request ( DIRECTORY_ENDPOINT , Method :: PUT , & format ! ( " " group_id email ) , member , 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 ( ( ) ) }
Update a member of a Google group.
Update a member of a Google group .
&self
group_id
&str
email
&str
role
&str
&self
group_id
&str
email
&str
role
&str