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

API calls for all endpoints tagged Courses.

Link to this section Summary

Functions

Creates an alias for a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to create the alias or for access errors. `NOT_FOUND` if the course does not exist. `ALREADY_EXISTS` if the alias already exists. `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to access a domain-scoped alias)

Deletes an alias of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to remove the alias or for access errors. `NOT_FOUND` if the alias does not exist. * `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to delete a domain-scoped alias)

Returns a list of aliases for a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the course or for access errors. `NOT_FOUND` if the course does not exist

Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the OAuth client ID used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. `INVALID_ARGUMENT` if the request is malformed. `NOT_FOUND` if the requested course does not exist. `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible

Deletes a course work. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the requesting user is not permitted to delete the requested course or for access errors. `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if no course exists with the requested ID

Returns course work. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist

Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist

Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. `INVALID_ARGUMENT` if the request is malformed. `FAILED_PRECONDITION` if the requested course work has already been deleted. `NOT_FOUND` if the requested course, course work, or student submission does not exist

Returns a student submission. `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist

Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist

Modifies attachments of student submission. Attachments may only be added to student submissions belonging to course work objects with a `workType` of `ASSIGNMENT`. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist

Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist

Reclaims a student submission on behalf of the student that owns it. Reclaiming a student submission transfers ownership of attached Drive files to the student and update the submission state. Only the student that owns the requested student submission may call this method, and only for a student submission that has been turned in. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student submission, or for access errors. `FAILED_PRECONDITION` if the student submission has not been turned in. `INVALID_ARGUMENT` if the request is malformed. `NOT_FOUND` if the requested course, course work, or student submission does not exist

Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist

Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist

Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. `NOT_FOUND` if the primary teacher is not a valid user. `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists

Deletes a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested course or for access errors. `NOT_FOUND` if no course exists with the requested ID

Returns a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. `NOT_FOUND` if no course exists with the requested ID

Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. Returned courses are ordered by creation time, with the most recently created coming first. This method returns the following error codes: `PERMISSION_DENIED` for access errors. `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any users specified in the query arguments do not exist

Updates one or more fields in a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. `NOT_FOUND` if no course exists with the requested ID. `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable

Adds a user as a student of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. `NOT_FOUND` if the requested course ID does not exist. `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: CourseMemberLimitReached CourseNotModifiable UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a student or teacher in the course

Deletes a student of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to delete students of this course or for access errors. `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist

Returns a student of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to view students of this course or for access errors. `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist

Returns a list of students of this course that the requester is permitted to view. This method returns the following error codes: `NOT_FOUND` if the course does not exist. `PERMISSION_DENIED` for access errors

Creates a teacher of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. `NOT_FOUND` if the requested course ID does not exist. `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: CourseMemberLimitReached CourseNotModifiable CourseTeacherLimitReached UserGroupsMembershipLimitReached `ALREADY_EXISTS` if the user is already a teacher or student in the course

Deletes a teacher of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course or for access errors. `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course

Returns a teacher of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to view teachers of this course or for access errors. `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist

Returns a list of teachers of this course that the requester is permitted to view. This method returns the following error codes: `NOT_FOUND` if the course does not exist. `PERMISSION_DENIED` for access errors

Updates a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. `NOT_FOUND` if no course exists with the requested ID. `FAILED_PRECONDITION` for the following request errors: CourseNotModifiable

Link to this section Functions

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

Creates an alias for a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to create the alias or for access errors. `NOT_FOUND` if the course does not exist. `ALREADY_EXISTS` if the alias already exists. `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to access a domain-scoped alias).

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course to alias. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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 (CourseAlias):

Returns

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

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

Deletes an alias of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to remove the alias or for access errors. `NOT_FOUND` if the alias does not exist. * `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to delete a domain-scoped alias).

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course whose alias should be deleted. This identifier can be either the Classroom-assigned identifier or an alias.
  • alias (String): Alias to delete. This may not be the Classroom-assigned identifier.
  • 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_courses_aliases_list(connection, course_id, opts \\ []) View Source
classroom_courses_aliases_list(Tesla.Env.client, String.t, keyword) ::
  {:ok, GoogleApi.Classroom.V1.Model.ListCourseAliasesResponse.t} |
  {:error, Tesla.Env.t}

Returns a list of aliases for a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the course or for access errors. `NOT_FOUND` if the course does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): The identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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.
    • :page_size (Integer): Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.

Returns

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

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

Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the OAuth client ID used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. `INVALID_ARGUMENT` if the request is malformed. `NOT_FOUND` if the requested course does not exist. `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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 (CourseWork):

Returns

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

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

Deletes a course work. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the requesting user is not permitted to delete the requested course or for access errors. `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if no course exists with the requested ID.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id (String): Identifier of the course work to delete. This identifier is a Classroom-assigned identifier.
  • 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_courses_course_work_get(connection, course_id, id, opts \\ []) View Source
classroom_courses_course_work_get(Tesla.Env.client, String.t, String.t, keyword) ::
  {:ok, GoogleApi.Classroom.V1.Model.CourseWork.t} |
  {:error, Tesla.Env.t}

Returns course work. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id (String): Identifier of the course work.
  • 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.CourseWork{}} on success {:error, info} on failure

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

Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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.
    • :order_by (String): Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported fields are `updateTime` and `dueDate`. Supported direction keywords are `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`
    • :page_size (Integer): Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.
    • :course_work_states (List[String]): Restriction on the work status to return. Only courseWork that matches is returned. If unspecified, items with a work status of `PUBLISHED` is returned.

Returns

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

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

Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. `INVALID_ARGUMENT` if the request is malformed. `FAILED_PRECONDITION` if the requested course work has already been deleted. `NOT_FOUND` if the requested course, course work, or student submission does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id (String): Identifier of the course work.
  • 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.
    • :update_mask (String): Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the CourseWork object. If a field that does not support empty values is included in the update mask and not set in the CourseWork object, an `INVALID_ARGUMENT` error will be returned. The following fields may be specified by teachers: `title` `description` `state` `due_date` `due_time` `max_points` `scheduled_time` `submission_modification_mode`
    • :body (CourseWork):

Returns

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

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

Returns a student submission. `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • course_work_id (String): Identifier of the course work.
  • id (String): Identifier of the student submission.
  • 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.StudentSubmission{}} on success {:error, info} on failure

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

Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • course_work_id (String): Identifier of the student work to request. This may be set to the string literal `"-"` to request student work for all course work in the specified course.
  • 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.
    • :states (List[String]): Requested submission states. If specified, returned student submissions match one of the specified submission states.
    • :page_size (Integer): Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.
    • :user_id (String): Optional argument to restrict returned student work to those owned by the student with the specified identifier. 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
    • :late (String): Requested lateness value. If specified, returned student submissions are restricted by the requested value. If unspecified, submissions are returned regardless of `late` value.
    • :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.

Returns

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

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

Modifies attachments of student submission. Attachments may only be added to student submissions belonging to course work objects with a `workType` of `ASSIGNMENT`. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • course_work_id (String): Identifier of the course work.
  • id (String): Identifier of the student submission.
  • 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 (ModifyAttachmentsRequest):

Returns

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

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

Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • course_work_id (String): Identifier of the course work.
  • id (String): Identifier of the student submission.
  • 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.
    • :update_mask (String): Mask that identifies which fields on the student submission to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields may be specified by teachers: `draft_grade` `assigned_grade`
    • :body (StudentSubmission):

Returns

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

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

Reclaims a student submission on behalf of the student that owns it. Reclaiming a student submission transfers ownership of attached Drive files to the student and update the submission state. Only the student that owns the requested student submission may call this method, and only for a student submission that has been turned in. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student submission, or for access errors. `FAILED_PRECONDITION` if the student submission has not been turned in. `INVALID_ARGUMENT` if the request is malformed. `NOT_FOUND` if the requested course, course work, or student submission does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • course_work_id (String): Identifier of the course work.
  • id (String): Identifier of the student submission.
  • 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 (ReclaimStudentSubmissionRequest):

Returns

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

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

Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • course_work_id (String): Identifier of the course work.
  • id (String): Identifier of the student submission.
  • 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 (ReturnStudentSubmissionRequest):

Returns

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

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

Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • course_work_id (String): Identifier of the course work.
  • id (String): Identifier of the student submission.
  • 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 (TurnInStudentSubmissionRequest):

Returns

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

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

Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. `NOT_FOUND` if the primary teacher is not a valid user. `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and 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 (Course):

Returns

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

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

Deletes a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested course or for access errors. `NOT_FOUND` if no course exists with the requested ID.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • id (String): Identifier of the course to delete. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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_courses_get(connection, id, opts \\ []) View Source
classroom_courses_get(Tesla.Env.client, String.t, keyword) ::
  {:ok, GoogleApi.Classroom.V1.Model.Course.t} |
  {:error, Tesla.Env.t}

Returns a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. `NOT_FOUND` if no course exists with the requested ID.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • id (String): Identifier of the course to return. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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.Course{}} on success {:error, info} on failure

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

Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. Returned courses are ordered by creation time, with the most recently created coming first. This method returns the following error codes: `PERMISSION_DENIED` for access errors. `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any users specified in the query arguments do not exist.

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.
    • :student_id (String): Restricts returned courses to those having a student with the specified identifier. 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_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.
    • :page_size (Integer): Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.
    • :course_states (List[String]): Restricts returned courses to those in one of the specified states The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.
    • :teacher_id (String): Restricts returned courses to those having a teacher with the specified identifier. 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

Returns

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

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

Updates one or more fields in a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. `NOT_FOUND` if no course exists with the requested ID. `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • id (String): Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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.
    • :update_mask (String): Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: `name` `section` `descriptionHeading` `description` `room` `courseState` * `ownerId` Note: patches to ownerId are treated as being effective immediately, but in practice it may take some time for the ownership transfer of all affected resources to complete. When set in a query parameter, this field should be specified as `updateMask=<field1>,<field2>,…`
    • :body (Course):

Returns

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

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

Adds a user as a student of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. `NOT_FOUND` if the requested course ID does not exist. `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: CourseMemberLimitReached CourseNotModifiable UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a student or teacher in the course.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course to create the student in. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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.
    • :enrollment_code (String): Enrollment code of the course to create the student in. This code is required if userId corresponds to the requesting user; it may be omitted if the requesting user has administrative permissions to create students for any user.
    • :body (Student):

Returns

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

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

Deletes a student of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to delete students of this course or for access errors. `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • user_id (String): Identifier of the student to delete. 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 (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_courses_students_get(connection, course_id, user_id, opts \\ []) View Source
classroom_courses_students_get(Tesla.Env.client, String.t, String.t, keyword) ::
  {:ok, GoogleApi.Classroom.V1.Model.Student.t} |
  {:error, Tesla.Env.t}

Returns a student of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to view students of this course or for access errors. `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • user_id (String): Identifier of the student to return. 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 (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.Student{}} on success {:error, info} on failure

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

Returns a list of students of this course that the requester is permitted to view. This method returns the following error codes: `NOT_FOUND` if the course does not exist. `PERMISSION_DENIED` for access errors.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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.
    • :page_size (Integer): Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.

Returns

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

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

Creates a teacher of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. `NOT_FOUND` if the requested course ID does not exist. `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: CourseMemberLimitReached CourseNotModifiable CourseTeacherLimitReached UserGroupsMembershipLimitReached `ALREADY_EXISTS` if the user is already a teacher or student in the course.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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 (Teacher):

Returns

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

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

Deletes a teacher of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course or for access errors. `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • user_id (String): Identifier of the teacher to delete. 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 (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_courses_teachers_get(connection, course_id, user_id, opts \\ []) View Source
classroom_courses_teachers_get(Tesla.Env.client, String.t, String.t, keyword) ::
  {:ok, GoogleApi.Classroom.V1.Model.Teacher.t} |
  {:error, Tesla.Env.t}

Returns a teacher of a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to view teachers of this course or for access errors. `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • user_id (String): Identifier of the teacher to return. 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 (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.Teacher{}} on success {:error, info} on failure

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

Returns a list of teachers of this course that the requester is permitted to view. This method returns the following error codes: `NOT_FOUND` if the course does not exist. `PERMISSION_DENIED` for access errors.

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • course_id (String): Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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.
    • :page_size (Integer): Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.

Returns

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

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

Updates a course. This method returns the following error codes: `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. `NOT_FOUND` if no course exists with the requested ID. `FAILED_PRECONDITION` for the following request errors: CourseNotModifiable

Parameters

  • connection (GoogleApi.Classroom.V1.Connection): Connection to server
  • id (String): Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias.
  • 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 (Course):

Returns

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