google_api_classroom v0.0.1 GoogleApi.Classroom.V1.Api.Invitations View Source

API calls for all endpoints tagged Invitations.

Link to this section 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 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

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

Link to this section Functions

Link to this function classroom_invitations_accept(connection, id, opts \\ []) View Source
classroom_invitations_accept(Tesla.Env.client, String.t, keyword) ::
  {:ok, GoogleApi.Classroom.V1.Model.Empty.t} |
  {:error, Tesla.Env.t}

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 (GoogleApi.Classroom.V1.Connection): Connection to server
  • id (String): Identifier of the invitation to accept.
  • opts (KeywordList): [optional] Optional parameters

    • :key (String): 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.
    • :access_token (String): OAuth access token.
    • :quota_user (String): 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.
    • :pp (Boolean): Pretty-print response.
    • :oauth_token (String): OAuth 2.0 token for the current user.
    • :bearer_token (String): OAuth bearer token.
    • :upload_protocol (String): Upload protocol for media (e.g. "raw", "multipart").
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :fields (String): Selector specifying which fields to include in a partial response.
    • :upload_type (String): Legacy upload protocol for media (e.g. "media", "multipart").
    • :__/xgafv (String): V1 error format.
    • :callback (String): JSONP
    • :alt (String): Data format for response.

Returns

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

Link to this function classroom_invitations_create(connection, opts \\ []) View Source
classroom_invitations_create(Tesla.Env.client, keyword) ::
  {:ok, GoogleApi.Classroom.V1.Model.Invitation.t} |
  {:error, Tesla.Env.t}

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.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

    • :key (String): 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.
    • :access_token (String): OAuth access token.
    • :quota_user (String): 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.
    • :pp (Boolean): Pretty-print response.
    • :oauth_token (String): OAuth 2.0 token for the current user.
    • :bearer_token (String): OAuth bearer token.
    • :upload_protocol (String): Upload protocol for media (e.g. "raw", "multipart").
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :fields (String): Selector specifying which fields to include in a partial response.
    • :upload_type (String): Legacy upload protocol for media (e.g. "media", "multipart").
    • :__/xgafv (String): V1 error format.
    • :callback (String): JSONP
    • :alt (String): Data format for response.
    • :body (Invitation):

Returns

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

Link to this function classroom_invitations_delete(connection, id, opts \\ []) View Source
classroom_invitations_delete(Tesla.Env.client, String.t, keyword) ::
  {:ok, GoogleApi.Classroom.V1.Model.Empty.t} |
  {:error, Tesla.Env.t}

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 (GoogleApi.Classroom.V1.Connection): Connection to server
  • id (String): Identifier of the invitation to delete.
  • opts (KeywordList): [optional] Optional parameters

    • :key (String): 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.
    • :access_token (String): OAuth access token.
    • :quota_user (String): 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.
    • :pp (Boolean): Pretty-print response.
    • :oauth_token (String): OAuth 2.0 token for the current user.
    • :bearer_token (String): OAuth bearer token.
    • :upload_protocol (String): Upload protocol for media (e.g. "raw", "multipart").
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :fields (String): Selector specifying which fields to include in a partial response.
    • :upload_type (String): Legacy upload protocol for media (e.g. "media", "multipart").
    • :__/xgafv (String): V1 error format.
    • :callback (String): JSONP
    • :alt (String): Data format for response.

Returns

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

Link to this function classroom_invitations_get(connection, id, opts \\ []) View Source
classroom_invitations_get(Tesla.Env.client, String.t, keyword) ::
  {:ok, GoogleApi.Classroom.V1.Model.Invitation.t} |
  {:error, Tesla.Env.t}

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 (GoogleApi.Classroom.V1.Connection): Connection to server
  • id (String): Identifier of the invitation to return.
  • opts (KeywordList): [optional] Optional parameters

    • :key (String): 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.
    • :access_token (String): OAuth access token.
    • :quota_user (String): 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.
    • :pp (Boolean): Pretty-print response.
    • :oauth_token (String): OAuth 2.0 token for the current user.
    • :bearer_token (String): OAuth bearer token.
    • :upload_protocol (String): Upload protocol for media (e.g. "raw", "multipart").
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :fields (String): Selector specifying which fields to include in a partial response.
    • :upload_type (String): Legacy upload protocol for media (e.g. "media", "multipart").
    • :__/xgafv (String): V1 error format.
    • :callback (String): JSONP
    • :alt (String): Data format for response.

Returns

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

Link to this function classroom_invitations_list(connection, opts \\ []) View Source
classroom_invitations_list(Tesla.Env.client, keyword) ::
  {:ok, GoogleApi.Classroom.V1.Model.ListInvitationsResponse.t} |
  {:error, Tesla.Env.t}

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 (GoogleApi.Classroom.V1.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

    • :key (String): 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.
    • :access_token (String): OAuth access token.
    • :quota_user (String): 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.
    • :pp (Boolean): Pretty-print response.
    • :oauth_token (String): OAuth 2.0 token for the current user.
    • :bearer_token (String): OAuth bearer token.
    • :upload_protocol (String): Upload protocol for media (e.g. "raw", "multipart").
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :fields (String): Selector specifying which fields to include in a partial response.
    • :upload_type (String): Legacy upload protocol for media (e.g. "media", "multipart").
    • :__/xgafv (String): V1 error format.
    • :callback (String): JSONP
    • :alt (String): Data format for response.
    • :page_token (String): 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.
    • :user_id (String): 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
    • :page_size (Integer): Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.
    • :course_id (String): Restricts returned invitations to those for a course with the specified identifier.

Returns

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