class CoursesPostsAddOnAttachments extends Resource (View source)

The "addOnAttachments" collection of methods.

Typical usage is:

 $classroomService = new Google\Service\Classroom(...);
 $addOnAttachments = $classroomService->courses_posts_addOnAttachments;

Methods

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

Creates an add-on attachment under a post. Requires the add-on to have permission to create new attachments on the post. This method returns the following error codes: PERMISSION_DENIED for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if one of the identified resources does not exist. (addOnAttachments.create)

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

Deletes an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: PERMISSION_DENIED for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if one of the identified resources does not exist.

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

Returns an add-on attachment. Requires the add-on requesting the attachment to be the original creator of the attachment. This method returns the following error codes: PERMISSION_DENIED for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if one of the identified resources does not exist. (addOnAttachments.get)

listCoursesPostsAddOnAttachments(string $courseId, string $postId, array $optParams = [])

Returns all attachments created by an add-on under the post. Requires the add-on to have active attachments on the post or have permission to create new attachments on the post. This method returns the following error codes: PERMISSION_DENIED for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if one of the identified resources does not exist.

patch(string $courseId, string $postId, string $attachmentId, AddOnAttachment $postBody, array $optParams = [])

Updates an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: PERMISSION_DENIED for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if one of the identified resources does not exist.

Details

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

Creates an add-on attachment under a post. Requires the add-on to have permission to create new attachments on the post. This method returns the following error codes: PERMISSION_DENIED for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if one of the identified resources does not exist. (addOnAttachments.create)

Parameters

string $courseId

Required. Identifier of the course.

string $postId

Optional. Deprecated, use item_id instead.

AddOnAttachment $postBody
array $optParams

Optional parameters.

Return Value

AddOnAttachment

Exceptions

Exception

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

Deletes an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: PERMISSION_DENIED for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if one of the identified resources does not exist.

(addOnAttachments.delete)

Parameters

string $courseId

Required. Identifier of the course.

string $postId

Optional. Deprecated, use item_id instead.

string $attachmentId

Required. Identifier of the attachment.

array $optParams

Optional parameters.

Return Value

ClassroomEmpty

Exceptions

Exception

AddOnAttachment get(string $courseId, string $postId, string $attachmentId, array $optParams = [])

Returns an add-on attachment. Requires the add-on requesting the attachment to be the original creator of the attachment. This method returns the following error codes: PERMISSION_DENIED for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if one of the identified resources does not exist. (addOnAttachments.get)

Parameters

string $courseId

Required. Identifier of the course.

string $postId

Optional. Deprecated, use item_id instead.

string $attachmentId

Required. Identifier of the attachment.

array $optParams

Optional parameters.

Return Value

AddOnAttachment

Exceptions

Exception

ListAddOnAttachmentsResponse listCoursesPostsAddOnAttachments(string $courseId, string $postId, array $optParams = [])

Returns all attachments created by an add-on under the post. Requires the add-on to have active attachments on the post or have permission to create new attachments on the post. This method returns the following error codes: PERMISSION_DENIED for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if one of the identified resources does not exist.

(addOnAttachments.listCoursesPostsAddOnAttachments)

Parameters

string $courseId

Required. Identifier of the course.

string $postId

Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead.

array $optParams

Optional parameters.

Return Value

ListAddOnAttachmentsResponse

Exceptions

Exception

AddOnAttachment patch(string $courseId, string $postId, string $attachmentId, AddOnAttachment $postBody, array $optParams = [])

Updates an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: PERMISSION_DENIED for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if one of the identified resources does not exist.

(addOnAttachments.patch)

Parameters

string $courseId

Required. Identifier of the course.

string $postId

Required. Identifier of the post under which the attachment is attached.

string $attachmentId

Required. Identifier of the attachment.

AddOnAttachment $postBody
array $optParams

Optional parameters.

Return Value

AddOnAttachment

Exceptions

Exception