Class CoursesResource
The "courses" collection of methods.
Inheritance
Inherited Members
Namespace: Google.Apis.Classroom.v1
Assembly: Google.Apis.Classroom.v1.dll
Syntax
public class CoursesResource
Constructors
CoursesResource(IClientService)
Constructs a new resource.
Declaration
public CoursesResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Properties
Aliases
Gets the Aliases resource.
Declaration
public virtual CoursesResource.AliasesResource Aliases { get; }
Property Value
| Type | Description |
|---|---|
| CoursesResource.AliasesResource |
Announcements
Gets the Announcements resource.
Declaration
public virtual CoursesResource.AnnouncementsResource Announcements { get; }
Property Value
| Type | Description |
|---|---|
| CoursesResource.AnnouncementsResource |
CourseWork
Gets the CourseWork resource.
Declaration
public virtual CoursesResource.CourseWorkResource CourseWork { get; }
Property Value
| Type | Description |
|---|---|
| CoursesResource.CourseWorkResource |
Students
Gets the Students resource.
Declaration
public virtual CoursesResource.StudentsResource Students { get; }
Property Value
| Type | Description |
|---|---|
| CoursesResource.StudentsResource |
Teachers
Gets the Teachers resource.
Declaration
public virtual CoursesResource.TeachersResource Teachers { get; }
Property Value
| Type | Description |
|---|---|
| CoursesResource.TeachersResource |
Topics
Gets the Topics resource.
Declaration
public virtual CoursesResource.TopicsResource Topics { get; }
Property Value
| Type | Description |
|---|---|
| CoursesResource.TopicsResource |
Methods
Create(Course)
Creates a course.
The user specified in ownerId is the owner of the created course and added as a teacher.
This method returns the following error codes:
PERMISSION_DENIEDif the requesting user is not permitted to create courses or for access errors. *NOT_FOUNDif the primary teacher is not a valid user. *FAILED_PRECONDITIONif the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached *ALREADY_EXISTSif an alias was specified in theidand already exists.
Declaration
public virtual CoursesResource.CreateRequest Create(Course body)
Parameters
| Type | Name | Description |
|---|---|---|
| Course | body | The body of the request. |
Returns
| Type | Description |
|---|---|
| CoursesResource.CreateRequest |
Delete(String)
Deletes a course.
This method returns the following error codes:
PERMISSION_DENIEDif the requesting user is not permitted to delete the requested course or for access errors. *NOT_FOUNDif no course exists with the requested ID.
Declaration
public virtual CoursesResource.DeleteRequest Delete(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | Identifier of the course to delete. This identifier can be either the Classroom-assigned identifier or an alias. |
Returns
| Type | Description |
|---|---|
| CoursesResource.DeleteRequest |
Get(String)
Returns a course.
This method returns the following error codes:
PERMISSION_DENIEDif the requesting user is not permitted to access the requested course or for access errors. *NOT_FOUNDif no course exists with the requested ID.
Declaration
public virtual CoursesResource.GetRequest Get(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | Identifier of the course to return. This identifier can be either the Classroom-assigned identifier or an alias. |
Returns
| Type | Description |
|---|---|
| CoursesResource.GetRequest |
List()
Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. Returned courses are ordered by creation time, with the most recently created coming first.
This method returns the following error codes:
PERMISSION_DENIEDfor access errors. *INVALID_ARGUMENTif the query argument is malformed. *NOT_FOUNDif any users specified in the query arguments do not exist.
Declaration
public virtual CoursesResource.ListRequest List()
Returns
| Type | Description |
|---|---|
| CoursesResource.ListRequest |
Patch(Course, String)
Updates one or more fields in a course.
This method returns the following error codes:
PERMISSION_DENIEDif the requesting user is not permitted to modify the requested course or for access errors. *NOT_FOUNDif no course exists with the requested ID. *INVALID_ARGUMENTif invalid fields are specified in the update mask or if no update mask is supplied. *FAILED_PRECONDITIONfor the following request errors: * CourseNotModifiable
Declaration
public virtual CoursesResource.PatchRequest Patch(Course body, string id)
Parameters
| Type | Name | Description |
|---|---|---|
| Course | body | The body of the request. |
| System.String | id | Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. |
Returns
| Type | Description |
|---|---|
| CoursesResource.PatchRequest |
Update(Course, String)
Updates a course.
This method returns the following error codes:
PERMISSION_DENIEDif the requesting user is not permitted to modify the requested course or for access errors. *NOT_FOUNDif no course exists with the requested ID. *FAILED_PRECONDITIONfor the following request errors: * CourseNotModifiable
Declaration
public virtual CoursesResource.UpdateRequest Update(Course body, string id)
Parameters
| Type | Name | Description |
|---|---|---|
| Course | body | The body of the request. |
| System.String | id | Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. |
Returns
| Type | Description |
|---|---|
| CoursesResource.UpdateRequest |