View Source GoogleApi.Classroom.V1.Api.Invitations (google_api_classroom v0.21.2)

API calls for all endpoints tagged Invitations.

Summary

Functions

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.

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. if the user already has this role or a role with greater permissions. for the following request errors: IneligibleOwner ALREADY_EXISTS if an invitation for the specified user and course already exists.

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.

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.

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.

Functions

Link to this function

classroom_invitations_accept(connection, id, optional_params \\ [], opts \\ [])

View Source
@spec classroom_invitations_accept(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Classroom.V1.Model.Empty.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

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.

Parameters

  • connection (type: GoogleApi.Classroom.V1.Connection.t) - Connection to server
  • id (type: String.t) - Identifier of the invitation to accept.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Classroom.V1.Model.Empty{}} on success
  • {:error, info} on failure
Link to this function

classroom_invitations_create(connection, optional_params \\ [], opts \\ [])

View Source
@spec classroom_invitations_create(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Classroom.V1.Model.Invitation.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

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. if the user already has this role or a role with greater permissions. for the following request errors: IneligibleOwner ALREADY_EXISTS if an invitation for the specified user and course already exists.

Parameters

  • connection (type: GoogleApi.Classroom.V1.Connection.t) - Connection to server
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Classroom.V1.Model.Invitation.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Classroom.V1.Model.Invitation{}} on success
  • {:error, info} on failure
Link to this function

classroom_invitations_delete(connection, id, optional_params \\ [], opts \\ [])

View Source
@spec classroom_invitations_delete(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Classroom.V1.Model.Empty.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

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.

Parameters

  • connection (type: GoogleApi.Classroom.V1.Connection.t) - Connection to server
  • id (type: String.t) - Identifier of the invitation to delete.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Classroom.V1.Model.Empty{}} on success
  • {:error, info} on failure
Link to this function

classroom_invitations_get(connection, id, optional_params \\ [], opts \\ [])

View Source
@spec classroom_invitations_get(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, GoogleApi.Classroom.V1.Model.Invitation.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

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.

Parameters

  • connection (type: GoogleApi.Classroom.V1.Connection.t) - Connection to server
  • id (type: String.t) - Identifier of the invitation to return.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Classroom.V1.Model.Invitation{}} on success
  • {:error, info} on failure
Link to this function

classroom_invitations_list(connection, optional_params \\ [], opts \\ [])

View Source
@spec classroom_invitations_list(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Classroom.V1.Model.ListInvitationsResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

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.

Parameters

  • connection (type: GoogleApi.Classroom.V1.Connection.t) - Connection to server
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :courseId (type: String.t) - Restricts returned invitations to those for a course with the specified identifier.
    • :pageSize (type: integer()) - Maximum number of items to return. The default is 500 if unspecified or 0. The server may return fewer than the specified number of results.
    • :pageToken (type: String.t) - nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.
    • :userId (type: String.t) - Restricts returned invitations to those for a specific user. The identifier can be one of the following: the numeric identifier for the user the email address of the user * the string literal "me", indicating the requesting user
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Classroom.V1.Model.ListInvitationsResponse{}} on success
  • {:error, info} on failure