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
- type Course
- type CourseAlias
- type CoursesAliasesCreateCall
- type CoursesAliasesDeleteCall
- type CoursesAliasesListCall
- func (c *CoursesAliasesListCall) Context(ctx context.Context) *CoursesAliasesListCall
- func (c *CoursesAliasesListCall) Do() (*ListCourseAliasesResponse, error)
- func (c *CoursesAliasesListCall) Fields(s ...googleapi.Field) *CoursesAliasesListCall
- func (c *CoursesAliasesListCall) IfNoneMatch(entityTag string) *CoursesAliasesListCall
- func (c *CoursesAliasesListCall) PageSize(pageSize int64) *CoursesAliasesListCall
- func (c *CoursesAliasesListCall) PageToken(pageToken string) *CoursesAliasesListCall
- type CoursesAliasesService
- type CoursesCreateCall
- type CoursesDeleteCall
- type CoursesGetCall
- type CoursesListCall
- func (c *CoursesListCall) Context(ctx context.Context) *CoursesListCall
- func (c *CoursesListCall) Do() (*ListCoursesResponse, error)
- func (c *CoursesListCall) Fields(s ...googleapi.Field) *CoursesListCall
- func (c *CoursesListCall) IfNoneMatch(entityTag string) *CoursesListCall
- func (c *CoursesListCall) PageSize(pageSize int64) *CoursesListCall
- func (c *CoursesListCall) PageToken(pageToken string) *CoursesListCall
- func (c *CoursesListCall) StudentId(studentId string) *CoursesListCall
- func (c *CoursesListCall) TeacherId(teacherId string) *CoursesListCall
- type CoursesPatchCall
- type CoursesService
- func (r *CoursesService) Create(course *Course) *CoursesCreateCall
- func (r *CoursesService) Delete(id string) *CoursesDeleteCall
- func (r *CoursesService) Get(id string) *CoursesGetCall
- func (r *CoursesService) List() *CoursesListCall
- func (r *CoursesService) Patch(id string, course *Course) *CoursesPatchCall
- func (r *CoursesService) Update(id string, course *Course) *CoursesUpdateCall
- type CoursesStudentsCreateCall
- func (c *CoursesStudentsCreateCall) Context(ctx context.Context) *CoursesStudentsCreateCall
- func (c *CoursesStudentsCreateCall) Do() (*Student, error)
- func (c *CoursesStudentsCreateCall) EnrollmentCode(enrollmentCode string) *CoursesStudentsCreateCall
- func (c *CoursesStudentsCreateCall) Fields(s ...googleapi.Field) *CoursesStudentsCreateCall
- type CoursesStudentsDeleteCall
- type CoursesStudentsGetCall
- func (c *CoursesStudentsGetCall) Context(ctx context.Context) *CoursesStudentsGetCall
- func (c *CoursesStudentsGetCall) Do() (*Student, error)
- func (c *CoursesStudentsGetCall) Fields(s ...googleapi.Field) *CoursesStudentsGetCall
- func (c *CoursesStudentsGetCall) IfNoneMatch(entityTag string) *CoursesStudentsGetCall
- type CoursesStudentsListCall
- func (c *CoursesStudentsListCall) Context(ctx context.Context) *CoursesStudentsListCall
- func (c *CoursesStudentsListCall) Do() (*ListStudentsResponse, error)
- func (c *CoursesStudentsListCall) Fields(s ...googleapi.Field) *CoursesStudentsListCall
- func (c *CoursesStudentsListCall) IfNoneMatch(entityTag string) *CoursesStudentsListCall
- func (c *CoursesStudentsListCall) PageSize(pageSize int64) *CoursesStudentsListCall
- func (c *CoursesStudentsListCall) PageToken(pageToken string) *CoursesStudentsListCall
- type CoursesStudentsService
- func (r *CoursesStudentsService) Create(courseId string, student *Student) *CoursesStudentsCreateCall
- func (r *CoursesStudentsService) Delete(courseId string, userId string) *CoursesStudentsDeleteCall
- func (r *CoursesStudentsService) Get(courseId string, userId string) *CoursesStudentsGetCall
- func (r *CoursesStudentsService) List(courseId string) *CoursesStudentsListCall
- type CoursesTeachersCreateCall
- type CoursesTeachersDeleteCall
- type CoursesTeachersGetCall
- func (c *CoursesTeachersGetCall) Context(ctx context.Context) *CoursesTeachersGetCall
- func (c *CoursesTeachersGetCall) Do() (*Teacher, error)
- func (c *CoursesTeachersGetCall) Fields(s ...googleapi.Field) *CoursesTeachersGetCall
- func (c *CoursesTeachersGetCall) IfNoneMatch(entityTag string) *CoursesTeachersGetCall
- type CoursesTeachersListCall
- func (c *CoursesTeachersListCall) Context(ctx context.Context) *CoursesTeachersListCall
- func (c *CoursesTeachersListCall) Do() (*ListTeachersResponse, error)
- func (c *CoursesTeachersListCall) Fields(s ...googleapi.Field) *CoursesTeachersListCall
- func (c *CoursesTeachersListCall) IfNoneMatch(entityTag string) *CoursesTeachersListCall
- func (c *CoursesTeachersListCall) PageSize(pageSize int64) *CoursesTeachersListCall
- func (c *CoursesTeachersListCall) PageToken(pageToken string) *CoursesTeachersListCall
- type CoursesTeachersService
- func (r *CoursesTeachersService) Create(courseId string, teacher *Teacher) *CoursesTeachersCreateCall
- func (r *CoursesTeachersService) Delete(courseId string, userId string) *CoursesTeachersDeleteCall
- func (r *CoursesTeachersService) Get(courseId string, userId string) *CoursesTeachersGetCall
- func (r *CoursesTeachersService) List(courseId string) *CoursesTeachersListCall
- type CoursesUpdateCall
- type Empty
- type GlobalPermission
- type Invitation
- type InvitationsAcceptCall
- type InvitationsCreateCall
- type InvitationsDeleteCall
- type InvitationsGetCall
- type InvitationsListCall
- func (c *InvitationsListCall) Context(ctx context.Context) *InvitationsListCall
- func (c *InvitationsListCall) CourseId(courseId string) *InvitationsListCall
- func (c *InvitationsListCall) Do() (*ListInvitationsResponse, error)
- func (c *InvitationsListCall) Fields(s ...googleapi.Field) *InvitationsListCall
- func (c *InvitationsListCall) IfNoneMatch(entityTag string) *InvitationsListCall
- func (c *InvitationsListCall) PageSize(pageSize int64) *InvitationsListCall
- func (c *InvitationsListCall) PageToken(pageToken string) *InvitationsListCall
- func (c *InvitationsListCall) UserId(userId string) *InvitationsListCall
- type InvitationsService
- func (r *InvitationsService) Accept(id string) *InvitationsAcceptCall
- func (r *InvitationsService) Create(invitation *Invitation) *InvitationsCreateCall
- func (r *InvitationsService) Delete(id string) *InvitationsDeleteCall
- func (r *InvitationsService) Get(id string) *InvitationsGetCall
- func (r *InvitationsService) List() *InvitationsListCall
- type ListCourseAliasesResponse
- type ListCoursesResponse
- type ListInvitationsResponse
- type ListStudentsResponse
- type ListTeachersResponse
- type Name
- type Service
- type Student
- type Teacher
- type UserProfile
- type UserProfilesGetCall
- type UserProfilesService
Constants ¶
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][google.classroom.v1.Courses.CreateCourse], you may // optionally set this identifier to an [alias // string][google.classroom.v1.CourseAlias] 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][google.classroom.v1.Courses.CreateCourse], 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 ¶
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 ¶
func (c *CoursesAliasesCreateCall) Context(ctx context.Context) *CoursesAliasesCreateCall
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 ¶
func (c *CoursesAliasesCreateCall) Do() (*CourseAlias, error)
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 ¶
func (c *CoursesAliasesCreateCall) Fields(s ...googleapi.Field) *CoursesAliasesCreateCall
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 ¶
func (c *CoursesAliasesDeleteCall) Context(ctx context.Context) *CoursesAliasesDeleteCall
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 ¶
func (c *CoursesAliasesDeleteCall) Fields(s ...googleapi.Field) *CoursesAliasesDeleteCall
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 ¶
func (c *CoursesAliasesListCall) Context(ctx context.Context) *CoursesAliasesListCall
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 ¶
func (c *CoursesAliasesListCall) Do() (*ListCourseAliasesResponse, error)
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 ¶
func (c *CoursesAliasesListCall) Fields(s ...googleapi.Field) *CoursesAliasesListCall
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][google.classroom.v1.ListCourseAliasesResponse.next_pag e_token] value returned from a previous [list][google.classroom.v1.Courses.ListCourseAliases] call, indicating that the subsequent page of results should be returned. The [list][google.classroom.v1.Courses.ListCourseAliases] 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 [general user permission errors][User Permission 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 [general user permission errors][User Permission Errors]. * `NOT_FOUND` if the alias does not exist.
func (*CoursesAliasesService) List ¶
func (r *CoursesAliasesService) List(courseId string) *CoursesAliasesListCall
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 [general user permission errors][User Permission Errors]. * `NOT_FOUND` if the course does not exist.
type CoursesCreateCall ¶
type CoursesCreateCall struct {
// contains filtered or unexported fields
}
func (*CoursesCreateCall) Context ¶
func (c *CoursesCreateCall) Context(ctx context.Context) *CoursesCreateCall
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 ¶
func (c *CoursesCreateCall) Fields(s ...googleapi.Field) *CoursesCreateCall
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 ¶
func (c *CoursesDeleteCall) Context(ctx context.Context) *CoursesDeleteCall
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 ¶
func (c *CoursesDeleteCall) Fields(s ...googleapi.Field) *CoursesDeleteCall
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 ¶
func (c *CoursesListCall) Context(ctx context.Context) *CoursesListCall
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 ¶
func (c *CoursesListCall) Do() (*ListCoursesResponse, error)
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 ¶
func (c *CoursesListCall) Fields(s ...googleapi.Field) *CoursesListCall
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][google.classroom.v1.ListCoursesResponse.next_page_toke n] value returned from a previous [list][google.classroom.v1.Courses.ListCourses] call, indicating that the subsequent page of results should be returned. The [list][google.classroom.v1.Courses.ListCourses] 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 ¶
func (c *CoursesPatchCall) Context(ctx context.Context) *CoursesPatchCall
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 ¶
func (c *CoursesPatchCall) Fields(s ...googleapi.Field) *CoursesPatchCall
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 [general user permission errors][User Permission Errors]. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled. * `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 [general user permission errors][User Permission 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 [general user permission errors][User Permission 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 [general user permission errors][User Permission 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 [general user permission errors][User Permission 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.
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 [general user permission errors][User Permission Errors]. * `NOT_FOUND` if no course exists with the requested ID.
type CoursesStudentsCreateCall ¶
type CoursesStudentsCreateCall struct {
// contains filtered or unexported fields
}
func (*CoursesStudentsCreateCall) Context ¶
func (c *CoursesStudentsCreateCall) Context(ctx context.Context) *CoursesStudentsCreateCall
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 ¶
func (c *CoursesStudentsCreateCall) Do() (*Student, error)
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][google.classroom.v1.Student.user_id] 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 ¶
func (c *CoursesStudentsCreateCall) Fields(s ...googleapi.Field) *CoursesStudentsCreateCall
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 ¶
func (c *CoursesStudentsDeleteCall) Context(ctx context.Context) *CoursesStudentsDeleteCall
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 ¶
func (c *CoursesStudentsDeleteCall) Do() (*Empty, error)
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 ¶
func (c *CoursesStudentsDeleteCall) Fields(s ...googleapi.Field) *CoursesStudentsDeleteCall
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 ¶
func (c *CoursesStudentsGetCall) Context(ctx context.Context) *CoursesStudentsGetCall
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 ¶
func (c *CoursesStudentsGetCall) Fields(s ...googleapi.Field) *CoursesStudentsGetCall
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 ¶
func (c *CoursesStudentsListCall) Context(ctx context.Context) *CoursesStudentsListCall
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 ¶
func (c *CoursesStudentsListCall) Do() (*ListStudentsResponse, error)
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 ¶
func (c *CoursesStudentsListCall) Fields(s ...googleapi.Field) *CoursesStudentsListCall
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][google.classroom.v1.ListStudentsResponse.next_page_tok en] value returned from a previous [list][google.classroom.v1.Users.ListStudents] call, indicating that the subsequent page of results should be returned. The [list][google.classroom.v1.Users.ListStudents] 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 [general user permission errors][User Permission Errors]. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled. * `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 [general user permission errors][User Permission 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 [general user permission errors][User Permission Errors]. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist.
func (*CoursesStudentsService) List ¶
func (r *CoursesStudentsService) List(courseId string) *CoursesStudentsListCall
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 [general user permission errors][User Permission Errors].
type CoursesTeachersCreateCall ¶
type CoursesTeachersCreateCall struct {
// contains filtered or unexported fields
}
func (*CoursesTeachersCreateCall) Context ¶
func (c *CoursesTeachersCreateCall) Context(ctx context.Context) *CoursesTeachersCreateCall
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 ¶
func (c *CoursesTeachersCreateCall) Do() (*Teacher, error)
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 ¶
func (c *CoursesTeachersCreateCall) Fields(s ...googleapi.Field) *CoursesTeachersCreateCall
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 ¶
func (c *CoursesTeachersDeleteCall) Context(ctx context.Context) *CoursesTeachersDeleteCall
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 ¶
func (c *CoursesTeachersDeleteCall) Do() (*Empty, error)
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 ¶
func (c *CoursesTeachersDeleteCall) Fields(s ...googleapi.Field) *CoursesTeachersDeleteCall
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 ¶
func (c *CoursesTeachersGetCall) Context(ctx context.Context) *CoursesTeachersGetCall
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 ¶
func (c *CoursesTeachersGetCall) Fields(s ...googleapi.Field) *CoursesTeachersGetCall
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 ¶
func (c *CoursesTeachersListCall) Context(ctx context.Context) *CoursesTeachersListCall
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 ¶
func (c *CoursesTeachersListCall) Do() (*ListTeachersResponse, error)
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 ¶
func (c *CoursesTeachersListCall) Fields(s ...googleapi.Field) *CoursesTeachersListCall
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][google.classroom.v1.ListTeachersResponse.next_page_tok en] value returned from a previous [list][google.classroom.v1.Users.ListTeachers] call, indicating that the subsequent page of results should be returned. The [list][google.classroom.v1.Users.ListTeachers] 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 [general user permission errors][User Permission Errors]. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled. * `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 [general user permission errors][User Permission 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 [general user permission errors][User Permission Errors]. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist.
func (*CoursesTeachersService) List ¶
func (r *CoursesTeachersService) List(courseId string) *CoursesTeachersListCall
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 [general user permission errors][User Permission Errors].
type CoursesUpdateCall ¶
type CoursesUpdateCall struct {
// contains filtered or unexported fields
}
func (*CoursesUpdateCall) Context ¶
func (c *CoursesUpdateCall) Context(ctx context.Context) *CoursesUpdateCall
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 ¶
func (c *CoursesUpdateCall) Fields(s ...googleapi.Field) *CoursesUpdateCall
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 ¶
func (c *InvitationsAcceptCall) Context(ctx context.Context) *InvitationsAcceptCall
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 ¶
func (c *InvitationsAcceptCall) Fields(s ...googleapi.Field) *InvitationsAcceptCall
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 ¶
func (c *InvitationsCreateCall) Context(ctx context.Context) *InvitationsCreateCall
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 ¶
func (c *InvitationsCreateCall) Do() (*Invitation, error)
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 ¶
func (c *InvitationsCreateCall) Fields(s ...googleapi.Field) *InvitationsCreateCall
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 ¶
func (c *InvitationsDeleteCall) Context(ctx context.Context) *InvitationsDeleteCall
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 ¶
func (c *InvitationsDeleteCall) Fields(s ...googleapi.Field) *InvitationsDeleteCall
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 ¶
func (c *InvitationsGetCall) Context(ctx context.Context) *InvitationsGetCall
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 ¶
func (c *InvitationsGetCall) Fields(s ...googleapi.Field) *InvitationsGetCall
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 ¶
func (c *InvitationsListCall) Context(ctx context.Context) *InvitationsListCall
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 ¶
func (c *InvitationsListCall) Do() (*ListInvitationsResponse, error)
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 ¶
func (c *InvitationsListCall) Fields(s ...googleapi.Field) *InvitationsListCall
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][google.classroom.v1.ListInvitationsResponse.next_page_ token] value returned from a previous [list][google.classroom.v1.Invitations.ListInvitations] call, indicating that the subsequent page of results should be returned. The [list][google.classroom.v1.Invitations.ListInvitations] 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 ¶
func (r *InvitationsService) Accept(id string) *InvitationsAcceptCall
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 [general user permission errors][User Permission Errors]. * `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 [general user permission errors][User Permission 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 ¶
func (r *InvitationsService) Delete(id string) *InvitationsDeleteCall
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 [general user permission errors][User Permission Errors]. * `NOT_FOUND` if no invitation exists with the requested ID.
func (*InvitationsService) Get ¶
func (r *InvitationsService) Get(id string) *InvitationsGetCall
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 [general user permission errors][User Permission Errors]. * `NOT_FOUND` if no invitation exists with the requested ID.
func (*InvitationsService) List ¶
func (r *InvitationsService) List() *InvitationsListCall
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 [general user permission errors][User Permission 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 ¶
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 }
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 ¶
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 ¶
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 ¶
func (c *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall
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 ¶
func (c *UserProfilesGetCall) Do() (*UserProfile, error)
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 ¶
func (c *UserProfilesGetCall) Fields(s ...googleapi.Field) *UserProfilesGetCall
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 ¶
func (r *UserProfilesService) Get(userId string) *UserProfilesGetCall
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 [general user permission errors][User Permission Errors].