Class CoursesResource
The "courses" collection of methods.
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 |
CourseWorkMaterials
Gets the CourseWorkMaterials resource.
Declaration
public virtual CoursesResource.CourseWorkMaterialsResource CourseWorkMaterials { get; }
Property Value
| Type | Description |
|---|---|
| CoursesResource.CourseWorkMaterialsResource |
Posts
Gets the Posts resource.
Declaration
public virtual CoursesResource.PostsResource Posts { get; }
Property Value
| Type | Description |
|---|---|
| CoursesResource.PostsResource |
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.
A non-admin requesting user can only create a course with themselves as the owner. Domain admins can create
courses owned by any user within their domain. This method returns the following error codes: *
PERMISSION_DENIED if the requesting user is not permitted to create courses or for access errors. *
NOT_FOUND if the primary teacher is not a valid user. * FAILED_PRECONDITION if the course owner's
account is disabled or for the following request errors: * UserCannotOwnCourse *
UserGroupsMembershipLimitReached * ALREADY_EXISTS if an alias was specified in the id and 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_DENIED if the requesting
user is not permitted to delete the requested course or for access errors. * NOT_FOUND if no course exists
with the requested ID.
Declaration
public virtual CoursesResource.DeleteRequest Delete(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| 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_DENIED if the requesting
user is not permitted to access the requested course or for access errors. * NOT_FOUND if no course exists
with the requested ID.
Declaration
public virtual CoursesResource.GetRequest Get(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| 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 |
GetGradingPeriodSettings(string)
Returns the grading period settings in a course. This method returns the following error codes: *
PERMISSION_DENIED if the requesting user isn't permitted to access the grading period settings in the
requested course or for access errors. * NOT_FOUND if the requested course does not exist.
Declaration
public virtual CoursesResource.GetGradingPeriodSettingsRequest GetGradingPeriodSettings(string courseId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | courseId | Required. The identifier of the course. |
Returns
| Type | Description |
|---|---|
| CoursesResource.GetGradingPeriodSettingsRequest |
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_DENIED for access errors. * INVALID_ARGUMENT if
the query argument is malformed. * NOT_FOUND if 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_DENIED
if the requesting user is not permitted to modify the requested course or for access errors. * NOT_FOUND
if no course exists with the requested ID. * INVALID_ARGUMENT if invalid fields are specified in the
update mask or if no update mask is supplied. * FAILED_PRECONDITION for the following request errors: *
CourseNotModifiable * InactiveCourseOwner * IneligibleOwner
Declaration
public virtual CoursesResource.PatchRequest Patch(Course body, string id)
Parameters
| Type | Name | Description |
|---|---|---|
| Course | body | The body of the request. |
| 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_DENIED if the requesting
user is not permitted to modify the requested course or for access errors. * NOT_FOUND if no course exists
with the requested ID. * FAILED_PRECONDITION for 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. |
| 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 |
UpdateGradingPeriodSettings(GradingPeriodSettings, string)
Updates grading period settings of a course. Individual grading periods can be added, removed, or modified
using this method. The requesting user and course owner must be eligible to modify Grading Periods. For
details, see licensing
requirements.
This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted
to modify the grading period settings in a course or for access errors: *
UserIneligibleToUpdateGradingPeriodSettings * INVALID_ARGUMENT if the request is malformed. * NOT_FOUND
if the requested course does not exist.
Declaration
public virtual CoursesResource.UpdateGradingPeriodSettingsRequest UpdateGradingPeriodSettings(GradingPeriodSettings body, string courseId)
Parameters
| Type | Name | Description |
|---|---|---|
| GradingPeriodSettings | body | The body of the request. |
| string | courseId | Required. The identifier of the course. |
Returns
| Type | Description |
|---|---|
| CoursesResource.UpdateGradingPeriodSettingsRequest |