[][src]Struct gsuite_api::GSuite

pub struct GSuite { /* fields omitted */ }

Entrypoint for interacting with the GSuite APIs.

Implementations

impl GSuite[src]

pub fn new(customer: &str, domain: &str, token: AccessToken) -> Self[src]

Create a new GSuite client struct. It takes a type that can convert into an &str (String or Vec<u8> for example). As long as the function is given a valid API Key and Secret your requests will work.

pub fn get_token(&self) -> &AccessToken[src]

Get the currently set authorization token.

pub async fn list_groups<'_>(&'_ self) -> Vec<Group>[src]

List Google groups.

pub async fn get_group_settings<'_, '_>(
    &'_ self,
    group_email: &'_ str
) -> GroupSettings
[src]

Get the settings for a Google group.

pub async fn update_group<'_, '_>(&'_ self, group: &'_ Group)[src]

Update a Google group.

pub async fn update_group_settings<'_, '_>(
    &'_ self,
    settings: &'_ GroupSettings
)
[src]

Update a Google group's settings.

pub async fn create_group<'_, '_>(&'_ self, group: &'_ Group) -> Group[src]

Create a google group.

pub async fn update_group_aliases<'_, '_, A>(
    &'_ self,
    group_key: &'_ str,
    aliases: A
) where
    A: IntoIterator,
    A::Item: AsRef<str>, 
[src]

Update a Google group's aliases.

pub async fn update_group_alias<'_, '_, '_>(
    &'_ self,
    group_key: &'_ str,
    alias: &'_ str
)
[src]

Update an alias for a Google group.

pub async fn group_has_member<'_, '_, '_>(
    &'_ self,
    group_id: &'_ str,
    email: &'_ str
) -> bool
[src]

Check if a user is a member of a Google group.

pub async fn group_update_member<'_, '_, '_, '_>(
    &'_ self,
    group_id: &'_ str,
    email: &'_ str,
    role: &'_ str
)
[src]

Update a member of a Google group.

pub async fn group_insert_member<'_, '_, '_, '_>(
    &'_ self,
    group_id: &'_ str,
    email: &'_ str,
    role: &'_ str
)
[src]

Add a user as a member of a Google group.

pub async fn group_remove_member<'_, '_, '_>(
    &'_ self,
    group_id: &'_ str,
    email: &'_ str
)
[src]

Remove a user as a member of a Google group.

pub async fn list_users<'_>(&'_ self) -> Vec<User>[src]

List users.

pub async fn update_user<'_, '_>(&'_ self, user: &'_ User)[src]

Update a user.

pub async fn create_user<'_, '_>(&'_ self, user: &'_ User) -> User[src]

Create a user.

pub async fn update_user_aliases<'_, '_, A>(
    &'_ self,
    user_id: &'_ str,
    aliases: A
) where
    A: IntoIterator,
    A::Item: AsRef<str>, 
[src]

Update a user's aliases.

pub async fn update_user_alias<'_, '_, '_>(
    &'_ self,
    user_id: &'_ str,
    alias: &'_ str
)
[src]

Update an alias for a user.

pub async fn list_calendar_resources<'_>(&'_ self) -> Vec<CalendarResource>[src]

List calendar resources.

pub async fn update_calendar_resource<'_, '_>(
    &'_ self,
    resource: &'_ CalendarResource
)
[src]

Update a calendar resource.

pub async fn create_calendar_resource<'_, '_>(
    &'_ self,
    resource: &'_ CalendarResource
)
[src]

Create a calendar resource.

pub async fn list_buildings<'_>(&'_ self) -> Vec<Building>[src]

List buildings.

pub async fn update_building<'_, '_>(&'_ self, building: &'_ Building)[src]

Update a building.

pub async fn create_building<'_, '_>(&'_ self, building: &'_ Building)[src]

Create a building.

Auto Trait Implementations

impl !RefUnwindSafe for GSuite

impl !Send for GSuite

impl !Sync for GSuite

impl Unpin for GSuite

impl !UnwindSafe for GSuite

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,