Struct gsuite_api::GSuite [−][src]
pub struct GSuite { /* fields omitted */ }Entrypoint for interacting with the GSuite APIs.
Implementations
impl GSuite[src]
impl GSuite[src]pub fn new(customer: &str, domain: &str, token: AccessToken) -> Self[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]
pub fn get_token(&self) -> &AccessToken[src]Get the currently set authorization token.
pub async fn get_group_settings(
&self,
group_email: &str
) -> Result<GroupSettings, APIError>[src]
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_settings(
&self,
settings: &GroupSettings
) -> Result<(), APIError>[src]
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]
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]
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]
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]
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]
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]
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]
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]
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 delete_user(&self, user_key: &str) -> Result<(), APIError>[src]
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]
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]
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]
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]
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]
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]
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 update_building(&self, building: &Building) -> Result<(), APIError>[src]
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]
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]
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]
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]
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]
pub async fn list_past_calendar_events(
&self,
calendar_id: &str
) -> Result<Vec<CalendarEvent>, APIError>[src]List past events on a calendar.
pub async fn create_calendar_event(
&self,
calendar_id: &str,
event: &CalendarEvent
) -> Result<CalendarEvent, APIError>[src]
pub async fn create_calendar_event(
&self,
calendar_id: &str,
event: &CalendarEvent
) -> Result<CalendarEvent, APIError>[src]Create a calendar event.
pub async fn update_calendar_event(
&self,
calendar_id: &str,
event_id: &str,
event: &CalendarEvent
) -> Result<CalendarEvent, APIError>[src]
pub async fn update_calendar_event(
&self,
calendar_id: &str,
event_id: &str,
event: &CalendarEvent
) -> Result<CalendarEvent, APIError>[src]Update a calendar event.
pub async fn get_calendar_event(
&self,
calendar_id: &str,
event_id: &str
) -> Result<CalendarEvent, APIError>[src]
pub async fn get_calendar_event(
&self,
calendar_id: &str,
event_id: &str
) -> Result<CalendarEvent, APIError>[src]Get a calendar event.
pub async fn delete_calendar_event(
&self,
calendar_id: &str,
event_id: &str
) -> Result<(), APIError>[src]
&self,
calendar_id: &str,
event_id: &str
) -> Result<(), APIError>
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> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,