Documentation

Google_Service_Classroom_Resource_Courses extends Google_Service_Resource
in package

The "courses" collection of methods.

Typical usage is: $classroomService = new Google_Service_Classroom(...); $courses = $classroomService->courses;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
create()  : Google_Service_Classroom_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_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: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
delete()  : Google_Service_Classroom_ClassroomEmpty
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. (courses.delete)
get()  : Google_Service_Classroom_Course
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. (courses.get)
listCourses()  : Google_Service_Classroom_ListCoursesResponse
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. (courses.listCourses)
patch()  : Google_Service_Classroom_Course
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 (courses.patch)
update()  : Google_Service_Classroom_Course
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 (courses.update)
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

create()

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_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: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.

public create(Google_Service_Classroom_Course $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_Course

(courses.create)

Parameters
$postBody : Google_Service_Classroom_Course
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Classroom_Course

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

delete()

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. (courses.delete)

public delete(string $id[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_ClassroomEmpty
Parameters
$id : string

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

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Classroom_ClassroomEmpty

get()

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. (courses.get)

public get(string $id[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_Course
Parameters
$id : string

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

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Classroom_Course

listCourses()

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. (courses.listCourses)

public listCourses([array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_ListCoursesResponse
Parameters
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string pageToken nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.

opt_param

string studentId Restricts returned courses to those having a student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal "me", indicating the requesting user

opt_param

string courseStates Restricts returned courses to those in one of the specified states The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.

opt_param

string teacherId Restricts returned courses to those having a teacher with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal "me", indicating the requesting user

opt_param

int pageSize Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.

Return values
Google_Service_Classroom_ListCoursesResponse

patch()

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 (courses.patch)

public patch(string $id, Google_Service_Classroom_Course $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_Course
Parameters
$id : string

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

$postBody : Google_Service_Classroom_Course
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string updateMask Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * name * section * descriptionHeading * description * room * courseState * ownerId Note: patches to ownerId are treated as being effective immediately, but in practice it may take some time for the ownership transfer of all affected resources to complete. When set in a query parameter, this field should be specified as updateMask=,,...

Return values
Google_Service_Classroom_Course

update()

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 (courses.update)

public update(string $id, Google_Service_Classroom_Course $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_Course
Parameters
$id : string

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

$postBody : Google_Service_Classroom_Course
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Classroom_Course

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results