Struct google_classroom1::InvitationMethods [] [src]

pub struct InvitationMethods<'a, C, A> where
    C: 'a,
    A: 'a, 
{ /* fields omitted */ }

A builder providing access to all methods supported on invitation resources. It is not used directly, but through the Classroom hub.

Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate yup_oauth2 as oauth2;
extern crate google_classroom1 as classroom1;
 
use std::default::Default;
use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage};
use classroom1::Classroom;
 
let secret: ApplicationSecret = Default::default();
let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
                              hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
                              <MemoryStorage as Default>::default(), None);
let mut hub = Classroom::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `accept(...)`, `create(...)`, `delete(...)`, `get(...)` and `list(...)`
// to build up your call.
let rb = hub.invitations();

Methods

impl<'a, C, A> InvitationMethods<'a, C, A>
[src]

[src]

Create a builder to help you perform the following task:

Deletes an invitation.

This method returns the following error codes:

  • PERMISSION_DENIED if the requesting user is not permitted to delete the requested invitation or for access errors.
  • NOT_FOUND if no invitation exists with the requested ID.

Arguments

  • id - Identifier of the invitation to delete.

[src]

Create a builder to help you perform the following task:

Creates an invitation. Only one invitation for a user and course may exist at a time. Delete and re-create an invitation to make changes.

This method returns the following error codes:

  • PERMISSION_DENIED if the requesting user is not permitted to create invitations for this course or for access errors.
  • NOT_FOUND if the course or the user does not exist.
  • FAILED_PRECONDITION if the requested user's account is disabled or if the user already has this role or a role with greater permissions.
  • ALREADY_EXISTS if an invitation for the specified user and course already exists.

Arguments

  • request - No description provided.

[src]

Create a builder to help you perform the following task:

Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request.

Note: At least one of user_id or course_id must be supplied. Both fields can be supplied.

This method returns the following error codes:

  • PERMISSION_DENIED for access errors.

[src]

Create a builder to help you perform the following task:

Returns an invitation.

This method returns the following error codes:

  • PERMISSION_DENIED if the requesting user is not permitted to view the requested invitation or for access errors.
  • NOT_FOUND if no invitation exists with the requested ID.

Arguments

  • id - Identifier of the invitation to return.

[src]

Create a builder to help you perform the following task:

Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. Only the invited user may accept an invitation.

This method returns the following error codes:

  • PERMISSION_DENIED if the requesting user is not permitted to accept the requested invitation or for access errors.
  • FAILED_PRECONDITION for the following request errors:
    • CourseMemberLimitReached
    • CourseNotModifiable
    • CourseTeacherLimitReached
    • UserGroupsMembershipLimitReached
  • NOT_FOUND if no invitation exists with the requested ID.

Arguments

  • id - Identifier of the invitation to accept.

Trait Implementations

impl<'a, C, A> MethodsBuilder for InvitationMethods<'a, C, A>
[src]