Struct gsuite_api::GSuite[][src]

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) -> Result<Vec<Group>, APIError>[src]

List Google groups.

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

Get the settings for a Google group.

pub async fn update_group(&self, group: &Group) -> Result<(), APIError>[src]

Update a Google group.

pub async fn update_group_settings(
    &self,
    settings: &GroupSettings
) -> Result<(), APIError>
[src]

Update a Google group's settings.

pub async fn create_group(&self, group: &Group) -> Result<Group, APIError>[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
) -> Result<(), APIError>
[src]

Update an alias for a Google group.

pub async fn group_has_member(
    &self,
    group_id: &str,
    email: &str
) -> Result<bool, APIError>
[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
) -> Result<(), APIError>
[src]

Update a member of a Google group.

pub async fn group_insert_member(
    &self,
    group_id: &str,
    email: &str,
    role: &str
) -> Result<(), APIError>
[src]

Add a user as a member of a Google group.

pub async fn group_remove_member(
    &self,
    group_id: &str,
    email: &str
) -> Result<(), APIError>
[src]

Remove a user as a member of a Google group.

pub async fn delete_group(&self, group_key: &str) -> Result<(), APIError>[src]

Delete a group. The group_key can be the group's email address, group alias, or the unique group ID. FROM: https://developers.google.com/admin-sdk/directory/reference/rest/v1/groups/delete

pub async fn list_users(&self) -> Result<Vec<User>, APIError>[src]

List users.

pub async fn update_user(&self, user: &User) -> Result<(), APIError>[src]

Update a user.

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

Create a user.

pub async fn delete_user(&self, user_key: &str) -> Result<(), APIError>[src]

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

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
) -> Result<(), APIError>
[src]

Update an alias for a user.

pub async fn list_calendar_resources(
    &self
) -> Result<Vec<CalendarResource>, APIError>
[src]

List calendar resources.

pub async fn update_calendar_resource(
    &self,
    resource: &CalendarResource
) -> Result<(), APIError>
[src]

Update a calendar resource.

pub async fn create_calendar_resource(
    &self,
    resource: &CalendarResource
) -> Result<(), APIError>
[src]

Create a calendar resource.

pub async fn delete_calendar_resource(&self, id: &str) -> Result<(), APIError>[src]

Delete a calendar resource. FROM: https://developers.google.com/admin-sdk/directory/reference/rest/v1/resources.calendars/delete

pub async fn list_buildings(&self) -> Result<Vec<Building>, APIError>[src]

List buildings.

pub async fn update_building(&self, building: &Building) -> Result<(), APIError>[src]

Update a building.

pub async fn create_building(&self, building: &Building) -> Result<(), APIError>[src]

Create a building.

pub async fn delete_building(&self, id: &str) -> Result<(), APIError>[src]

Delete a building. FROM: https://developers.google.com/admin-sdk/directory/reference/rest/v1/resources.buildings/delete

pub async fn list_calendars(&self) -> Result<Vec<Calendar>, APIError>[src]

List calendars for a user.

pub async fn list_calendar_events(
    &self,
    calendar_id: &str,
    show_deleted: bool
) -> Result<Vec<CalendarEvent>, APIError>
[src]

List events on a calendar.

pub async fn list_past_calendar_events(
    &self,
    calendar_id: &str
) -> Result<Vec<CalendarEvent>, APIError>
[src]

List past events on a calendar.

Auto Trait Implementations

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> Instrument for T[src]

impl<T> Instrument 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>,