classroom

package
v2.3.1-rc.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2016 License: BSD-3-Clause, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package classroom provides access to the Google Classroom API.

See https://developers.google.com/classroom/

Usage example:

import "google.golang.org/api/classroom/v1"
...
classroomService, err := classroom.New(oauthHttpClient)

Index

Constants

View Source
const (
	// Manage your Google Classroom classes
	ClassroomCoursesScope = "https://www.googleapis.com/auth/classroom.courses"

	// View your Google Classroom classes
	ClassroomCoursesReadonlyScope = "https://www.googleapis.com/auth/classroom.courses.readonly"

	// View the email addresses of people in your classes
	ClassroomProfileEmailsScope = "https://www.googleapis.com/auth/classroom.profile.emails"

	// View the profile photos of people in your classes
	ClassroomProfilePhotosScope = "https://www.googleapis.com/auth/classroom.profile.photos"

	// Manage your Google Classroom class rosters
	ClassroomRostersScope = "https://www.googleapis.com/auth/classroom.rosters"

	// View your Google Classroom class rosters
	ClassroomRostersReadonlyScope = "https://www.googleapis.com/auth/classroom.rosters.readonly"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type Course

type Course struct {
	// AlternateLink: Absolute link to this course in the Classroom web UI.
	// Read-only.
	AlternateLink string `json:"alternateLink,omitempty"`

	// CourseState: State of the course. If unspecified, the default state
	// is `PROVISIONED`.
	//
	// Possible values:
	//   "COURSE_STATE_UNSPECIFIED"
	//   "ACTIVE"
	//   "ARCHIVED"
	//   "PROVISIONED"
	//   "DECLINED"
	CourseState string `json:"courseState,omitempty"`

	// CreationTime: Creation time of the course. Specifying this field in a
	// course update mask will result in an error. Read-only.
	CreationTime string `json:"creationTime,omitempty"`

	// Description: Optional description. For example, "We'll be learning
	// about the structure of living creatures from a combination of
	// textbooks, guest lectures, and lab work. Expect to be excited!" If
	// set, this field must be a valid UTF-8 string and no longer than
	// 30,000 characters.
	Description string `json:"description,omitempty"`

	// DescriptionHeading: Optional heading for the description. For
	// example, "Welcome to 10th Grade Biology." If set, this field must be
	// a valid UTF-8 string and no longer than 3600 characters.
	DescriptionHeading string `json:"descriptionHeading,omitempty"`

	// EnrollmentCode: Enrollment code to use when joining this course.
	// Specifying this field in a course update mask will result in an
	// error. Read-only.
	EnrollmentCode string `json:"enrollmentCode,omitempty"`

	// Id: Identifier for this course assigned by Classroom. When creating a
	// course, you may optionally set this identifier to an alias string in
	// the request to create a corresponding alias. The `id` is still
	// assigned by Classroom and cannot be updated after the course is
	// created. Specifying this field in a course update mask will result in
	// an error.
	Id string `json:"id,omitempty"`

	// Name: Name of the course. For example, "10th Grade Biology". The name
	// is required. It must be between 1 and 750 characters and a valid
	// UTF-8 string.
	Name string `json:"name,omitempty"`

	// OwnerId: The identifier of the owner of a course. When specified as a
	// parameter of a create course request, this field is required. 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 This must be set in a create request.
	// Specifying this field in a course update mask will result in an
	// `INVALID_ARGUMENT` error.
	OwnerId string `json:"ownerId,omitempty"`

	// Room: Optional room location. For example, "301". If set, this field
	// must be a valid UTF-8 string and no longer than 650 characters.
	Room string `json:"room,omitempty"`

	// Section: Section of the course. For example, "Period 2". If set, this
	// field must be a valid UTF-8 string and no longer than 2800
	// characters.
	Section string `json:"section,omitempty"`

	// UpdateTime: Time of the most recent update to this course. Specifying
	// this field in a course update mask will result in an error.
	// Read-only.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AlternateLink") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Course: A Course in Classroom.

func (*Course) MarshalJSON

func (s *Course) MarshalJSON() ([]byte, error)

type CourseAlias

type CourseAlias struct {
	// Alias: Alias string. The format of the string indicates the desired
	// alias scoping. * `d:` indicates a domain-scoped alias. Example:
	// `d:math_101` * `p:` indicates a project-scoped alias. Example:
	// `p:abc123` This field has a maximum length of 256 characters.
	Alias string `json:"alias,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Alias") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

CourseAlias: Alternative identifier for a course. An alias uniquely identifies a course. It must be unique within one of the following scopes: * domain: A domain-scoped alias is visible to all users within the alias creator's domain and can be created only by a domain admin. A domain-scoped alias is often used when a course has an identifier external to Classroom. * project: A project-scoped alias is visible to any request from an application using the Developer Console project ID that created the alias and can be created by any project. A project-scoped alias is often used when an application has alternative identifiers. A random value can also be used to avoid duplicate courses in the event of transmission failures, as retrying a request will return `ALREADY_EXISTS` if a previous one has succeeded.

func (*CourseAlias) MarshalJSON

func (s *CourseAlias) MarshalJSON() ([]byte, error)

type CoursesAliasesCreateCall

type CoursesAliasesCreateCall struct {
	// contains filtered or unexported fields
}

func (*CoursesAliasesCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesAliasesCreateCall) Do

Do executes the "classroom.courses.aliases.create" call. Exactly one of *CourseAlias or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CourseAlias.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesAliasesCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesAliasesDeleteCall

type CoursesAliasesDeleteCall struct {
	// contains filtered or unexported fields
}

func (*CoursesAliasesDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesAliasesDeleteCall) Do

func (c *CoursesAliasesDeleteCall) Do() (*Empty, error)

Do executes the "classroom.courses.aliases.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesAliasesDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesAliasesListCall

type CoursesAliasesListCall struct {
	// contains filtered or unexported fields
}

func (*CoursesAliasesListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesAliasesListCall) Do

Do executes the "classroom.courses.aliases.list" call. Exactly one of *ListCourseAliasesResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListCourseAliasesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesAliasesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesAliasesListCall) IfNoneMatch

func (c *CoursesAliasesListCall) IfNoneMatch(entityTag string) *CoursesAliasesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*CoursesAliasesListCall) PageSize

func (c *CoursesAliasesListCall) PageSize(pageSize int64) *CoursesAliasesListCall

PageSize sets the optional parameter "pageSize": 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.

func (*CoursesAliasesListCall) PageToken

func (c *CoursesAliasesListCall) PageToken(pageToken string) *CoursesAliasesListCall

PageToken sets the optional parameter "pageToken": 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.

type CoursesAliasesService

type CoursesAliasesService struct {
	// contains filtered or unexported fields
}

func NewCoursesAliasesService

func NewCoursesAliasesService(s *Service) *CoursesAliasesService

func (*CoursesAliasesService) Create

func (r *CoursesAliasesService) Create(courseId string, coursealias *CourseAlias) *CoursesAliasesCreateCall

Create: 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.

func (*CoursesAliasesService) Delete

func (r *CoursesAliasesService) Delete(courseId string, aliasid string) *CoursesAliasesDeleteCall

Delete: 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.

func (*CoursesAliasesService) List

List: 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.

type CoursesCreateCall

type CoursesCreateCall struct {
	// contains filtered or unexported fields
}

func (*CoursesCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesCreateCall) Do

func (c *CoursesCreateCall) Do() (*Course, error)

Do executes the "classroom.courses.create" call. Exactly one of *Course or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Course.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesDeleteCall

type CoursesDeleteCall struct {
	// contains filtered or unexported fields
}

func (*CoursesDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesDeleteCall) Do

func (c *CoursesDeleteCall) Do() (*Empty, error)

Do executes the "classroom.courses.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesGetCall

type CoursesGetCall struct {
	// contains filtered or unexported fields
}

func (*CoursesGetCall) Context

func (c *CoursesGetCall) Context(ctx context.Context) *CoursesGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesGetCall) Do

func (c *CoursesGetCall) Do() (*Course, error)

Do executes the "classroom.courses.get" call. Exactly one of *Course or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Course.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesGetCall) Fields

func (c *CoursesGetCall) Fields(s ...googleapi.Field) *CoursesGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesGetCall) IfNoneMatch

func (c *CoursesGetCall) IfNoneMatch(entityTag string) *CoursesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type CoursesListCall

type CoursesListCall struct {
	// contains filtered or unexported fields
}

func (*CoursesListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesListCall) Do

Do executes the "classroom.courses.list" call. Exactly one of *ListCoursesResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListCoursesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesListCall) IfNoneMatch

func (c *CoursesListCall) IfNoneMatch(entityTag string) *CoursesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*CoursesListCall) PageSize

func (c *CoursesListCall) PageSize(pageSize int64) *CoursesListCall

PageSize sets the optional parameter "pageSize": 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.

func (*CoursesListCall) PageToken

func (c *CoursesListCall) PageToken(pageToken string) *CoursesListCall

PageToken sets the optional parameter "pageToken": 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.

func (*CoursesListCall) StudentId

func (c *CoursesListCall) StudentId(studentId string) *CoursesListCall

StudentId sets the optional parameter "studentId": 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

func (*CoursesListCall) TeacherId

func (c *CoursesListCall) TeacherId(teacherId string) *CoursesListCall

TeacherId sets the optional parameter "teacherId": 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

type CoursesPatchCall

type CoursesPatchCall struct {
	// contains filtered or unexported fields
}

func (*CoursesPatchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesPatchCall) Do

func (c *CoursesPatchCall) Do() (*Course, error)

Do executes the "classroom.courses.patch" call. Exactly one of *Course or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Course.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesPatchCall) UpdateMask

func (c *CoursesPatchCall) UpdateMask(updateMask string) *CoursesPatchCall

UpdateMask sets the optional parameter "updateMask": 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` When set in a query parameter, this field should be specified as `updateMask=,,...`

type CoursesService

type CoursesService struct {
	Aliases *CoursesAliasesService

	Students *CoursesStudentsService

	Teachers *CoursesTeachersService
	// contains filtered or unexported fields
}

func NewCoursesService

func NewCoursesService(s *Service) *CoursesService

func (*CoursesService) Create

func (r *CoursesService) Create(course *Course) *CoursesCreateCall

Create: 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.

func (*CoursesService) Delete

func (r *CoursesService) Delete(id string) *CoursesDeleteCall

Delete: 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.

func (*CoursesService) Get

func (r *CoursesService) Get(id string) *CoursesGetCall

Get: 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.

func (*CoursesService) List

func (r *CoursesService) List() *CoursesListCall

List: Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. 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.

func (*CoursesService) Patch

func (r *CoursesService) Patch(id string, course *Course) *CoursesPatchCall

Patch: 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

func (*CoursesService) Update

func (r *CoursesService) Update(id string, course *Course) *CoursesUpdateCall

Update: 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

type CoursesStudentsCreateCall

type CoursesStudentsCreateCall struct {
	// contains filtered or unexported fields
}

func (*CoursesStudentsCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesStudentsCreateCall) Do

Do executes the "classroom.courses.students.create" call. Exactly one of *Student or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Student.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesStudentsCreateCall) EnrollmentCode

func (c *CoursesStudentsCreateCall) EnrollmentCode(enrollmentCode string) *CoursesStudentsCreateCall

EnrollmentCode sets the optional parameter "enrollmentCode": 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.

func (*CoursesStudentsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesStudentsDeleteCall

type CoursesStudentsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*CoursesStudentsDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesStudentsDeleteCall) Do

Do executes the "classroom.courses.students.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesStudentsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesStudentsGetCall

type CoursesStudentsGetCall struct {
	// contains filtered or unexported fields
}

func (*CoursesStudentsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesStudentsGetCall) Do

func (c *CoursesStudentsGetCall) Do() (*Student, error)

Do executes the "classroom.courses.students.get" call. Exactly one of *Student or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Student.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesStudentsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesStudentsGetCall) IfNoneMatch

func (c *CoursesStudentsGetCall) IfNoneMatch(entityTag string) *CoursesStudentsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type CoursesStudentsListCall

type CoursesStudentsListCall struct {
	// contains filtered or unexported fields
}

func (*CoursesStudentsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesStudentsListCall) Do

Do executes the "classroom.courses.students.list" call. Exactly one of *ListStudentsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListStudentsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesStudentsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesStudentsListCall) IfNoneMatch

func (c *CoursesStudentsListCall) IfNoneMatch(entityTag string) *CoursesStudentsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*CoursesStudentsListCall) PageSize

func (c *CoursesStudentsListCall) PageSize(pageSize int64) *CoursesStudentsListCall

PageSize sets the optional parameter "pageSize": Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.

func (*CoursesStudentsListCall) PageToken

func (c *CoursesStudentsListCall) PageToken(pageToken string) *CoursesStudentsListCall

PageToken sets the optional parameter "pageToken": 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.

type CoursesStudentsService

type CoursesStudentsService struct {
	// contains filtered or unexported fields
}

func NewCoursesStudentsService

func NewCoursesStudentsService(s *Service) *CoursesStudentsService

func (*CoursesStudentsService) Create

func (r *CoursesStudentsService) Create(courseId string, student *Student) *CoursesStudentsCreateCall

Create: 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.

func (*CoursesStudentsService) Delete

func (r *CoursesStudentsService) Delete(courseId string, userId string) *CoursesStudentsDeleteCall

Delete: 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.

func (*CoursesStudentsService) Get

func (r *CoursesStudentsService) Get(courseId string, userId string) *CoursesStudentsGetCall

Get: 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.

func (*CoursesStudentsService) List

List: 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.

type CoursesTeachersCreateCall

type CoursesTeachersCreateCall struct {
	// contains filtered or unexported fields
}

func (*CoursesTeachersCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesTeachersCreateCall) Do

Do executes the "classroom.courses.teachers.create" call. Exactly one of *Teacher or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Teacher.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesTeachersCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesTeachersDeleteCall

type CoursesTeachersDeleteCall struct {
	// contains filtered or unexported fields
}

func (*CoursesTeachersDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesTeachersDeleteCall) Do

Do executes the "classroom.courses.teachers.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesTeachersDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesTeachersGetCall

type CoursesTeachersGetCall struct {
	// contains filtered or unexported fields
}

func (*CoursesTeachersGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesTeachersGetCall) Do

func (c *CoursesTeachersGetCall) Do() (*Teacher, error)

Do executes the "classroom.courses.teachers.get" call. Exactly one of *Teacher or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Teacher.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesTeachersGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesTeachersGetCall) IfNoneMatch

func (c *CoursesTeachersGetCall) IfNoneMatch(entityTag string) *CoursesTeachersGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type CoursesTeachersListCall

type CoursesTeachersListCall struct {
	// contains filtered or unexported fields
}

func (*CoursesTeachersListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesTeachersListCall) Do

Do executes the "classroom.courses.teachers.list" call. Exactly one of *ListTeachersResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListTeachersResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesTeachersListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesTeachersListCall) IfNoneMatch

func (c *CoursesTeachersListCall) IfNoneMatch(entityTag string) *CoursesTeachersListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*CoursesTeachersListCall) PageSize

func (c *CoursesTeachersListCall) PageSize(pageSize int64) *CoursesTeachersListCall

PageSize sets the optional parameter "pageSize": Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.

func (*CoursesTeachersListCall) PageToken

func (c *CoursesTeachersListCall) PageToken(pageToken string) *CoursesTeachersListCall

PageToken sets the optional parameter "pageToken": 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.

type CoursesTeachersService

type CoursesTeachersService struct {
	// contains filtered or unexported fields
}

func NewCoursesTeachersService

func NewCoursesTeachersService(s *Service) *CoursesTeachersService

func (*CoursesTeachersService) Create

func (r *CoursesTeachersService) Create(courseId string, teacher *Teacher) *CoursesTeachersCreateCall

Create: 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.

func (*CoursesTeachersService) Delete

func (r *CoursesTeachersService) Delete(courseId string, userId string) *CoursesTeachersDeleteCall

Delete: 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.

func (*CoursesTeachersService) Get

func (r *CoursesTeachersService) Get(courseId string, userId string) *CoursesTeachersGetCall

Get: 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.

func (*CoursesTeachersService) List

List: 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.

type CoursesUpdateCall

type CoursesUpdateCall struct {
	// contains filtered or unexported fields
}

func (*CoursesUpdateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CoursesUpdateCall) Do

func (c *CoursesUpdateCall) Do() (*Course, error)

Do executes the "classroom.courses.update" call. Exactly one of *Course or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Course.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CoursesUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type Empty

type Empty struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

Empty: 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); } The JSON representation for `Empty` is empty JSON object `{}`.

type GlobalPermission

type GlobalPermission struct {
	// Permission: Permission value.
	//
	// Possible values:
	//   "PERMISSION_UNSPECIFIED"
	//   "CREATE_COURSE"
	Permission string `json:"permission,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Permission") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

GlobalPermission: Global user permission description.

func (*GlobalPermission) MarshalJSON

func (s *GlobalPermission) MarshalJSON() ([]byte, error)

type Invitation

type Invitation struct {
	// CourseId: Identifier of the course to invite the user to.
	CourseId string `json:"courseId,omitempty"`

	// Id: Identifier assigned by Classroom. Read-only.
	Id string `json:"id,omitempty"`

	// Role: Role to invite the user to have. Must not be
	// `COURSE_ROLE_UNSPECIFIED`.
	//
	// Possible values:
	//   "COURSE_ROLE_UNSPECIFIED"
	//   "STUDENT"
	//   "TEACHER"
	Role string `json:"role,omitempty"`

	// UserId: Identifier of the invited user. When specified as a parameter
	// of a request, this identifier can be set to one of the following: *
	// the numeric identifier for the user * the email address of the user *
	// the string literal "me", indicating the requesting user
	UserId string `json:"userId,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "CourseId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Invitation: An invitation to join a course.

func (*Invitation) MarshalJSON

func (s *Invitation) MarshalJSON() ([]byte, error)

type InvitationsAcceptCall

type InvitationsAcceptCall struct {
	// contains filtered or unexported fields
}

func (*InvitationsAcceptCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InvitationsAcceptCall) Do

func (c *InvitationsAcceptCall) Do() (*Empty, error)

Do executes the "classroom.invitations.accept" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InvitationsAcceptCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type InvitationsCreateCall

type InvitationsCreateCall struct {
	// contains filtered or unexported fields
}

func (*InvitationsCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InvitationsCreateCall) Do

Do executes the "classroom.invitations.create" call. Exactly one of *Invitation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Invitation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InvitationsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type InvitationsDeleteCall

type InvitationsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*InvitationsDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InvitationsDeleteCall) Do

func (c *InvitationsDeleteCall) Do() (*Empty, error)

Do executes the "classroom.invitations.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InvitationsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type InvitationsGetCall

type InvitationsGetCall struct {
	// contains filtered or unexported fields
}

func (*InvitationsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InvitationsGetCall) Do

func (c *InvitationsGetCall) Do() (*Invitation, error)

Do executes the "classroom.invitations.get" call. Exactly one of *Invitation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Invitation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InvitationsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InvitationsGetCall) IfNoneMatch

func (c *InvitationsGetCall) IfNoneMatch(entityTag string) *InvitationsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type InvitationsListCall

type InvitationsListCall struct {
	// contains filtered or unexported fields
}

func (*InvitationsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*InvitationsListCall) CourseId

func (c *InvitationsListCall) CourseId(courseId string) *InvitationsListCall

CourseId sets the optional parameter "courseId": Restricts returned invitations to those for a course with the specified identifier.

func (*InvitationsListCall) Do

Do executes the "classroom.invitations.list" call. Exactly one of *ListInvitationsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListInvitationsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*InvitationsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*InvitationsListCall) IfNoneMatch

func (c *InvitationsListCall) IfNoneMatch(entityTag string) *InvitationsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*InvitationsListCall) PageSize

func (c *InvitationsListCall) PageSize(pageSize int64) *InvitationsListCall

PageSize sets the optional parameter "pageSize": Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.

func (*InvitationsListCall) PageToken

func (c *InvitationsListCall) PageToken(pageToken string) *InvitationsListCall

PageToken sets the optional parameter "pageToken": 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.

func (*InvitationsListCall) UserId

func (c *InvitationsListCall) UserId(userId string) *InvitationsListCall

UserId sets the optional parameter "userId": 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

type InvitationsService

type InvitationsService struct {
	// contains filtered or unexported fields
}

func NewInvitationsService

func NewInvitationsService(s *Service) *InvitationsService

func (*InvitationsService) Accept

Accept: 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.

func (*InvitationsService) Create

func (r *InvitationsService) Create(invitation *Invitation) *InvitationsCreateCall

Create: 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.

func (*InvitationsService) Delete

Delete: 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.

func (*InvitationsService) Get

Get: 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.

func (*InvitationsService) List

List: 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.

type ListCourseAliasesResponse

type ListCourseAliasesResponse struct {
	// Aliases: The course aliases.
	Aliases []*CourseAlias `json:"aliases,omitempty"`

	// NextPageToken: Token identifying the next page of results to return.
	// If empty, no further results are available.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Aliases") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ListCourseAliasesResponse: Response when listing course aliases.

func (*ListCourseAliasesResponse) MarshalJSON

func (s *ListCourseAliasesResponse) MarshalJSON() ([]byte, error)

type ListCoursesResponse

type ListCoursesResponse struct {
	// Courses: Courses that match the list request.
	Courses []*Course `json:"courses,omitempty"`

	// NextPageToken: Token identifying the next page of results to return.
	// If empty, no further results are available.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Courses") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ListCoursesResponse: Response when listing courses.

func (*ListCoursesResponse) MarshalJSON

func (s *ListCoursesResponse) MarshalJSON() ([]byte, error)

type ListInvitationsResponse

type ListInvitationsResponse struct {
	// Invitations: Invitations that match the list request.
	Invitations []*Invitation `json:"invitations,omitempty"`

	// NextPageToken: Token identifying the next page of results to return.
	// If empty, no further results are available.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Invitations") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ListInvitationsResponse: Response when listing invitations.

func (*ListInvitationsResponse) MarshalJSON

func (s *ListInvitationsResponse) MarshalJSON() ([]byte, error)

type ListStudentsResponse

type ListStudentsResponse struct {
	// NextPageToken: Token identifying the next page of results to return.
	// If empty, no further results are available.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Students: Students who match the list request.
	Students []*Student `json:"students,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ListStudentsResponse: Response when listing students.

func (*ListStudentsResponse) MarshalJSON

func (s *ListStudentsResponse) MarshalJSON() ([]byte, error)

type ListTeachersResponse

type ListTeachersResponse struct {
	// NextPageToken: Token identifying the next page of results to return.
	// If empty, no further results are available.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Teachers: Teachers who match the list request.
	Teachers []*Teacher `json:"teachers,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

ListTeachersResponse: Response when listing teachers.

func (*ListTeachersResponse) MarshalJSON

func (s *ListTeachersResponse) MarshalJSON() ([]byte, error)

type Name

type Name struct {
	// FamilyName: The user's last name. Read-only.
	FamilyName string `json:"familyName,omitempty"`

	// FullName: The user's full name formed by concatenating the first and
	// last name values. Read-only.
	FullName string `json:"fullName,omitempty"`

	// GivenName: The user's first name. Read-only.
	GivenName string `json:"givenName,omitempty"`

	// ForceSendFields is a list of field names (e.g. "FamilyName") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Name: Details of the user's name.

func (*Name) MarshalJSON

func (s *Name) MarshalJSON() ([]byte, error)

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Courses *CoursesService

	Invitations *InvitationsService

	UserProfiles *UserProfilesService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

type Student

type Student struct {
	// CourseId: Identifier of the course. Read-only.
	CourseId string `json:"courseId,omitempty"`

	// Profile: Global user information for the student. Read-only.
	Profile *UserProfile `json:"profile,omitempty"`

	// UserId: Identifier of the user. When specified as a parameter of a
	// request, this 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
	UserId string `json:"userId,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "CourseId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Student: Student in a course.

func (*Student) MarshalJSON

func (s *Student) MarshalJSON() ([]byte, error)

type Teacher

type Teacher struct {
	// CourseId: Identifier of the course. Read-only.
	CourseId string `json:"courseId,omitempty"`

	// Profile: Global user information for the teacher. Read-only.
	Profile *UserProfile `json:"profile,omitempty"`

	// UserId: Identifier of the user. When specified as a parameter of a
	// request, this 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
	UserId string `json:"userId,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "CourseId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Teacher: Teacher of a course.

func (*Teacher) MarshalJSON

func (s *Teacher) MarshalJSON() ([]byte, error)

type UserProfile

type UserProfile struct {
	// EmailAddress: Email address of the user. Read-only.
	EmailAddress string `json:"emailAddress,omitempty"`

	// Id: Identifier of the user. Read-only.
	Id string `json:"id,omitempty"`

	// Name: Name of the user. Read-only.
	Name *Name `json:"name,omitempty"`

	// Permissions: Global permissions of the user. Read-only.
	Permissions []*GlobalPermission `json:"permissions,omitempty"`

	// PhotoUrl: URL of user's profile photo. Read-only.
	PhotoUrl string `json:"photoUrl,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "EmailAddress") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

UserProfile: Global information for a user.

func (*UserProfile) MarshalJSON

func (s *UserProfile) MarshalJSON() ([]byte, error)

type UserProfilesGetCall

type UserProfilesGetCall struct {
	// contains filtered or unexported fields
}

func (*UserProfilesGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*UserProfilesGetCall) Do

Do executes the "classroom.userProfiles.get" call. Exactly one of *UserProfile or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *UserProfile.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*UserProfilesGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UserProfilesGetCall) IfNoneMatch

func (c *UserProfilesGetCall) IfNoneMatch(entityTag string) *UserProfilesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type UserProfilesService

type UserProfilesService struct {
	// contains filtered or unexported fields
}

func NewUserProfilesService

func NewUserProfilesService(s *Service) *UserProfilesService

func (*UserProfilesService) Get

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL