Struct gsuite_api::GSuite [−][src]
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]
&self,
group_email: &str
) -> Result<GroupSettings, APIError>
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]
&self,
settings: &GroupSettings
) -> Result<(), APIError>
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]
A: IntoIterator,
A::Item: AsRef<str>,
Update a Google group's aliases.
pub async fn update_group_alias(
&self,
group_key: &str,
alias: &str
) -> Result<(), APIError>
[src]
&self,
group_key: &str,
alias: &str
) -> Result<(), APIError>
Update an alias for a Google group.
pub async fn group_has_member(
&self,
group_id: &str,
email: &str
) -> Result<bool, APIError>
[src]
&self,
group_id: &str,
email: &str
) -> Result<bool, APIError>
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]
&self,
group_id: &str,
email: &str,
role: &str
) -> Result<(), APIError>
Update a member of a Google group.
pub async fn group_insert_member(
&self,
group_id: &str,
email: &str,
role: &str
) -> Result<(), APIError>
[src]
&self,
group_id: &str,
email: &str,
role: &str
) -> Result<(), APIError>
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]
&self,
group_id: &str,
email: &str
) -> Result<(), APIError>
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]
A: IntoIterator,
A::Item: AsRef<str>,
Update a user's aliases.
pub async fn update_user_alias(
&self,
user_id: &str,
alias: &str
) -> Result<(), APIError>
[src]
&self,
user_id: &str,
alias: &str
) -> Result<(), APIError>
Update an alias for a user.
pub async fn list_calendar_resources(
&self
) -> Result<Vec<CalendarResource>, APIError>
[src]
&self
) -> Result<Vec<CalendarResource>, APIError>
List calendar resources.
pub async fn update_calendar_resource(
&self,
resource: &CalendarResource
) -> Result<(), APIError>
[src]
&self,
resource: &CalendarResource
) -> Result<(), APIError>
Update a calendar resource.
pub async fn create_calendar_resource(
&self,
resource: &CalendarResource
) -> Result<(), APIError>
[src]
&self,
resource: &CalendarResource
) -> Result<(), APIError>
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]
&self,
calendar_id: &str,
show_deleted: bool
) -> Result<Vec<CalendarEvent>, APIError>
List events on a calendar.
pub async fn list_past_calendar_events(
&self,
calendar_id: &str
) -> Result<Vec<CalendarEvent>, APIError>
[src]
&self,
calendar_id: &str
) -> Result<Vec<CalendarEvent>, APIError>
List past events on a calendar.
Auto Trait Implementations
impl !RefUnwindSafe for GSuite
[src]
impl Send for GSuite
[src]
impl Sync for GSuite
[src]
impl Unpin for GSuite
[src]
impl !UnwindSafe for GSuite
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,