class CoursesTopics extends Resource (View source)

The "topics" collection of methods.

Typical usage is:

 $classroomService = new Google\Service\Classroom(...);
 $topics = $classroomService->courses_topics;

Methods

create(string $courseId, Topic $postBody, array $optParams = [])

Creates a topic. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not permitted to access the requested course, create a topic in the requested course, or for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if the requested course does not exist. (topics.create)

delete(string $courseId, string $id, array $optParams = [])

Deletes a topic. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not allowed to delete the requested topic or for access errors. FAILED_PRECONDITION if the requested topic has already been deleted. * NOT_FOUND if no course or topic exists with the requested ID. (topics.delete)

get(string $courseId, string $id, array $optParams = [])

Returns a topic. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not permitted to access the requested course or topic, or for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if the requested course or topic does not exist. (topics.get)

listCoursesTopics(string $courseId, array $optParams = [])

Returns the list of topics that the requester is permitted to view. 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. (topics.listCoursesTopics)

patch(string $courseId, string $id, Topic $postBody, array $optParams = [])

Updates one or more fields of a topic. This method returns the following error codes: PERMISSION_DENIED if the requesting developer project did not create the corresponding topic or for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if the requested course or topic does not exist (topics.patch)

Details

Topic create(string $courseId, Topic $postBody, array $optParams = [])

Creates a topic. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not permitted to access the requested course, create a topic in the requested course, or for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if the requested course does not exist. (topics.create)

Parameters

string $courseId

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

Topic $postBody
array $optParams

Optional parameters.

Return Value

Topic

Exceptions

Exception

ClassroomEmpty delete(string $courseId, string $id, array $optParams = [])

Deletes a topic. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not allowed to delete the requested topic or for access errors. FAILED_PRECONDITION if the requested topic has already been deleted. * NOT_FOUND if no course or topic exists with the requested ID. (topics.delete)

Parameters

string $courseId

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

string $id

Identifier of the topic to delete.

array $optParams

Optional parameters.

Return Value

ClassroomEmpty

Exceptions

Exception

Topic get(string $courseId, string $id, array $optParams = [])

Returns a topic. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not permitted to access the requested course or topic, or for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if the requested course or topic does not exist. (topics.get)

Parameters

string $courseId

Identifier of the course.

string $id

Identifier of the topic.

array $optParams

Optional parameters.

Return Value

Topic

Exceptions

Exception

ListTopicResponse listCoursesTopics(string $courseId, array $optParams = [])

Returns the list of topics that the requester is permitted to view. 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. (topics.listCoursesTopics)

Parameters

string $courseId

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

array $optParams

Optional parameters.

Return Value

ListTopicResponse

Exceptions

Exception

Topic patch(string $courseId, string $id, Topic $postBody, array $optParams = [])

Updates one or more fields of a topic. This method returns the following error codes: PERMISSION_DENIED if the requesting developer project did not create the corresponding topic or for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if the requested course or topic does not exist (topics.patch)

Parameters

string $courseId

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

string $id

Identifier of the topic.

Topic $postBody
array $optParams

Optional parameters.

Return Value

Topic

Exceptions

Exception