Show / Hide Table of Contents

Class CoursesResource.AnnouncementsResource

The "announcements" collection of methods.

Inheritance
object
CoursesResource.AnnouncementsResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Classroom.v1
Assembly: Google.Apis.Classroom.v1.dll
Syntax
public class CoursesResource.AnnouncementsResource

Constructors

AnnouncementsResource(IClientService)

Constructs a new resource.

Declaration
public AnnouncementsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Properties

AddOnAttachments

Gets the AddOnAttachments resource.

Declaration
public virtual CoursesResource.AnnouncementsResource.AddOnAttachmentsResource AddOnAttachments { get; }
Property Value
Type Description
CoursesResource.AnnouncementsResource.AddOnAttachmentsResource

Methods

Create(Announcement, string)

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

Declaration
public virtual CoursesResource.AnnouncementsResource.CreateRequest Create(Announcement body, string courseId)
Parameters
Type Name Description
Announcement body

The body of the request.

string courseId

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

Returns
Type Description
CoursesResource.AnnouncementsResource.CreateRequest

Delete(string, string)

Deletes an announcement. This request must be made by the Developer Console project of the OAuth client ID 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.

Declaration
public virtual CoursesResource.AnnouncementsResource.DeleteRequest Delete(string courseId, string id)
Parameters
Type Name Description
string courseId

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

string id

Identifier of the announcement to delete. This identifier is a Classroom-assigned identifier.

Returns
Type Description
CoursesResource.AnnouncementsResource.DeleteRequest

Get(string, string)

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.

Declaration
public virtual CoursesResource.AnnouncementsResource.GetRequest Get(string courseId, string id)
Parameters
Type Name Description
string courseId

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

string id

Identifier of the announcement.

Returns
Type Description
CoursesResource.AnnouncementsResource.GetRequest

GetAddOnContext(string, string)

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

Declaration
public virtual CoursesResource.AnnouncementsResource.GetAddOnContextRequest GetAddOnContext(string courseId, string itemId)
Parameters
Type Name Description
string courseId

Required. Identifier of the course.

string 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.

Returns
Type Description
CoursesResource.AnnouncementsResource.GetAddOnContextRequest

List(string)

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.

Declaration
public virtual CoursesResource.AnnouncementsResource.ListRequest List(string courseId)
Parameters
Type Name Description
string courseId

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

Returns
Type Description
CoursesResource.AnnouncementsResource.ListRequest

ModifyAssignees(ModifyAnnouncementAssigneesRequest, string, string)

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.

Declaration
public virtual CoursesResource.AnnouncementsResource.ModifyAssigneesRequest ModifyAssignees(ModifyAnnouncementAssigneesRequest body, string courseId, string id)
Parameters
Type Name Description
ModifyAnnouncementAssigneesRequest body

The body of the request.

string courseId

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

string id

Identifier of the announcement.

Returns
Type Description
CoursesResource.AnnouncementsResource.ModifyAssigneesRequest

Patch(Announcement, string, string)

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

Declaration
public virtual CoursesResource.AnnouncementsResource.PatchRequest Patch(Announcement body, string courseId, string id)
Parameters
Type Name Description
Announcement body

The body of the request.

string courseId

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

string id

Identifier of the announcement.

Returns
Type Description
CoursesResource.AnnouncementsResource.PatchRequest
In this article
Back to top Generated by DocFX