Class CoursesResource.CourseWorkMaterialsResource
The "courseWorkMaterials" collection of methods.
Inherited Members
Namespace: Google.Apis.Classroom.v1
Assembly: Google.Apis.Classroom.v1.dll
Syntax
public class CoursesResource.CourseWorkMaterialsResource
Constructors
CourseWorkMaterialsResource(IClientService)
Constructs a new resource.
Declaration
public CourseWorkMaterialsResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Properties
AddOnAttachments
Gets the AddOnAttachments resource.
Declaration
public virtual CoursesResource.CourseWorkMaterialsResource.AddOnAttachmentsResource AddOnAttachments { get; }
Property Value
Type | Description |
---|---|
CoursesResource.CourseWorkMaterialsResource.AddOnAttachmentsResource |
Methods
Create(CourseWorkMaterial, string)
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
Declaration
public virtual CoursesResource.CourseWorkMaterialsResource.CreateRequest Create(CourseWorkMaterial body, string courseId)
Parameters
Type | Name | Description |
---|---|---|
CourseWorkMaterial | 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.CourseWorkMaterialsResource.CreateRequest |
Delete(string, string)
Deletes a course work material. This request must be made by the Developer Console project of the OAuth
client ID 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.
Declaration
public virtual CoursesResource.CourseWorkMaterialsResource.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 course work material to delete. This identifier is a Classroom-assigned identifier. |
Returns
Type | Description |
---|---|
CoursesResource.CourseWorkMaterialsResource.DeleteRequest |
Get(string, string)
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.
Declaration
public virtual CoursesResource.CourseWorkMaterialsResource.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 course work material. |
Returns
Type | Description |
---|---|
CoursesResource.CourseWorkMaterialsResource.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.CourseWorkMaterialsResource.GetAddOnContextRequest GetAddOnContext(string courseId, string itemId)
Parameters
Type | Name | Description |
---|---|---|
string | courseId | Required. Identifier of the course. |
string | itemId | Identifier of the |
Returns
Type | Description |
---|---|
CoursesResource.CourseWorkMaterialsResource.GetAddOnContextRequest |
List(string)
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.
Declaration
public virtual CoursesResource.CourseWorkMaterialsResource.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.CourseWorkMaterialsResource.ListRequest |
Patch(CourseWorkMaterial, string, string)
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
Declaration
public virtual CoursesResource.CourseWorkMaterialsResource.PatchRequest Patch(CourseWorkMaterial body, string courseId, string id)
Parameters
Type | Name | Description |
---|---|---|
CourseWorkMaterial | 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 course work material. |
Returns
Type | Description |
---|---|
CoursesResource.CourseWorkMaterialsResource.PatchRequest |