Google Classroom API . courses . studentGroups . studentGroupMembers

Instance Methods

close()

Close httplib2 connections.

create(courseId, studentGroupId, body=None, x__xgafv=None)

Creates a student group member for a student group. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create the student group or member for access errors. * `NOT_FOUND` if the student group does not exist or the user does not have access to the student group. * `ALREADY_EXISTS` if the student group member already exists. * `FAILED_PRECONDITION` if attempting to add a member to a student group that has reached its member limit.

delete(courseId, studentGroupId, userId, x__xgafv=None)

Deletes a student group member. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested student group member or for access errors. * `NOT_FOUND` if the student group member does not exist or the user does not have access to the student group.

list(courseId, studentGroupId, pageSize=None, pageToken=None, x__xgafv=None)

Returns a list of students in a group. This method returns the following error codes: * `NOT_FOUND` if the course or student group does not exist.

list_next()

Retrieves the next page of results.

Method Details

close()
Close httplib2 connections.
create(courseId, studentGroupId, body=None, x__xgafv=None)
Creates a student group member for a student group. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create the student group or member for access errors. * `NOT_FOUND` if the student group does not exist or the user does not have access to the student group. * `ALREADY_EXISTS` if the student group member already exists. * `FAILED_PRECONDITION` if attempting to add a member to a student group that has reached its member limit.

Args:
  courseId: string, Required. The identifier of the course. (required)
  studentGroupId: string, Required. The identifier of the student group. (required)
  body: object, The request body.
    The object takes the form of:

{ # A student member in a student group.
  "courseId": "A String", # The identifier of the course.
  "studentGroupId": "A String", # The identifier of the student group.
  "userId": "A String", # Identifier of the student.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A student member in a student group.
  "courseId": "A String", # The identifier of the course.
  "studentGroupId": "A String", # The identifier of the student group.
  "userId": "A String", # Identifier of the student.
}
delete(courseId, studentGroupId, userId, x__xgafv=None)
Deletes a student group member. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested student group member or for access errors. * `NOT_FOUND` if the student group member does not exist or the user does not have access to the student group.

Args:
  courseId: string, Required. The identifier of the course containing the relevant student group. (required)
  studentGroupId: string, Required. The identifier of the student group containing the student group member to delete. (required)
  userId: string, Required. The identifier of the student group member to delete. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
list(courseId, studentGroupId, pageSize=None, pageToken=None, x__xgafv=None)
Returns a list of students in a group. This method returns the following error codes: * `NOT_FOUND` if the course or student group does not exist.

Args:
  courseId: string, Required. The identifier of the course. (required)
  studentGroupId: string, Required. The identifier of the student group. (required)
  pageSize: 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.
  pageToken: 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.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response when listing students in a group.
  "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further results are available.
  "studentGroupMembers": [ # The student group members.
    { # A student member in a student group.
      "courseId": "A String", # The identifier of the course.
      "studentGroupId": "A String", # The identifier of the student group.
      "userId": "A String", # Identifier of the student.
    },
  ],
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.