class CoursesAnnouncementsAddOnAttachments extends Resource (View source)

The "addOnAttachments" collection of methods.

Typical usage is:

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

Methods

create(string $courseId, string $itemId, 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 $itemId, 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 $itemId, 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)

listCoursesAnnouncementsAddOnAttachments(string $courseId, string $itemId, 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 $itemId, 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 $itemId, 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 $itemId

Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.

AddOnAttachment $postBody
array $optParams

Optional parameters.

Return Value

AddOnAttachment

Exceptions

Exception

ClassroomEmpty delete(string $courseId, string $itemId, 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 $itemId

Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

string $attachmentId

Required. Identifier of the attachment.

array $optParams

Optional parameters.

Return Value

ClassroomEmpty

Exceptions

Exception

AddOnAttachment get(string $courseId, string $itemId, 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 $itemId

Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

string $attachmentId

Required. Identifier of the attachment.

array $optParams

Optional parameters.

Return Value

AddOnAttachment

Exceptions

Exception

ListAddOnAttachmentsResponse listCoursesAnnouncementsAddOnAttachments(string $courseId, string $itemId, 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.listCoursesAnnouncementsAddOnAttachments)

Parameters

string $courseId

Required. Identifier of the course.

string $itemId

Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.

array $optParams

Optional parameters.

Return Value

ListAddOnAttachmentsResponse

Exceptions

Exception

AddOnAttachment patch(string $courseId, string $itemId, 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 $itemId

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