classroom

package
v0.188.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: BSD-3-Clause Imports: 16 Imported by: 4

Documentation

Overview

Package classroom provides access to the Google Classroom API.

For product documentation, see: https://developers.google.com/classroom/

Library status

These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/classroom/v1"
...
ctx := context.Background()
classroomService, err := classroom.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use google.golang.org/api/option.WithScopes:

classroomService, err := classroom.NewService(ctx, option.WithScopes(classroom.ClassroomTopicsReadonlyScope))

To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:

classroomService, err := classroom.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
classroomService, err := classroom.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See google.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (
	// View and manage announcements in Google Classroom
	ClassroomAnnouncementsScope = "https://www.googleapis.com/auth/classroom.announcements"

	// View announcements in Google Classroom
	ClassroomAnnouncementsReadonlyScope = "https://www.googleapis.com/auth/classroom.announcements.readonly"

	// See, edit, create, and permanently delete 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"

	// See, create and edit coursework items including assignments, questions, and
	// grades
	ClassroomCourseworkMeScope = "https://www.googleapis.com/auth/classroom.coursework.me"

	// View your course work and grades in Google Classroom
	ClassroomCourseworkMeReadonlyScope = "https://www.googleapis.com/auth/classroom.coursework.me.readonly"

	// Manage course work and grades for students in the Google Classroom classes
	// you teach and view the course work and grades for classes you administer
	ClassroomCourseworkStudentsScope = "https://www.googleapis.com/auth/classroom.coursework.students"

	// View course work and grades for students in the Google Classroom classes you
	// teach or administer
	ClassroomCourseworkStudentsReadonlyScope = "https://www.googleapis.com/auth/classroom.coursework.students.readonly"

	// See, edit, and create classwork materials in Google Classroom
	ClassroomCourseworkmaterialsScope = "https://www.googleapis.com/auth/classroom.courseworkmaterials"

	// See all classwork materials for your Google Classroom classes
	ClassroomCourseworkmaterialsReadonlyScope = "https://www.googleapis.com/auth/classroom.courseworkmaterials.readonly"

	// View your Google Classroom guardians
	ClassroomGuardianlinksMeReadonlyScope = "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly"

	// View and manage guardians for students in your Google Classroom classes
	ClassroomGuardianlinksStudentsScope = "https://www.googleapis.com/auth/classroom.guardianlinks.students"

	// View guardians for students in your Google Classroom classes
	ClassroomGuardianlinksStudentsReadonlyScope = "https://www.googleapis.com/auth/classroom.guardianlinks.students.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"

	// Receive notifications about your Google Classroom data
	ClassroomPushNotificationsScope = "https://www.googleapis.com/auth/classroom.push-notifications"

	// 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"

	// View your course work and grades in Google Classroom
	ClassroomStudentSubmissionsMeReadonlyScope = "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly"

	// View course work and grades for students in the Google Classroom classes you
	// teach or administer
	ClassroomStudentSubmissionsStudentsReadonlyScope = "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly"

	// See, create, and edit topics in Google Classroom
	ClassroomTopicsScope = "https://www.googleapis.com/auth/classroom.topics"

	// View topics in Google Classroom
	ClassroomTopicsReadonlyScope = "https://www.googleapis.com/auth/classroom.topics.readonly"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOnAttachment added in v0.186.0

type AddOnAttachment struct {
	// CopyHistory: Output only. Identifiers of attachments that were previous
	// copies of this attachment. If the attachment was previously copied by virtue
	// of its parent post being copied, this enumerates the identifiers of
	// attachments that were its previous copies in ascending chronological order
	// of copy.
	CopyHistory []*CopyHistory `json:"copyHistory,omitempty"`
	// CourseId: Immutable. Identifier of the course.
	CourseId string `json:"courseId,omitempty"`
	// DueDate: Date, in UTC, that work on this attachment is due. This must be
	// specified if `due_time` is specified.
	DueDate *Date `json:"dueDate,omitempty"`
	// DueTime: Time of day, in UTC, that work on this attachment is due. This must
	// be specified if `due_date` is specified.
	DueTime *TimeOfDay `json:"dueTime,omitempty"`
	// Id: Immutable. Classroom-assigned identifier for this attachment, unique per
	// post.
	Id string `json:"id,omitempty"`
	// ItemId: Immutable. Identifier of the announcement, courseWork, or
	// courseWorkMaterial under which the attachment is attached. Unique per
	// course.
	ItemId string `json:"itemId,omitempty"`
	// MaxPoints: Maximum grade for this attachment. Can only be set if
	// `studentWorkReviewUri` is set. Set to a non-zero value to indicate that the
	// attachment supports grade passback. If set, this must be a non-negative
	// integer value. When set to zero, the attachment will not support grade
	// passback.
	MaxPoints float64 `json:"maxPoints,omitempty"`
	// PostId: Immutable. Deprecated, use item_id instead.
	PostId string `json:"postId,omitempty"`
	// StudentViewUri: Required. URI to show the student view of the attachment.
	// The URI will be opened in an iframe with the `courseId`, `postId`, and
	// `attachmentId` query parameters set.
	StudentViewUri *EmbedUri `json:"studentViewUri,omitempty"`
	// StudentWorkReviewUri: URI for the teacher to see student work on the
	// attachment, if applicable. The URI will be opened in an iframe with the
	// `courseId`, `postId`, `attachmentId`, and `submissionId` query parameters
	// set. This is the same `submissionId` returned by
	// google.classroom.AddOns.GetAddOnContext when a student views the attachment.
	// If the URI is omitted or removed, `max_points` will also be discarded.
	StudentWorkReviewUri *EmbedUri `json:"studentWorkReviewUri,omitempty"`
	// TeacherViewUri: Required. URI to show the teacher view of the attachment.
	// The URI will be opened in an iframe with the `courseId`, `postId`, and
	// `attachmentId` query parameters set.
	TeacherViewUri *EmbedUri `json:"teacherViewUri,omitempty"`
	// Title: Required. Title of this attachment. The title must be between 1 and
	// 1000 characters.
	Title string `json:"title,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "CopyHistory") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CopyHistory") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

AddOnAttachment: An add-on attachment on a post.

func (AddOnAttachment) MarshalJSON added in v0.186.0

func (s AddOnAttachment) MarshalJSON() ([]byte, error)

func (*AddOnAttachment) UnmarshalJSON added in v0.186.0

func (s *AddOnAttachment) UnmarshalJSON(data []byte) error

type AddOnAttachmentStudentSubmission added in v0.186.0

type AddOnAttachmentStudentSubmission struct {
	// PointsEarned: Student grade on this attachment. If unset, no grade was set.
	PointsEarned float64 `json:"pointsEarned,omitempty"`
	// PostSubmissionState: Submission state of add-on attachment's parent post
	// (i.e. assignment).
	//
	// Possible values:
	//   "SUBMISSION_STATE_UNSPECIFIED" - No state specified. This should never be
	// returned.
	//   "NEW" - The student has never accessed this submission. Attachments are
	// not returned and timestamps is not set.
	//   "CREATED" - Has been created.
	//   "TURNED_IN" - Has been turned in to the teacher.
	//   "RETURNED" - Has been returned to the student.
	//   "RECLAIMED_BY_STUDENT" - Student chose to "unsubmit" the assignment.
	PostSubmissionState string `json:"postSubmissionState,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "PointsEarned") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "PointsEarned") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

AddOnAttachmentStudentSubmission: Payload for grade update requests.

func (AddOnAttachmentStudentSubmission) MarshalJSON added in v0.186.0

func (s AddOnAttachmentStudentSubmission) MarshalJSON() ([]byte, error)

func (*AddOnAttachmentStudentSubmission) UnmarshalJSON added in v0.186.0

func (s *AddOnAttachmentStudentSubmission) UnmarshalJSON(data []byte) error

type AddOnContext added in v0.186.0

type AddOnContext struct {
	// CourseId: Immutable. Identifier of the course.
	CourseId string `json:"courseId,omitempty"`
	// ItemId: Immutable. Identifier of the announcement, courseWork, or
	// courseWorkMaterial under which the attachment is attached.
	ItemId string `json:"itemId,omitempty"`
	// PostId: Immutable. Deprecated, use item_id instead.
	PostId string `json:"postId,omitempty"`
	// StudentContext: Add-on context corresponding to the requesting user's role
	// as a student. Its presence implies that the requesting user is a student in
	// the course.
	StudentContext *StudentContext `json:"studentContext,omitempty"`
	// SupportsStudentWork: Optional. Whether the post allows the teacher to see
	// student work and passback grades.
	SupportsStudentWork bool `json:"supportsStudentWork,omitempty"`
	// TeacherContext: Add-on context corresponding to the requesting user's role
	// as a teacher. Its presence implies that the requesting user is a teacher in
	// the course.
	TeacherContext *TeacherContext `json:"teacherContext,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 or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CourseId") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

AddOnContext: Attachment-relevant metadata for Classroom add-ons in the context of a specific post.

func (AddOnContext) MarshalJSON added in v0.186.0

func (s AddOnContext) MarshalJSON() ([]byte, error)

type Announcement

type Announcement struct {
	// AlternateLink: Absolute link to this announcement in the Classroom web UI.
	// This is only populated if `state` is `PUBLISHED`. Read-only.
	AlternateLink string `json:"alternateLink,omitempty"`
	// AssigneeMode: Assignee mode of the announcement. If unspecified, the default
	// value is `ALL_STUDENTS`.
	//
	// Possible values:
	//   "ASSIGNEE_MODE_UNSPECIFIED" - No mode specified. This is never returned.
	//   "ALL_STUDENTS" - All students can see the item. This is the default state.
	//   "INDIVIDUAL_STUDENTS" - A subset of the students can see the item.
	AssigneeMode string `json:"assigneeMode,omitempty"`
	// CourseId: Identifier of the course. Read-only.
	CourseId string `json:"courseId,omitempty"`
	// CreationTime: Timestamp when this announcement was created. Read-only.
	CreationTime string `json:"creationTime,omitempty"`
	// CreatorUserId: Identifier for the user that created the announcement.
	// Read-only.
	CreatorUserId string `json:"creatorUserId,omitempty"`
	// Id: Classroom-assigned identifier of this announcement, unique per course.
	// Read-only.
	Id string `json:"id,omitempty"`
	// IndividualStudentsOptions: Identifiers of students with access to the
	// announcement. This field is set only if `assigneeMode` is
	// `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then
	// only students specified in this field can see the announcement.
	IndividualStudentsOptions *IndividualStudentsOptions `json:"individualStudentsOptions,omitempty"`
	// Materials: Additional materials. Announcements must have no more than 20
	// material items.
	Materials []*Material `json:"materials,omitempty"`
	// ScheduledTime: Optional timestamp when this announcement is scheduled to be
	// published.
	ScheduledTime string `json:"scheduledTime,omitempty"`
	// State: Status of this announcement. If unspecified, the default state is
	// `DRAFT`.
	//
	// Possible values:
	//   "ANNOUNCEMENT_STATE_UNSPECIFIED" - No state specified. This is never
	// returned.
	//   "PUBLISHED" - Status for announcement that has been published. This is the
	// default state.
	//   "DRAFT" - Status for an announcement that is not yet published.
	// Announcement in this state is visible only to course teachers and domain
	// administrators.
	//   "DELETED" - Status for announcement that was published but is now deleted.
	// Announcement in this state is visible only to course teachers and domain
	// administrators. Announcement in this state is deleted after some time.
	State string `json:"state,omitempty"`
	// Text: Description of this announcement. The text must be a valid UTF-8
	// string containing no more than 30,000 characters.
	Text string `json:"text,omitempty"`
	// UpdateTime: Timestamp of the most recent change to this announcement.
	// 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 or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AlternateLink") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Announcement: Announcement created by a teacher for students of the course

func (Announcement) MarshalJSON

func (s Announcement) MarshalJSON() ([]byte, error)

type Assignment

type Assignment struct {
	// StudentWorkFolder: Drive folder where attachments from student submissions
	// are placed. This is only populated for course teachers and administrators.
	StudentWorkFolder *DriveFolder `json:"studentWorkFolder,omitempty"`
	// ForceSendFields is a list of field names (e.g. "StudentWorkFolder") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "StudentWorkFolder") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Assignment: Additional details for assignments.

func (Assignment) MarshalJSON

func (s Assignment) MarshalJSON() ([]byte, error)

type AssignmentSubmission

type AssignmentSubmission struct {
	// Attachments: Attachments added by the student. Drive files that correspond
	// to materials with a share mode of STUDENT_COPY may not exist yet if the
	// student has not accessed the assignment in Classroom. Some attachment
	// metadata is only populated if the requesting user has permission to access
	// it. Identifier and alternate_link fields are always available, but others
	// (for example, title) may not be.
	Attachments []*Attachment `json:"attachments,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Attachments") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Attachments") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

AssignmentSubmission: Student work for an assignment.

func (AssignmentSubmission) MarshalJSON

func (s AssignmentSubmission) MarshalJSON() ([]byte, error)

type Attachment

type Attachment struct {
	// DriveFile: Google Drive file attachment.
	DriveFile *DriveFile `json:"driveFile,omitempty"`
	// Form: Google Forms attachment.
	Form *Form `json:"form,omitempty"`
	// Link: Link attachment.
	Link *Link `json:"link,omitempty"`
	// YouTubeVideo: Youtube video attachment.
	YouTubeVideo *YouTubeVideo `json:"youTubeVideo,omitempty"`
	// ForceSendFields is a list of field names (e.g. "DriveFile") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "DriveFile") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Attachment: Attachment added to student assignment work. When creating attachments, setting the `form` field is not supported.

func (Attachment) MarshalJSON

func (s Attachment) MarshalJSON() ([]byte, error)

type CloudPubsubTopic

type CloudPubsubTopic struct {
	// TopicName: The `name` field of a Cloud Pub/Sub Topic
	// (https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic).
	TopicName string `json:"topicName,omitempty"`
	// ForceSendFields is a list of field names (e.g. "TopicName") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "TopicName") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CloudPubsubTopic: A reference to a Cloud Pub/Sub topic. To register for notifications, the owner of the topic must grant `classroom-notifications@system.gserviceaccount.com` the `projects.topics.publish` permission.

func (CloudPubsubTopic) MarshalJSON

func (s CloudPubsubTopic) MarshalJSON() ([]byte, error)

type CopyHistory added in v0.186.0

type CopyHistory struct {
	// AttachmentId: Immutable. Identifier of the attachment.
	AttachmentId string `json:"attachmentId,omitempty"`
	// CourseId: Immutable. Identifier of the course.
	CourseId string `json:"courseId,omitempty"`
	// ItemId: Immutable. Identifier of the announcement, courseWork, or
	// courseWorkMaterial under which the attachment is attached.
	ItemId string `json:"itemId,omitempty"`
	// PostId: Immutable. Deprecated, use item_id instead.
	PostId string `json:"postId,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AttachmentId") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AttachmentId") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CopyHistory: Identifier of a previous copy of a given attachment.

func (CopyHistory) MarshalJSON added in v0.186.0

func (s CopyHistory) MarshalJSON() ([]byte, error)

type Course

type Course struct {
	// AlternateLink: Absolute link to this course in the Classroom web UI.
	// Read-only.
	AlternateLink string `json:"alternateLink,omitempty"`
	// CalendarId: The Calendar ID for a calendar that all course members can see,
	// to which Classroom adds events for course work and announcements in the
	// course. The Calendar for a course is created asynchronously when the course
	// is set to `CourseState.ACTIVE` for the first time (at creation time or when
	// it is updated to `ACTIVE` through the UI or the API). The Calendar ID will
	// not be populated until the creation process is completed. Read-only.
	CalendarId string `json:"calendarId,omitempty"`
	// CourseGroupEmail: The email address of a Google group containing all members
	// of the course. This group does not accept email and can only be used for
	// permissions. Read-only.
	CourseGroupEmail string `json:"courseGroupEmail,omitempty"`
	// CourseMaterialSets: Sets of materials that appear on the "about" page of
	// this course. Read-only.
	CourseMaterialSets []*CourseMaterialSet `json:"courseMaterialSets,omitempty"`
	// CourseState: State of the course. If unspecified, the default state is
	// `PROVISIONED`.
	//
	// Possible values:
	//   "COURSE_STATE_UNSPECIFIED" - No course state. No returned Course message
	// will use this value.
	//   "ACTIVE" - The course is active.
	//   "ARCHIVED" - The course has been archived. You cannot modify it except to
	// change it to a different state.
	//   "PROVISIONED" - The course has been created, but not yet activated. It is
	// accessible by the primary teacher and domain administrators, who may modify
	// it or change it to the `ACTIVE` or `DECLINED` states. A course may only be
	// changed to `PROVISIONED` if it is in the `DECLINED` state.
	//   "DECLINED" - The course has been created, but declined. It is accessible
	// by the course owner and domain administrators, though it will not be
	// displayed in the web UI. You cannot modify the course except to change it to
	// the `PROVISIONED` state. A course may only be changed to `DECLINED` if it is
	// in the `PROVISIONED` state.
	//   "SUSPENDED" - The course has been suspended. You cannot modify the course,
	// and only the user identified by the `owner_id` can view the course. A course
	// may be placed in this state if it potentially violates the Terms of Service.
	CourseState string `json:"courseState,omitempty"`
	// CreationTime: Creation time of the course. Specifying this field in a course
	// update mask results 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 results in an error. Read-only.
	EnrollmentCode string `json:"enrollmentCode,omitempty"`
	// GradebookSettings: The gradebook settings that specify how a student's
	// overall grade for the course will be calculated and who it will be displayed
	// to. Read-only
	GradebookSettings *GradebookSettings `json:"gradebookSettings,omitempty"`
	// GuardiansEnabled: Whether or not guardian notifications are enabled for this
	// course. Read-only.
	GuardiansEnabled bool `json:"guardiansEnabled,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 results 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. Admins can also
	// specify this field in a patch course request to transfer ownership. In other
	// contexts, it is read-only.
	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"`
	// TeacherFolder: Information about a Drive Folder that is shared with all
	// teachers of the course. This field will only be set for teachers of the
	// course and domain administrators. Read-only.
	TeacherFolder *DriveFolder `json:"teacherFolder,omitempty"`
	// TeacherGroupEmail: The email address of a Google group containing all
	// teachers of the course. This group does not accept email and can only be
	// used for permissions. Read-only.
	TeacherGroupEmail string `json:"teacherGroupEmail,omitempty"`
	// UpdateTime: Time of the most recent update to this course. Specifying this
	// field in a course update mask results 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 or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AlternateLink") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []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 or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Alias") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []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 CourseMaterial

type CourseMaterial struct {
	// DriveFile: Google Drive file attachment.
	DriveFile *DriveFile `json:"driveFile,omitempty"`
	// Form: Google Forms attachment.
	Form *Form `json:"form,omitempty"`
	// Link: Link atatchment.
	Link *Link `json:"link,omitempty"`
	// YouTubeVideo: Youtube video attachment.
	YouTubeVideo *YouTubeVideo `json:"youTubeVideo,omitempty"`
	// ForceSendFields is a list of field names (e.g. "DriveFile") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "DriveFile") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CourseMaterial: A material attached to a course as part of a material set.

func (CourseMaterial) MarshalJSON

func (s CourseMaterial) MarshalJSON() ([]byte, error)

type CourseMaterialSet

type CourseMaterialSet struct {
	// Materials: Materials attached to this set.
	Materials []*CourseMaterial `json:"materials,omitempty"`
	// Title: Title for this set.
	Title string `json:"title,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Materials") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Materials") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CourseMaterialSet: A set of materials that appears on the "About" page of the course. These materials might include a syllabus, schedule, or other background information relating to the course as a whole.

func (CourseMaterialSet) MarshalJSON

func (s CourseMaterialSet) MarshalJSON() ([]byte, error)

type CourseRosterChangesInfo

type CourseRosterChangesInfo struct {
	// CourseId: The `course_id` of the course to subscribe to roster changes for.
	CourseId string `json:"courseId,omitempty"`
	// ForceSendFields is a list of field names (e.g. "CourseId") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CourseId") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CourseRosterChangesInfo: Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`.

func (CourseRosterChangesInfo) MarshalJSON

func (s CourseRosterChangesInfo) MarshalJSON() ([]byte, error)

type CourseWork

type CourseWork struct {
	// AlternateLink: Absolute link to this course work in the Classroom web UI.
	// This is only populated if `state` is `PUBLISHED`. Read-only.
	AlternateLink string `json:"alternateLink,omitempty"`
	// AssigneeMode: Assignee mode of the coursework. If unspecified, the default
	// value is `ALL_STUDENTS`.
	//
	// Possible values:
	//   "ASSIGNEE_MODE_UNSPECIFIED" - No mode specified. This is never returned.
	//   "ALL_STUDENTS" - All students can see the item. This is the default state.
	//   "INDIVIDUAL_STUDENTS" - A subset of the students can see the item.
	AssigneeMode string `json:"assigneeMode,omitempty"`
	// Assignment: Assignment details. This is populated only when `work_type` is
	// `ASSIGNMENT`. Read-only.
	Assignment *Assignment `json:"assignment,omitempty"`
	// AssociatedWithDeveloper: Whether this course work item is associated with
	// the Developer Console project making the request. See CreateCourseWork for
	// more details. Read-only.
	AssociatedWithDeveloper bool `json:"associatedWithDeveloper,omitempty"`
	// CourseId: Identifier of the course. Read-only.
	CourseId string `json:"courseId,omitempty"`
	// CreationTime: Timestamp when this course work was created. Read-only.
	CreationTime string `json:"creationTime,omitempty"`
	// CreatorUserId: Identifier for the user that created the coursework.
	// Read-only.
	CreatorUserId string `json:"creatorUserId,omitempty"`
	// Description: Optional description of this course work. If set, the
	// description must be a valid UTF-8 string containing no more than 30,000
	// characters.
	Description string `json:"description,omitempty"`
	// DueDate: Optional date, in UTC, that submissions for this course work are
	// due. This must be specified if `due_time` is specified.
	DueDate *Date `json:"dueDate,omitempty"`
	// DueTime: Optional time of day, in UTC, that submissions for this course work
	// are due. This must be specified if `due_date` is specified.
	DueTime *TimeOfDay `json:"dueTime,omitempty"`
	// GradeCategory: The category that this coursework's grade contributes to.
	// Present only when a category has been chosen for the coursework. May be used
	// in calculating the overall grade. Read-only.
	GradeCategory *GradeCategory `json:"gradeCategory,omitempty"`
	// Id: Classroom-assigned identifier of this course work, unique per course.
	// Read-only.
	Id string `json:"id,omitempty"`
	// IndividualStudentsOptions: Identifiers of students with access to the
	// coursework. This field is set only if `assigneeMode` is
	// `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then
	// only students specified in this field are assigned the coursework.
	IndividualStudentsOptions *IndividualStudentsOptions `json:"individualStudentsOptions,omitempty"`
	// Materials: Additional materials. CourseWork must have no more than 20
	// material items.
	Materials []*Material `json:"materials,omitempty"`
	// MaxPoints: Maximum grade for this course work. If zero or unspecified, this
	// assignment is considered ungraded. This must be a non-negative integer
	// value.
	MaxPoints float64 `json:"maxPoints,omitempty"`
	// MultipleChoiceQuestion: Multiple choice question details. For read
	// operations, this field is populated only when `work_type` is
	// `MULTIPLE_CHOICE_QUESTION`. For write operations, this field must be
	// specified when creating course work with a `work_type` of
	// `MULTIPLE_CHOICE_QUESTION`, and it must not be set otherwise.
	MultipleChoiceQuestion *MultipleChoiceQuestion `json:"multipleChoiceQuestion,omitempty"`
	// ScheduledTime: Optional timestamp when this course work is scheduled to be
	// published.
	ScheduledTime string `json:"scheduledTime,omitempty"`
	// State: Status of this course work. If unspecified, the default state is
	// `DRAFT`.
	//
	// Possible values:
	//   "COURSE_WORK_STATE_UNSPECIFIED" - No state specified. This is never
	// returned.
	//   "PUBLISHED" - Status for work that has been published. This is the default
	// state.
	//   "DRAFT" - Status for work that is not yet published. Work in this state is
	// visible only to course teachers and domain administrators.
	//   "DELETED" - Status for work that was published but is now deleted. Work in
	// this state is visible only to course teachers and domain administrators.
	// Work in this state is deleted after some time.
	State string `json:"state,omitempty"`
	// SubmissionModificationMode: Setting to determine when students are allowed
	// to modify submissions. If unspecified, the default value is
	// `MODIFIABLE_UNTIL_TURNED_IN`.
	//
	// Possible values:
	//   "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED" - No modification mode
	// specified. This is never returned.
	//   "MODIFIABLE_UNTIL_TURNED_IN" - Submissions can be modified before being
	// turned in.
	//   "MODIFIABLE" - Submissions can be modified at any time.
	SubmissionModificationMode string `json:"submissionModificationMode,omitempty"`
	// Title: Title of this course work. The title must be a valid UTF-8 string
	// containing between 1 and 3000 characters.
	Title string `json:"title,omitempty"`
	// TopicId: Identifier for the topic that this coursework is associated with.
	// Must match an existing topic in the course.
	TopicId string `json:"topicId,omitempty"`
	// UpdateTime: Timestamp of the most recent change to this course work.
	// Read-only.
	UpdateTime string `json:"updateTime,omitempty"`
	// WorkType: Type of this course work. The type is set when the course work is
	// created and cannot be changed.
	//
	// Possible values:
	//   "COURSE_WORK_TYPE_UNSPECIFIED" - No work type specified. This is never
	// returned.
	//   "ASSIGNMENT" - An assignment.
	//   "SHORT_ANSWER_QUESTION" - A short answer question.
	//   "MULTIPLE_CHOICE_QUESTION" - A multiple-choice question.
	WorkType string `json:"workType,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 or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AlternateLink") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CourseWork: Course work created by a teacher for students of the course.

func (CourseWork) MarshalJSON

func (s CourseWork) MarshalJSON() ([]byte, error)

func (*CourseWork) UnmarshalJSON

func (s *CourseWork) UnmarshalJSON(data []byte) error

type CourseWorkChangesInfo

type CourseWorkChangesInfo struct {
	// CourseId: The `course_id` of the course to subscribe to work changes for.
	CourseId string `json:"courseId,omitempty"`
	// ForceSendFields is a list of field names (e.g. "CourseId") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CourseId") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CourseWorkChangesInfo: Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`.

func (CourseWorkChangesInfo) MarshalJSON

func (s CourseWorkChangesInfo) MarshalJSON() ([]byte, error)

type CourseWorkMaterial added in v0.33.0

type CourseWorkMaterial struct {
	// AlternateLink: Absolute link to this course work material in the Classroom
	// web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
	AlternateLink string `json:"alternateLink,omitempty"`
	// AssigneeMode: Assignee mode of the course work material. If unspecified, the
	// default value is `ALL_STUDENTS`.
	//
	// Possible values:
	//   "ASSIGNEE_MODE_UNSPECIFIED" - No mode specified. This is never returned.
	//   "ALL_STUDENTS" - All students can see the item. This is the default state.
	//   "INDIVIDUAL_STUDENTS" - A subset of the students can see the item.
	AssigneeMode string `json:"assigneeMode,omitempty"`
	// CourseId: Identifier of the course. Read-only.
	CourseId string `json:"courseId,omitempty"`
	// CreationTime: Timestamp when this course work material was created.
	// Read-only.
	CreationTime string `json:"creationTime,omitempty"`
	// CreatorUserId: Identifier for the user that created the course work
	// material. Read-only.
	CreatorUserId string `json:"creatorUserId,omitempty"`
	// Description: Optional description of this course work material. The text
	// must be a valid UTF-8 string containing no more than 30,000 characters.
	Description string `json:"description,omitempty"`
	// Id: Classroom-assigned identifier of this course work material, unique per
	// course. Read-only.
	Id string `json:"id,omitempty"`
	// IndividualStudentsOptions: Identifiers of students with access to the course
	// work material. This field is set only if `assigneeMode` is
	// `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then
	// only students specified in this field can see the course work material.
	IndividualStudentsOptions *IndividualStudentsOptions `json:"individualStudentsOptions,omitempty"`
	// Materials: Additional materials. A course work material must have no more
	// than 20 material items.
	Materials []*Material `json:"materials,omitempty"`
	// ScheduledTime: Optional timestamp when this course work material is
	// scheduled to be published.
	ScheduledTime string `json:"scheduledTime,omitempty"`
	// State: Status of this course work material. If unspecified, the default
	// state is `DRAFT`.
	//
	// Possible values:
	//   "COURSEWORK_MATERIAL_STATE_UNSPECIFIED" - No state specified. This is
	// never returned.
	//   "PUBLISHED" - Status for course work material that has been published.
	// This is the default state.
	//   "DRAFT" - Status for a course work material that is not yet published.
	// Course work material in this state is visible only to course teachers and
	// domain administrators.
	//   "DELETED" - Status for course work material that was published but is now
	// deleted. Course work material in this state is visible only to course
	// teachers and domain administrators. Course work material in this state is
	// deleted after some time.
	State string `json:"state,omitempty"`
	// Title: Title of this course work material. The title must be a valid UTF-8
	// string containing between 1 and 3000 characters.
	Title string `json:"title,omitempty"`
	// TopicId: Identifier for the topic that this course work material is
	// associated with. Must match an existing topic in the course.
	TopicId string `json:"topicId,omitempty"`
	// UpdateTime: Timestamp of the most recent change to this course work
	// material. 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 or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AlternateLink") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CourseWorkMaterial: Course work material created by a teacher for students of the course

func (CourseWorkMaterial) MarshalJSON added in v0.33.0

func (s CourseWorkMaterial) 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.

func (*CoursesAliasesCreateCall) Do

Do executes the "classroom.courses.aliases.create" call. 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 details.

func (*CoursesAliasesCreateCall) Header

func (c *CoursesAliasesCreateCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

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.

func (*CoursesAliasesDeleteCall) Do

Do executes the "classroom.courses.aliases.delete" call. 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 details.

func (*CoursesAliasesDeleteCall) Header

func (c *CoursesAliasesDeleteCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

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.

func (*CoursesAliasesListCall) Do

Do executes the "classroom.courses.aliases.list" call. 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 details.

func (*CoursesAliasesListCall) Header

func (c *CoursesAliasesListCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesAliasesListCall) IfNoneMatch

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

IfNoneMatch sets an 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.

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.

func (*CoursesAliasesListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

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. * `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to access a domain-scoped alias).

  • courseId: Identifier of the course to alias. This identifier can be either the Classroom-assigned identifier or an alias.

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. * `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to delete a domain-scoped alias).

  • alias: Alias to delete. This may not be the Classroom-assigned identifier.
  • courseId: Identifier of the course whose alias should be deleted. This identifier can be either the Classroom-assigned identifier or an alias.

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.

  • courseId: The identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

type CoursesAnnouncementsAddOnAttachmentsCreateCall added in v0.186.0

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

func (*CoursesAnnouncementsAddOnAttachmentsCreateCall) AddOnToken added in v0.186.0

AddOnToken sets the optional parameter "addOnToken": Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match.

func (*CoursesAnnouncementsAddOnAttachmentsCreateCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsAddOnAttachmentsCreateCall) Do added in v0.186.0

Do executes the "classroom.courses.announcements.addOnAttachments.create" call. Any non-2xx status code is an error. Response headers are in either *AddOnAttachment.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 (*CoursesAnnouncementsAddOnAttachmentsCreateCall) Fields added in v0.186.0

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

func (*CoursesAnnouncementsAddOnAttachmentsCreateCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesAnnouncementsAddOnAttachmentsCreateCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesAnnouncementsAddOnAttachmentsDeleteCall added in v0.186.0

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

func (*CoursesAnnouncementsAddOnAttachmentsDeleteCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsAddOnAttachmentsDeleteCall) Do added in v0.186.0

Do executes the "classroom.courses.announcements.addOnAttachments.delete" call. 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 (*CoursesAnnouncementsAddOnAttachmentsDeleteCall) Fields added in v0.186.0

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

func (*CoursesAnnouncementsAddOnAttachmentsDeleteCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesAnnouncementsAddOnAttachmentsDeleteCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesAnnouncementsAddOnAttachmentsGetCall added in v0.186.0

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

func (*CoursesAnnouncementsAddOnAttachmentsGetCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsAddOnAttachmentsGetCall) Do added in v0.186.0

Do executes the "classroom.courses.announcements.addOnAttachments.get" call. Any non-2xx status code is an error. Response headers are in either *AddOnAttachment.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 (*CoursesAnnouncementsAddOnAttachmentsGetCall) Fields added in v0.186.0

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

func (*CoursesAnnouncementsAddOnAttachmentsGetCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesAnnouncementsAddOnAttachmentsGetCall) IfNoneMatch added in v0.186.0

IfNoneMatch sets an 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.

func (*CoursesAnnouncementsAddOnAttachmentsGetCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesAnnouncementsAddOnAttachmentsListCall added in v0.186.0

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

func (*CoursesAnnouncementsAddOnAttachmentsListCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsAddOnAttachmentsListCall) Do added in v0.186.0

Do executes the "classroom.courses.announcements.addOnAttachments.list" call. Any non-2xx status code is an error. Response headers are in either *ListAddOnAttachmentsResponse.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 (*CoursesAnnouncementsAddOnAttachmentsListCall) Fields added in v0.186.0

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

func (*CoursesAnnouncementsAddOnAttachmentsListCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesAnnouncementsAddOnAttachmentsListCall) IfNoneMatch added in v0.186.0

IfNoneMatch sets an 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.

func (*CoursesAnnouncementsAddOnAttachmentsListCall) PageSize added in v0.186.0

PageSize sets the optional parameter "pageSize": The maximum number of attachments to return. The service may return fewer than this value. If unspecified, at most 20 attachments will be returned. The maximum value is 20; values above 20 will be coerced to 20.

func (*CoursesAnnouncementsAddOnAttachmentsListCall) PageToken added in v0.186.0

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListAddOnAttachments` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAddOnAttachments` must match the call that provided the page token.

func (*CoursesAnnouncementsAddOnAttachmentsListCall) Pages added in v0.186.0

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*CoursesAnnouncementsAddOnAttachmentsListCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead.

type CoursesAnnouncementsAddOnAttachmentsPatchCall added in v0.186.0

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

func (*CoursesAnnouncementsAddOnAttachmentsPatchCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsAddOnAttachmentsPatchCall) Do added in v0.186.0

Do executes the "classroom.courses.announcements.addOnAttachments.patch" call. Any non-2xx status code is an error. Response headers are in either *AddOnAttachment.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 (*CoursesAnnouncementsAddOnAttachmentsPatchCall) Fields added in v0.186.0

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

func (*CoursesAnnouncementsAddOnAttachmentsPatchCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesAnnouncementsAddOnAttachmentsPatchCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Required. Identifier of the post under which the attachment is attached.

func (*CoursesAnnouncementsAddOnAttachmentsPatchCall) UpdateMask added in v0.186.0

UpdateMask sets the optional parameter "updateMask": Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` * `max_points`

type CoursesAnnouncementsAddOnAttachmentsService added in v0.186.0

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

func NewCoursesAnnouncementsAddOnAttachmentsService added in v0.186.0

func NewCoursesAnnouncementsAddOnAttachmentsService(s *Service) *CoursesAnnouncementsAddOnAttachmentsService

func (*CoursesAnnouncementsAddOnAttachmentsService) Create added in v0.186.0

Create: Creates an add-on attachment under a post. Requires the add-on to have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesAnnouncementsAddOnAttachmentsService) Delete added in v0.186.0

Delete: Deletes an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • attachmentId: Identifier of the attachment.
  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesAnnouncementsAddOnAttachmentsService) Get added in v0.186.0

Get: Returns an add-on attachment. Requires the add-on requesting the attachment to be the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • attachmentId: Identifier of the attachment.
  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesAnnouncementsAddOnAttachmentsService) List added in v0.186.0

List: Returns all attachments created by an add-on under the post. Requires the add-on to have active attachments on the post or have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesAnnouncementsAddOnAttachmentsService) Patch added in v0.186.0

Patch: Updates an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

- attachmentId: Identifier of the attachment. - courseId: Identifier of the course. - itemId: Identifier of the post under which the attachment is attached.

type CoursesAnnouncementsCreateCall

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

func (*CoursesAnnouncementsCreateCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsCreateCall) Do

Do executes the "classroom.courses.announcements.create" call. Any non-2xx status code is an error. Response headers are in either *Announcement.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 (*CoursesAnnouncementsCreateCall) Fields

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

func (*CoursesAnnouncementsCreateCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CoursesAnnouncementsDeleteCall

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

func (*CoursesAnnouncementsDeleteCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsDeleteCall) Do

Do executes the "classroom.courses.announcements.delete" call. 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 (*CoursesAnnouncementsDeleteCall) Fields

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

func (*CoursesAnnouncementsDeleteCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CoursesAnnouncementsGetAddOnContextCall added in v0.186.0

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

func (*CoursesAnnouncementsGetAddOnContextCall) AddOnToken added in v0.186.0

AddOnToken sets the optional parameter "addOnToken": Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. The authorization token is required when neither of the following is true: * The add-on has attachments on the post. * The developer project issuing the request is the same project that created the post.

func (*CoursesAnnouncementsGetAddOnContextCall) AttachmentId added in v0.186.0

AttachmentId sets the optional parameter "attachmentId": The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned.

func (*CoursesAnnouncementsGetAddOnContextCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsGetAddOnContextCall) Do added in v0.186.0

Do executes the "classroom.courses.announcements.getAddOnContext" call. Any non-2xx status code is an error. Response headers are in either *AddOnContext.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 (*CoursesAnnouncementsGetAddOnContextCall) Fields added in v0.186.0

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

func (*CoursesAnnouncementsGetAddOnContextCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesAnnouncementsGetAddOnContextCall) IfNoneMatch added in v0.186.0

IfNoneMatch sets an 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.

func (*CoursesAnnouncementsGetAddOnContextCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesAnnouncementsGetCall

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

func (*CoursesAnnouncementsGetCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsGetCall) Do

Do executes the "classroom.courses.announcements.get" call. Any non-2xx status code is an error. Response headers are in either *Announcement.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 (*CoursesAnnouncementsGetCall) Fields

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

func (*CoursesAnnouncementsGetCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesAnnouncementsGetCall) IfNoneMatch

IfNoneMatch sets an 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.

type CoursesAnnouncementsListCall

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

func (*CoursesAnnouncementsListCall) AnnouncementStates

func (c *CoursesAnnouncementsListCall) AnnouncementStates(announcementStates ...string) *CoursesAnnouncementsListCall

AnnouncementStates sets the optional parameter "announcementStates": Restriction on the `state` of announcements returned. If this argument is left unspecified, the default value is `PUBLISHED`.

Possible values:

"ANNOUNCEMENT_STATE_UNSPECIFIED" - No state specified. This is never

returned.

"PUBLISHED" - Status for announcement that has been published. This is the

default state.

"DRAFT" - Status for an announcement that is not yet published.

Announcement in this state is visible only to course teachers and domain administrators.

"DELETED" - Status for announcement that was published but is now deleted.

Announcement in this state is visible only to course teachers and domain administrators. Announcement in this state is deleted after some time.

func (*CoursesAnnouncementsListCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsListCall) Do

Do executes the "classroom.courses.announcements.list" call. Any non-2xx status code is an error. Response headers are in either *ListAnnouncementsResponse.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 (*CoursesAnnouncementsListCall) Fields

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

func (*CoursesAnnouncementsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesAnnouncementsListCall) IfNoneMatch

IfNoneMatch sets an 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.

func (*CoursesAnnouncementsListCall) OrderBy

OrderBy sets the optional parameter "orderBy": Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported field is `updateTime`. Supported direction keywords are `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `updateTime asc`, `updateTime`

func (*CoursesAnnouncementsListCall) PageSize

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 (*CoursesAnnouncementsListCall) PageToken

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 (*CoursesAnnouncementsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type CoursesAnnouncementsModifyAssigneesCall

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

func (*CoursesAnnouncementsModifyAssigneesCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsModifyAssigneesCall) Do

Do executes the "classroom.courses.announcements.modifyAssignees" call. Any non-2xx status code is an error. Response headers are in either *Announcement.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 (*CoursesAnnouncementsModifyAssigneesCall) Fields

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

func (*CoursesAnnouncementsModifyAssigneesCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CoursesAnnouncementsPatchCall

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

func (*CoursesAnnouncementsPatchCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesAnnouncementsPatchCall) Do

Do executes the "classroom.courses.announcements.patch" call. Any non-2xx status code is an error. Response headers are in either *Announcement.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 (*CoursesAnnouncementsPatchCall) Fields

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

func (*CoursesAnnouncementsPatchCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesAnnouncementsPatchCall) UpdateMask

UpdateMask sets the optional parameter "updateMask": Mask that identifies which fields on the announcement to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the Announcement object. If a field that does not support empty values is included in the update mask and not set in the Announcement object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `text` * `state` * `scheduled_time`

type CoursesAnnouncementsService

type CoursesAnnouncementsService struct {
	AddOnAttachments *CoursesAnnouncementsAddOnAttachmentsService
	// contains filtered or unexported fields
}

func NewCoursesAnnouncementsService

func NewCoursesAnnouncementsService(s *Service) *CoursesAnnouncementsService

func (*CoursesAnnouncementsService) Create

Create: Creates an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create announcements in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

func (*CoursesAnnouncementsService) Delete

Delete: Deletes an announcement. This request must be made by the Developer Console project of the OAuth client ID (https://support.google.com/cloud/answer/6158849) used to create the corresponding announcement item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding announcement, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested announcement has already been deleted. * `NOT_FOUND` if no course exists with the requested ID.

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id: Identifier of the announcement to delete. This identifier is a Classroom-assigned identifier.

func (*CoursesAnnouncementsService) Get

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

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id: Identifier of the announcement.

func (*CoursesAnnouncementsService) GetAddOnContext added in v0.186.0

GetAddOnContext: Gets metadata for Classroom add-ons in the context of a specific post. To maintain the integrity of its own data and permissions model, an add-on should call this to validate query parameters and the requesting user's role whenever the add-on is opened in an iframe (https://developers.google.com/classroom/add-ons/get-started/iframes/iframes-overview). This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesAnnouncementsService) List

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

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

func (*CoursesAnnouncementsService) ModifyAssignees

func (r *CoursesAnnouncementsService) ModifyAssignees(courseId string, id string, modifyannouncementassigneesrequest *ModifyAnnouncementAssigneesRequest) *CoursesAnnouncementsModifyAssigneesCall

ModifyAssignees: Modifies assignee mode and options of an announcement. Only a teacher of the course that contains the announcement may call this method. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id: Identifier of the announcement.

func (*CoursesAnnouncementsService) Patch

Patch: Updates one or more fields of an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding announcement or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested announcement has already been deleted. * `NOT_FOUND` if the requested course or announcement does not exist

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id: Identifier of the announcement.

type CoursesCourseWorkAddOnAttachmentsCreateCall added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsCreateCall) AddOnToken added in v0.186.0

AddOnToken sets the optional parameter "addOnToken": Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match.

func (*CoursesCourseWorkAddOnAttachmentsCreateCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkAddOnAttachmentsCreateCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWork.addOnAttachments.create" call. Any non-2xx status code is an error. Response headers are in either *AddOnAttachment.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 (*CoursesCourseWorkAddOnAttachmentsCreateCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsCreateCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkAddOnAttachmentsCreateCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesCourseWorkAddOnAttachmentsDeleteCall added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsDeleteCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkAddOnAttachmentsDeleteCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWork.addOnAttachments.delete" call. 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 (*CoursesCourseWorkAddOnAttachmentsDeleteCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsDeleteCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkAddOnAttachmentsDeleteCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesCourseWorkAddOnAttachmentsGetCall added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsGetCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkAddOnAttachmentsGetCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWork.addOnAttachments.get" call. Any non-2xx status code is an error. Response headers are in either *AddOnAttachment.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 (*CoursesCourseWorkAddOnAttachmentsGetCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsGetCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkAddOnAttachmentsGetCall) IfNoneMatch added in v0.186.0

IfNoneMatch sets an 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.

func (*CoursesCourseWorkAddOnAttachmentsGetCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesCourseWorkAddOnAttachmentsListCall added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsListCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkAddOnAttachmentsListCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWork.addOnAttachments.list" call. Any non-2xx status code is an error. Response headers are in either *ListAddOnAttachmentsResponse.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 (*CoursesCourseWorkAddOnAttachmentsListCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsListCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkAddOnAttachmentsListCall) IfNoneMatch added in v0.186.0

IfNoneMatch sets an 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.

func (*CoursesCourseWorkAddOnAttachmentsListCall) PageSize added in v0.186.0

PageSize sets the optional parameter "pageSize": The maximum number of attachments to return. The service may return fewer than this value. If unspecified, at most 20 attachments will be returned. The maximum value is 20; values above 20 will be coerced to 20.

func (*CoursesCourseWorkAddOnAttachmentsListCall) PageToken added in v0.186.0

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListAddOnAttachments` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAddOnAttachments` must match the call that provided the page token.

func (*CoursesCourseWorkAddOnAttachmentsListCall) Pages added in v0.186.0

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*CoursesCourseWorkAddOnAttachmentsListCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead.

type CoursesCourseWorkAddOnAttachmentsPatchCall added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsPatchCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkAddOnAttachmentsPatchCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWork.addOnAttachments.patch" call. Any non-2xx status code is an error. Response headers are in either *AddOnAttachment.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 (*CoursesCourseWorkAddOnAttachmentsPatchCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsPatchCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkAddOnAttachmentsPatchCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Required. Identifier of the post under which the attachment is attached.

func (*CoursesCourseWorkAddOnAttachmentsPatchCall) UpdateMask added in v0.186.0

UpdateMask sets the optional parameter "updateMask": Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` * `max_points`

type CoursesCourseWorkAddOnAttachmentsService added in v0.186.0

type CoursesCourseWorkAddOnAttachmentsService struct {
	StudentSubmissions *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsService
	// contains filtered or unexported fields
}

func NewCoursesCourseWorkAddOnAttachmentsService added in v0.186.0

func NewCoursesCourseWorkAddOnAttachmentsService(s *Service) *CoursesCourseWorkAddOnAttachmentsService

func (*CoursesCourseWorkAddOnAttachmentsService) Create added in v0.186.0

Create: Creates an add-on attachment under a post. Requires the add-on to have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesCourseWorkAddOnAttachmentsService) Delete added in v0.186.0

Delete: Deletes an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • attachmentId: Identifier of the attachment.
  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesCourseWorkAddOnAttachmentsService) Get added in v0.186.0

Get: Returns an add-on attachment. Requires the add-on requesting the attachment to be the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • attachmentId: Identifier of the attachment.
  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesCourseWorkAddOnAttachmentsService) List added in v0.186.0

List: Returns all attachments created by an add-on under the post. Requires the add-on to have active attachments on the post or have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesCourseWorkAddOnAttachmentsService) Patch added in v0.186.0

Patch: Updates an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

- attachmentId: Identifier of the attachment. - courseId: Identifier of the course. - itemId: Identifier of the post under which the attachment is attached.

type CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWork.addOnAttachments.studentSubmissions.get" call. Any non-2xx status code is an error. Response headers are in either *AddOnAttachmentStudentSubmission.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 (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall) IfNoneMatch added in v0.186.0

IfNoneMatch sets an 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.

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWork.addOnAttachments.studentSubmissions.patch" call. Any non-2xx status code is an error. Response headers are in either *AddOnAttachmentStudentSubmission.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 (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall) UpdateMask added in v0.186.0

UpdateMask sets the optional parameter "updateMask": Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachmentStudentSubmission` object. The following fields may be specified by teachers: * `points_earned`

type CoursesCourseWorkAddOnAttachmentsStudentSubmissionsService added in v0.186.0

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

func NewCoursesCourseWorkAddOnAttachmentsStudentSubmissionsService added in v0.186.0

func NewCoursesCourseWorkAddOnAttachmentsStudentSubmissionsService(s *Service) *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsService

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsService) Get added in v0.186.0

Get: Returns a student submission for an add-on attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • attachmentId: Identifier of the attachment.
  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.
  • submissionId: Identifier of the student’s submission.

func (*CoursesCourseWorkAddOnAttachmentsStudentSubmissionsService) Patch added in v0.186.0

Patch: Updates data associated with an add-on attachment submission. Requires the add-on to have been the original creator of the attachment and the attachment to have a positive `max_points` value set. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • attachmentId: Identifier of the attachment.
  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.
  • submissionId: Identifier of the student's submission.

type CoursesCourseWorkCreateCall

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

func (*CoursesCourseWorkCreateCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkCreateCall) Do

Do executes the "classroom.courses.courseWork.create" call. Any non-2xx status code is an error. Response headers are in either *CourseWork.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 (*CoursesCourseWorkCreateCall) Fields

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

func (*CoursesCourseWorkCreateCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CoursesCourseWorkDeleteCall

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

func (*CoursesCourseWorkDeleteCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkDeleteCall) Do

Do executes the "classroom.courses.courseWork.delete" call. 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 (*CoursesCourseWorkDeleteCall) Fields

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

func (*CoursesCourseWorkDeleteCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CoursesCourseWorkGetAddOnContextCall added in v0.186.0

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

func (*CoursesCourseWorkGetAddOnContextCall) AddOnToken added in v0.186.0

AddOnToken sets the optional parameter "addOnToken": Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. The authorization token is required when neither of the following is true: * The add-on has attachments on the post. * The developer project issuing the request is the same project that created the post.

func (*CoursesCourseWorkGetAddOnContextCall) AttachmentId added in v0.186.0

AttachmentId sets the optional parameter "attachmentId": The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned.

func (*CoursesCourseWorkGetAddOnContextCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkGetAddOnContextCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWork.getAddOnContext" call. Any non-2xx status code is an error. Response headers are in either *AddOnContext.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 (*CoursesCourseWorkGetAddOnContextCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkGetAddOnContextCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkGetAddOnContextCall) IfNoneMatch added in v0.186.0

IfNoneMatch sets an 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.

func (*CoursesCourseWorkGetAddOnContextCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesCourseWorkGetCall

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

func (*CoursesCourseWorkGetCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkGetCall) Do

Do executes the "classroom.courses.courseWork.get" call. Any non-2xx status code is an error. Response headers are in either *CourseWork.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 (*CoursesCourseWorkGetCall) Fields

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

func (*CoursesCourseWorkGetCall) Header

func (c *CoursesCourseWorkGetCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkGetCall) IfNoneMatch

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

IfNoneMatch sets an 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.

type CoursesCourseWorkListCall

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

func (*CoursesCourseWorkListCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkListCall) CourseWorkStates

func (c *CoursesCourseWorkListCall) CourseWorkStates(courseWorkStates ...string) *CoursesCourseWorkListCall

CourseWorkStates sets the optional parameter "courseWorkStates": Restriction on the work status to return. Only courseWork that matches is returned. If unspecified, items with a work status of `PUBLISHED` is returned.

Possible values:

"COURSE_WORK_STATE_UNSPECIFIED" - No state specified. This is never

returned.

"PUBLISHED" - Status for work that has been published. This is the default

state.

"DRAFT" - Status for work that is not yet published. Work in this state is

visible only to course teachers and domain administrators.

"DELETED" - Status for work that was published but is now deleted. Work in

this state is visible only to course teachers and domain administrators. Work in this state is deleted after some time.

func (*CoursesCourseWorkListCall) Do

Do executes the "classroom.courses.courseWork.list" call. Any non-2xx status code is an error. Response headers are in either *ListCourseWorkResponse.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 (*CoursesCourseWorkListCall) Fields

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

func (*CoursesCourseWorkListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkListCall) IfNoneMatch

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

IfNoneMatch sets an 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.

func (*CoursesCourseWorkListCall) OrderBy

OrderBy sets the optional parameter "orderBy": Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported fields are `updateTime` and `dueDate`. Supported direction keywords are `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`

func (*CoursesCourseWorkListCall) PageSize

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 (*CoursesCourseWorkListCall) PageToken

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 (*CoursesCourseWorkListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall added in v0.186.0

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

func (*CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall) AddOnToken added in v0.186.0

AddOnToken sets the optional parameter "addOnToken": Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWorkMaterials.addOnAttachments.create" call. Any non-2xx status code is an error. Response headers are in either *AddOnAttachment.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 (*CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesCourseWorkMaterialsAddOnAttachmentsDeleteCall added in v0.186.0

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

func (*CoursesCourseWorkMaterialsAddOnAttachmentsDeleteCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsDeleteCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWorkMaterials.addOnAttachments.delete" call. 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 (*CoursesCourseWorkMaterialsAddOnAttachmentsDeleteCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkMaterialsAddOnAttachmentsDeleteCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsDeleteCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesCourseWorkMaterialsAddOnAttachmentsGetCall added in v0.186.0

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

func (*CoursesCourseWorkMaterialsAddOnAttachmentsGetCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsGetCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWorkMaterials.addOnAttachments.get" call. Any non-2xx status code is an error. Response headers are in either *AddOnAttachment.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 (*CoursesCourseWorkMaterialsAddOnAttachmentsGetCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkMaterialsAddOnAttachmentsGetCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsGetCall) IfNoneMatch added in v0.186.0

IfNoneMatch sets an 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.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsGetCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesCourseWorkMaterialsAddOnAttachmentsListCall added in v0.186.0

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

func (*CoursesCourseWorkMaterialsAddOnAttachmentsListCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsListCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWorkMaterials.addOnAttachments.list" call. Any non-2xx status code is an error. Response headers are in either *ListAddOnAttachmentsResponse.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 (*CoursesCourseWorkMaterialsAddOnAttachmentsListCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkMaterialsAddOnAttachmentsListCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsListCall) IfNoneMatch added in v0.186.0

IfNoneMatch sets an 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.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsListCall) PageSize added in v0.186.0

PageSize sets the optional parameter "pageSize": The maximum number of attachments to return. The service may return fewer than this value. If unspecified, at most 20 attachments will be returned. The maximum value is 20; values above 20 will be coerced to 20.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsListCall) PageToken added in v0.186.0

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListAddOnAttachments` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAddOnAttachments` must match the call that provided the page token.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsListCall) Pages added in v0.186.0

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsListCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead.

type CoursesCourseWorkMaterialsAddOnAttachmentsPatchCall added in v0.186.0

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

func (*CoursesCourseWorkMaterialsAddOnAttachmentsPatchCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsPatchCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWorkMaterials.addOnAttachments.patch" call. Any non-2xx status code is an error. Response headers are in either *AddOnAttachment.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 (*CoursesCourseWorkMaterialsAddOnAttachmentsPatchCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkMaterialsAddOnAttachmentsPatchCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsPatchCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Required. Identifier of the post under which the attachment is attached.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsPatchCall) UpdateMask added in v0.186.0

UpdateMask sets the optional parameter "updateMask": Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` * `max_points`

type CoursesCourseWorkMaterialsAddOnAttachmentsService added in v0.186.0

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

func NewCoursesCourseWorkMaterialsAddOnAttachmentsService added in v0.186.0

func NewCoursesCourseWorkMaterialsAddOnAttachmentsService(s *Service) *CoursesCourseWorkMaterialsAddOnAttachmentsService

func (*CoursesCourseWorkMaterialsAddOnAttachmentsService) Create added in v0.186.0

Create: Creates an add-on attachment under a post. Requires the add-on to have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsService) Delete added in v0.186.0

Delete: Deletes an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • attachmentId: Identifier of the attachment.
  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsService) Get added in v0.186.0

Get: Returns an add-on attachment. Requires the add-on requesting the attachment to be the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • attachmentId: Identifier of the attachment.
  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsService) List added in v0.186.0

List: Returns all attachments created by an add-on under the post. Requires the add-on to have active attachments on the post or have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesCourseWorkMaterialsAddOnAttachmentsService) Patch added in v0.186.0

Patch: Updates an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

- attachmentId: Identifier of the attachment. - courseId: Identifier of the course. - itemId: Identifier of the post under which the attachment is attached.

type CoursesCourseWorkMaterialsCreateCall added in v0.33.0

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

func (*CoursesCourseWorkMaterialsCreateCall) Context added in v0.33.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkMaterialsCreateCall) Do added in v0.33.0

Do executes the "classroom.courses.courseWorkMaterials.create" call. Any non-2xx status code is an error. Response headers are in either *CourseWorkMaterial.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 (*CoursesCourseWorkMaterialsCreateCall) Fields added in v0.33.0

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

func (*CoursesCourseWorkMaterialsCreateCall) Header added in v0.33.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CoursesCourseWorkMaterialsDeleteCall added in v0.33.0

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

func (*CoursesCourseWorkMaterialsDeleteCall) Context added in v0.33.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkMaterialsDeleteCall) Do added in v0.33.0

Do executes the "classroom.courses.courseWorkMaterials.delete" call. 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 (*CoursesCourseWorkMaterialsDeleteCall) Fields added in v0.33.0

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

func (*CoursesCourseWorkMaterialsDeleteCall) Header added in v0.33.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CoursesCourseWorkMaterialsGetAddOnContextCall added in v0.186.0

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

func (*CoursesCourseWorkMaterialsGetAddOnContextCall) AddOnToken added in v0.186.0

AddOnToken sets the optional parameter "addOnToken": Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. The authorization token is required when neither of the following is true: * The add-on has attachments on the post. * The developer project issuing the request is the same project that created the post.

func (*CoursesCourseWorkMaterialsGetAddOnContextCall) AttachmentId added in v0.186.0

AttachmentId sets the optional parameter "attachmentId": The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned.

func (*CoursesCourseWorkMaterialsGetAddOnContextCall) Context added in v0.186.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkMaterialsGetAddOnContextCall) Do added in v0.186.0

Do executes the "classroom.courses.courseWorkMaterials.getAddOnContext" call. Any non-2xx status code is an error. Response headers are in either *AddOnContext.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 (*CoursesCourseWorkMaterialsGetAddOnContextCall) Fields added in v0.186.0

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

func (*CoursesCourseWorkMaterialsGetAddOnContextCall) Header added in v0.186.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkMaterialsGetAddOnContextCall) IfNoneMatch added in v0.186.0

IfNoneMatch sets an 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.

func (*CoursesCourseWorkMaterialsGetAddOnContextCall) PostId added in v0.186.0

PostId sets the optional parameter "postId": Deprecated, use item_id instead.

type CoursesCourseWorkMaterialsGetCall added in v0.33.0

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

func (*CoursesCourseWorkMaterialsGetCall) Context added in v0.33.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkMaterialsGetCall) Do added in v0.33.0

Do executes the "classroom.courses.courseWorkMaterials.get" call. Any non-2xx status code is an error. Response headers are in either *CourseWorkMaterial.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 (*CoursesCourseWorkMaterialsGetCall) Fields added in v0.33.0

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

func (*CoursesCourseWorkMaterialsGetCall) Header added in v0.33.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkMaterialsGetCall) IfNoneMatch added in v0.33.0

IfNoneMatch sets an 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.

type CoursesCourseWorkMaterialsListCall added in v0.33.0

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

func (*CoursesCourseWorkMaterialsListCall) Context added in v0.33.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkMaterialsListCall) CourseWorkMaterialStates added in v0.33.0

func (c *CoursesCourseWorkMaterialsListCall) CourseWorkMaterialStates(courseWorkMaterialStates ...string) *CoursesCourseWorkMaterialsListCall

CourseWorkMaterialStates sets the optional parameter "courseWorkMaterialStates": Restriction on the work status to return. Only course work material that matches is returned. If unspecified, items with a work status of `PUBLISHED` is returned.

Possible values:

"COURSEWORK_MATERIAL_STATE_UNSPECIFIED" - No state specified. This is

never returned.

"PUBLISHED" - Status for course work material that has been published.

This is the default state.

"DRAFT" - Status for a course work material that is not yet published.

Course work material in this state is visible only to course teachers and domain administrators.

"DELETED" - Status for course work material that was published but is now

deleted. Course work material in this state is visible only to course teachers and domain administrators. Course work material in this state is deleted after some time.

func (*CoursesCourseWorkMaterialsListCall) Do added in v0.33.0

Do executes the "classroom.courses.courseWorkMaterials.list" call. Any non-2xx status code is an error. Response headers are in either *ListCourseWorkMaterialResponse.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 (*CoursesCourseWorkMaterialsListCall) Fields added in v0.33.0

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

func (*CoursesCourseWorkMaterialsListCall) Header added in v0.33.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkMaterialsListCall) IfNoneMatch added in v0.33.0

IfNoneMatch sets an 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.

func (*CoursesCourseWorkMaterialsListCall) MaterialDriveId added in v0.33.0

MaterialDriveId sets the optional parameter "materialDriveId": Optional filtering for course work material with at least one Drive material whose ID matches the provided string. If `material_link` is also specified, course work material must have materials matching both filters.

MaterialLink sets the optional parameter "materialLink": Optional filtering for course work material with at least one link material whose URL partially matches the provided string.

func (*CoursesCourseWorkMaterialsListCall) OrderBy added in v0.33.0

OrderBy sets the optional parameter "orderBy": Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported field is `updateTime`. Supported direction keywords are `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `updateTime asc`, `updateTime`

func (*CoursesCourseWorkMaterialsListCall) PageSize added in v0.33.0

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 (*CoursesCourseWorkMaterialsListCall) PageToken added in v0.33.0

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 (*CoursesCourseWorkMaterialsListCall) Pages added in v0.33.0

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type CoursesCourseWorkMaterialsPatchCall added in v0.33.0

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

func (*CoursesCourseWorkMaterialsPatchCall) Context added in v0.33.0

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkMaterialsPatchCall) Do added in v0.33.0

Do executes the "classroom.courses.courseWorkMaterials.patch" call. Any non-2xx status code is an error. Response headers are in either *CourseWorkMaterial.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 (*CoursesCourseWorkMaterialsPatchCall) Fields added in v0.33.0

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

func (*CoursesCourseWorkMaterialsPatchCall) Header added in v0.33.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkMaterialsPatchCall) UpdateMask added in v0.33.0

UpdateMask sets the optional parameter "updateMask": Mask that identifies which fields on the course work material to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the course work material object. If a field that does not support empty values is included in the update mask and not set in the course work material object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `scheduled_time` * `topic_id`

type CoursesCourseWorkMaterialsService added in v0.33.0

type CoursesCourseWorkMaterialsService struct {
	AddOnAttachments *CoursesCourseWorkMaterialsAddOnAttachmentsService
	// contains filtered or unexported fields
}

func NewCoursesCourseWorkMaterialsService added in v0.33.0

func NewCoursesCourseWorkMaterialsService(s *Service) *CoursesCourseWorkMaterialsService

func (*CoursesCourseWorkMaterialsService) Create added in v0.33.0

Create: Creates a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work material in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed or if more than 20 * materials are provided. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

func (*CoursesCourseWorkMaterialsService) Delete added in v0.33.0

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

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id: Identifier of the course work material to delete. This identifier is a Classroom-assigned identifier.

func (*CoursesCourseWorkMaterialsService) Get added in v0.33.0

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

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id: Identifier of the course work material.

func (*CoursesCourseWorkMaterialsService) GetAddOnContext added in v0.186.0

GetAddOnContext: Gets metadata for Classroom add-ons in the context of a specific post. To maintain the integrity of its own data and permissions model, an add-on should call this to validate query parameters and the requesting user's role whenever the add-on is opened in an iframe (https://developers.google.com/classroom/add-ons/get-started/iframes/iframes-overview). This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesCourseWorkMaterialsService) List added in v0.33.0

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

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

func (*CoursesCourseWorkMaterialsService) Patch added in v0.33.0

Patch: Updates one or more fields of a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work material has already been deleted. * `NOT_FOUND` if the requested course or course work material does not exist

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id: Identifier of the course work material.

type CoursesCourseWorkModifyAssigneesCall

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

func (*CoursesCourseWorkModifyAssigneesCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkModifyAssigneesCall) Do

Do executes the "classroom.courses.courseWork.modifyAssignees" call. Any non-2xx status code is an error. Response headers are in either *CourseWork.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 (*CoursesCourseWorkModifyAssigneesCall) Fields

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

func (*CoursesCourseWorkModifyAssigneesCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CoursesCourseWorkPatchCall

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

func (*CoursesCourseWorkPatchCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkPatchCall) Do

Do executes the "classroom.courses.courseWork.patch" call. Any non-2xx status code is an error. Response headers are in either *CourseWork.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 (*CoursesCourseWorkPatchCall) Fields

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

func (*CoursesCourseWorkPatchCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkPatchCall) UpdateMask

UpdateMask sets the optional parameter "updateMask": Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `CourseWork` object. If a field that does not support empty values is included in the update mask and not set in the `CourseWork` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id` * `grading_period_id` Available in V1_20240401_PREVIEW (https://developers.google.com/classroom/reference/preview) and later.

type CoursesCourseWorkService

type CoursesCourseWorkService struct {
	AddOnAttachments *CoursesCourseWorkAddOnAttachmentsService

	StudentSubmissions *CoursesCourseWorkStudentSubmissionsService
	// contains filtered or unexported fields
}

func NewCoursesCourseWorkService

func NewCoursesCourseWorkService(s *Service) *CoursesCourseWorkService

func (*CoursesCourseWorkService) Create

func (r *CoursesCourseWorkService) Create(courseId string, coursework *CourseWork) *CoursesCourseWorkCreateCall

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

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

func (*CoursesCourseWorkService) Delete

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

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id: Identifier of the course work to delete. This identifier is a Classroom-assigned identifier.

func (*CoursesCourseWorkService) Get

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

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id: Identifier of the course work.

func (*CoursesCourseWorkService) GetAddOnContext added in v0.186.0

func (r *CoursesCourseWorkService) GetAddOnContext(courseId string, itemId string) *CoursesCourseWorkGetAddOnContextCall

GetAddOnContext: Gets metadata for Classroom add-ons in the context of a specific post. To maintain the integrity of its own data and permissions model, an add-on should call this to validate query parameters and the requesting user's role whenever the add-on is opened in an iframe (https://developers.google.com/classroom/add-ons/get-started/iframes/iframes-overview). This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

  • courseId: Identifier of the course.
  • itemId: Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

func (*CoursesCourseWorkService) List

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

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

func (*CoursesCourseWorkService) ModifyAssignees

func (r *CoursesCourseWorkService) ModifyAssignees(courseId string, id string, modifycourseworkassigneesrequest *ModifyCourseWorkAssigneesRequest) *CoursesCourseWorkModifyAssigneesCall

ModifyAssignees: Modifies assignee mode and options of a coursework. Only a teacher of the course that contains the coursework may call this method. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id: Identifier of the coursework.

func (*CoursesCourseWorkService) Patch

func (r *CoursesCourseWorkService) Patch(courseId string, id string, coursework *CourseWork) *CoursesCourseWorkPatchCall

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

  • courseId: Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
  • id: Identifier of the course work.

type CoursesCourseWorkStudentSubmissionsGetCall

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

func (*CoursesCourseWorkStudentSubmissionsGetCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkStudentSubmissionsGetCall) Do

Do executes the "classroom.courses.courseWork.studentSubmissions.get" call. Any non-2xx status code is an error. Response headers are in either *StudentSubmission.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 (*CoursesCourseWorkStudentSubmissionsGetCall) Fields

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

func (*CoursesCourseWorkStudentSubmissionsGetCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkStudentSubmissionsGetCall) IfNoneMatch

IfNoneMatch sets an 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.

type CoursesCourseWorkStudentSubmissionsListCall

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

func (*CoursesCourseWorkStudentSubmissionsListCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkStudentSubmissionsListCall) Do

Do executes the "classroom.courses.courseWork.studentSubmissions.list" call. Any non-2xx status code is an error. Response headers are in either *ListStudentSubmissionsResponse.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 (*CoursesCourseWorkStudentSubmissionsListCall) Fields

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

func (*CoursesCourseWorkStudentSubmissionsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkStudentSubmissionsListCall) IfNoneMatch

IfNoneMatch sets an 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.

func (*CoursesCourseWorkStudentSubmissionsListCall) Late

Late sets the optional parameter "late": Requested lateness value. If specified, returned student submissions are restricted by the requested value. If unspecified, submissions are returned regardless of `late` value.

Possible values:

"LATE_VALUES_UNSPECIFIED" - No restriction on submission late values

specified.

"LATE_ONLY" - Return StudentSubmissions where late is true.
"NOT_LATE_ONLY" - Return StudentSubmissions where late is false.

func (*CoursesCourseWorkStudentSubmissionsListCall) PageSize

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 (*CoursesCourseWorkStudentSubmissionsListCall) PageToken

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 (*CoursesCourseWorkStudentSubmissionsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*CoursesCourseWorkStudentSubmissionsListCall) States

States sets the optional parameter "states": Requested submission states. If specified, returned student submissions match one of the specified submission states.

Possible values:

"SUBMISSION_STATE_UNSPECIFIED" - No state specified. This should never be

returned.

"NEW" - The student has never accessed this submission. Attachments are

not returned and timestamps is not set.

"CREATED" - Has been created.
"TURNED_IN" - Has been turned in to the teacher.
"RETURNED" - Has been returned to the student.
"RECLAIMED_BY_STUDENT" - Student chose to "unsubmit" the assignment.

func (*CoursesCourseWorkStudentSubmissionsListCall) UserId

UserId sets the optional parameter "userId": Optional argument to restrict returned student work to those owned by the student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal "me", indicating the requesting user

type CoursesCourseWorkStudentSubmissionsModifyAttachmentsCall

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

func (*CoursesCourseWorkStudentSubmissionsModifyAttachmentsCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkStudentSubmissionsModifyAttachmentsCall) Do

Do executes the "classroom.courses.courseWork.studentSubmissions.modifyAttachments" call. Any non-2xx status code is an error. Response headers are in either *StudentSubmission.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 (*CoursesCourseWorkStudentSubmissionsModifyAttachmentsCall) Fields

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

func (*CoursesCourseWorkStudentSubmissionsModifyAttachmentsCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CoursesCourseWorkStudentSubmissionsPatchCall

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

func (*CoursesCourseWorkStudentSubmissionsPatchCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkStudentSubmissionsPatchCall) Do

Do executes the "classroom.courses.courseWork.studentSubmissions.patch" call. Any non-2xx status code is an error. Response headers are in either *StudentSubmission.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 (*CoursesCourseWorkStudentSubmissionsPatchCall) Fields

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

func (*CoursesCourseWorkStudentSubmissionsPatchCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CoursesCourseWorkStudentSubmissionsPatchCall) UpdateMask

UpdateMask sets the optional parameter "updateMask": Mask that identifies which fields on the student submission to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields may be specified by teachers: * `draft_grade` * `assigned_grade`

type CoursesCourseWorkStudentSubmissionsReclaimCall

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

func (*CoursesCourseWorkStudentSubmissionsReclaimCall) Context

Context sets the context to be used in this call's Do method.

func (*CoursesCourseWorkStudentSubmissionsReclaimCall) Do

Do executes the "classroom.courses.courseWork.studentSubmissions.reclaim" call. 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 (*CoursesCourseWorkStudentSubmissionsReclaimCall) Fields

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

func (*CoursesCourseWorkStudentSubmissionsReclaimCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CoursesCourseWorkStudentSubmissionsReturnCall

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

func (*CoursesCourseWorkStudentSubmissionsReturnCall) Context