Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Forms

import { Forms } from "https://googleapis.deno.dev/v1/forms:v1.ts";

Reads and writes Google Forms and responses.

class Forms {
constructor(client?: CredentialsClient, baseUrl?: string);
async formsBatchUpdate(formId: string, req: BatchUpdateFormRequest): Promise<BatchUpdateFormResponse>;
async formsCreate(req: Form): Promise<Form>;
async formsGet(formId: string): Promise<Form>;
async formsResponsesGet(formId: string, responseId: string): Promise<FormResponse>;
async formsResponsesList(formId: string, opts?: FormsResponsesListOptions): Promise<ListFormResponsesResponse>;
async formsWatchesCreate(formId: string, req: CreateWatchRequest): Promise<Watch>;
async formsWatchesDelete(formId: string, watchId: string): Promise<Empty>;
async formsWatchesList(formId: string): Promise<ListWatchesResponse>;
async formsWatchesRenew(
formId: string,
watchId: string,
): Promise<Watch>;
}

§Constructors

§
new Forms(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
formsBatchUpdate(formId: string, req: BatchUpdateFormRequest): Promise<BatchUpdateFormResponse>
[src]

Change the form with a batch of updates.

@param formId

Required. The form ID.

§
formsCreate(req: Form): Promise<Form>
[src]

Create a new form using the title given in the provided form message in the request. Important: Only the form.info.title and form.info.document_title fields are copied to the new form. All other fields including the form description, items and settings are disallowed. To create a new form and add items, you must first call forms.create to create an empty form with a title and (optional) document title, and then call forms.update to add the items.

§
formsGet(formId: string): Promise<Form>
[src]

Get a form.

@param formId

Required. The form ID.

§
formsResponsesGet(formId: string, responseId: string): Promise<FormResponse>
[src]

Get one response from the form.

@param formId

Required. The form ID.

@param responseId

Required. The response ID within the form.

§
formsResponsesList(formId: string, opts?: FormsResponsesListOptions): Promise<ListFormResponsesResponse>
[src]

List a form's responses.

@param formId

Required. ID of the Form whose responses to list.

§
formsWatchesCreate(formId: string, req: CreateWatchRequest): Promise<Watch>
[src]

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).

@param formId

Required. ID of the Form to watch.

§
formsWatchesDelete(formId: string, watchId: string): Promise<Empty>
[src]

Delete a watch.

@param formId

Required. The ID of the Form.

@param watchId

Required. The ID of the Watch to delete.

§
formsWatchesList(formId: string): Promise<ListWatchesResponse>
[src]

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.

@param formId

Required. ID of the Form whose watches to list.

§
formsWatchesRenew(formId: string, watchId: string, req: RenewWatchRequest): Promise<Watch>
[src]

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.

@param formId

Required. The ID of the Form.

@param watchId

Required. The ID of the Watch to renew.