class FormsWatches extends Resource (View source)

The "watches" collection of methods.

Typical usage is:

 $formsService = new Google\Service\Forms(...);
 $watches = $formsService->forms_watches;

Methods

create(string $formId, CreateWatchRequest $postBody, array $optParams = [])

Create a new watch. If a watch ID is provided, it must be unused. For each invoking project, the per form limit is one watch per Watch.EventType. A watch expires seven days after it is created (see Watch.expire_time).

delete(string $formId, string $watchId, array $optParams = [])

Delete a watch. (watches.delete)

listFormsWatches(string $formId, array $optParams = [])

Return a list of the watches owned by the invoking project. The maximum number of watches is two: For each invoker, the limit is one for each event type per form. (watches.listFormsWatches)

renew(string $formId, string $watchId, RenewWatchRequest $postBody, array $optParams = [])

Renew an existing watch for seven days. The state of the watch after renewal is ACTIVE, and the expire_time is seven days from the renewal. Renewing a watch in an error state (e.g. SUSPENDED) succeeds if the error is no longer present, but fail otherwise. After a watch has expired, RenewWatch returns NOT_FOUND. (watches.renew)

Details

Watch create(string $formId, CreateWatchRequest $postBody, array $optParams = [])

Create a new watch. If a watch ID is provided, it must be unused. For each invoking project, the per form limit is one watch per Watch.EventType. A watch expires seven days after it is created (see Watch.expire_time).

(watches.create)

Parameters

string $formId

Required. ID of the Form to watch.

CreateWatchRequest $postBody
array $optParams

Optional parameters.

Return Value

Watch

Exceptions

Exception

FormsEmpty delete(string $formId, string $watchId, array $optParams = [])

Delete a watch. (watches.delete)

Parameters

string $formId

Required. The ID of the Form.

string $watchId

Required. The ID of the Watch to delete.

array $optParams

Optional parameters.

Return Value

FormsEmpty

Exceptions

Exception

ListWatchesResponse listFormsWatches(string $formId, array $optParams = [])

Return a list of the watches owned by the invoking project. The maximum number of watches is two: For each invoker, the limit is one for each event type per form. (watches.listFormsWatches)

Parameters

string $formId

Required. ID of the Form whose watches to list.

array $optParams

Optional parameters.

Return Value

ListWatchesResponse

Exceptions

Exception

Watch renew(string $formId, string $watchId, RenewWatchRequest $postBody, array $optParams = [])

Renew an existing watch for seven days. The state of the watch after renewal is ACTIVE, and the expire_time is seven days from the renewal. Renewing a watch in an error state (e.g. SUSPENDED) succeeds if the error is no longer present, but fail otherwise. After a watch has expired, RenewWatch returns NOT_FOUND. (watches.renew)

Parameters

string $formId

Required. The ID of the Form.

string $watchId

Required. The ID of the Watch to renew.

RenewWatchRequest $postBody
array $optParams

Optional parameters.

Return Value

Watch

Exceptions

Exception