Documentation

Google_Service_Classroom_Resource_CoursesAnnouncements extends Google_Service_Resource
in package

The "announcements" collection of methods.

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

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_Announcement
Creates an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create announcements in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible (announcements.create)
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
delete()  : Google_Service_Classroom_ClassroomEmpty
Deletes an announcement. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding announcement item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding announcement, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested announcement has already been deleted.
get()  : Google_Service_Classroom_Announcement
Returns an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or announcement, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or announcement does not exist. (announcements.get)
listCoursesAnnouncements()  : Google_Service_Classroom_ListAnnouncementsResponse
Returns a list of announcements that the requester is permitted to view.
modifyAssignees()  : Google_Service_Classroom_Announcement
Modifies assignee mode and options of an announcement. Only a teacher of the course that contains the announcement may call this method. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.
patch()  : Google_Service_Classroom_Announcement
Updates one or more fields of an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding announcement or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested announcement has already been deleted. * `NOT_FOUND` if the requested course or announcement does not exist (announcements.patch)
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 an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create announcements in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible (announcements.create)

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

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

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

Optional parameters.

Return values
Google_Service_Classroom_Announcement

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 an announcement. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding announcement item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding announcement, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested announcement has already been deleted.

public delete(string $courseId, string $id[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_ClassroomEmpty
  • NOT_FOUND if no course exists with the requested ID. (announcements.delete)
Parameters
$courseId : string

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

$id : string

Identifier of the announcement to delete. This identifier is a Classroom-assigned identifier.

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

Optional parameters.

Return values
Google_Service_Classroom_ClassroomEmpty

get()

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

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

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

$id : string

Identifier of the announcement.

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

Optional parameters.

Return values
Google_Service_Classroom_Announcement

listCoursesAnnouncements()

Returns a list of announcements that the requester is permitted to view.

public listCoursesAnnouncements(string $courseId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_ListAnnouncementsResponse

Course students may only view PUBLISHED announcements. Course teachers and domain administrators may view all announcements. 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. (announcements.listCoursesAnnouncements)

Parameters
$courseId : string

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

$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 orderBy Optional sort ordering for results. A comma- separated list of fields with an optional sort direction keyword. Supported field is updateTime. Supported direction keywords are asc and desc. If not specified, updateTime desc is the default behavior. Examples: updateTime asc, updateTime

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.

opt_param

string announcementStates Restriction on the state of announcements returned. If this argument is left unspecified, the default value is PUBLISHED.

Return values
Google_Service_Classroom_ListAnnouncementsResponse

modifyAssignees()

Modifies assignee mode and options of an announcement. Only a teacher of the course that contains the announcement may call this method. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.

public modifyAssignees(string $courseId, string $id, Google_Service_Classroom_ModifyAnnouncementAssigneesRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_Announcement

(announcements.modifyAssignees)

Parameters
$courseId : string

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

$id : string

Identifier of the announcement.

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

Optional parameters.

Return values
Google_Service_Classroom_Announcement

patch()

Updates one or more fields of an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding announcement or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested announcement has already been deleted. * `NOT_FOUND` if the requested course or announcement does not exist (announcements.patch)

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

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

$id : string

Identifier of the announcement.

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

Optional parameters.

Tags
opt_param

string updateMask Mask that identifies which fields on the announcement to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the Announcement object. If a field that does not support empty values is included in the update mask and not set in the Announcement object, an INVALID_ARGUMENT error is returned. The following fields may be specified by teachers: * text * state * scheduled_time

Return values
Google_Service_Classroom_Announcement

convertToArrayAndStripNulls()

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

Search results