Class CoursesResource.AnnouncementsResource
The "announcements" collection of methods.
Inheritance
Inherited Members
Namespace: Google.Apis.Classroom.v1
Assembly: Google.Apis.Classroom.v1.dll
Syntax
public class AnnouncementsResource
Constructors
AnnouncementsResource(IClientService)
Constructs a new resource.
Declaration
public AnnouncementsResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
Create(Announcement, String)
Creates an announcement.
This method returns the following error codes:
PERMISSION_DENIEDif 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_ARGUMENTif the request is malformed. *NOT_FOUNDif the requested course does not exist. *FAILED_PRECONDITIONfor 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. |
| System.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_DENIEDif 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_PRECONDITIONif the requested announcement has already been deleted. *NOT_FOUNDif no course exists with the requested ID.
Declaration
public virtual CoursesResource.AnnouncementsResource.DeleteRequest Delete(string courseId, string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | courseId | Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. |
| System.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_DENIEDif the requesting user is not permitted to access the requested course or announcement, or for access errors. *INVALID_ARGUMENTif the request is malformed. *NOT_FOUNDif the requested course or announcement does not exist.
Declaration
public virtual CoursesResource.AnnouncementsResource.GetRequest Get(string courseId, string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | courseId | Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. |
| System.String | id | Identifier of the announcement. |
Returns
| Type | Description |
|---|---|
| CoursesResource.AnnouncementsResource.GetRequest |
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_DENIEDif the requesting user is not permitted to access the requested course or for access errors. *INVALID_ARGUMENTif the request is malformed. *NOT_FOUNDif the requested course does not exist.
Declaration
public virtual CoursesResource.AnnouncementsResource.ListRequest List(string courseId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.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_DENIEDif the requesting user is not permitted to access the requested course or course work or for access errors. *INVALID_ARGUMENTif the request is malformed. *NOT_FOUNDif 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. |
| System.String | courseId | Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. |
| System.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_DENIEDif the requesting developer project did not create the corresponding announcement or for access errors. *INVALID_ARGUMENTif the request is malformed. *FAILED_PRECONDITIONif the requested announcement has already been deleted. *NOT_FOUNDif 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. |
| System.String | courseId | Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. |
| System.String | id | Identifier of the announcement. |
Returns
| Type | Description |
|---|---|
| CoursesResource.AnnouncementsResource.PatchRequest |