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
$client
private
Google_Client
$client
$methods
private
array<string|int, mixed>
$methods
$resourceName
private
string
$resourceName
$rootUrl
private
string
$rootUrl
$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
Tags
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
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
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
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