View Source GoogleApi.Forms.V1.Api.Forms (google_api_forms v0.2.1)
API calls for all endpoints tagged Forms
.
Summary
Functions
Change the form with a batch of updates.
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.
Get one response from the form.
List a form's responses.
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 a watch.
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.
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
.
Functions
forms_forms_batch_update(connection, form_id, optional_params \\ [], opts \\ [])
View Source@spec forms_forms_batch_update(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Forms.V1.Model.BatchUpdateFormResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Change the form with a batch of updates.
Parameters
-
connection
(type:GoogleApi.Forms.V1.Connection.t
) - Connection to server -
form_id
(type:String.t
) - Required. The form ID. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.Forms.V1.Model.BatchUpdateFormRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Forms.V1.Model.BatchUpdateFormResponse{}}
on success -
{:error, info}
on failure
@spec forms_forms_create(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.Forms.V1.Model.Form.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
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.
Parameters
-
connection
(type:GoogleApi.Forms.V1.Connection.t
) - Connection to server -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.Forms.V1.Model.Form.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Forms.V1.Model.Form{}}
on success -
{:error, info}
on failure
forms_forms_get(connection, form_id, optional_params \\ [], opts \\ [])
View Source@spec forms_forms_get(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Forms.V1.Model.Form.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Get a form.
Parameters
-
connection
(type:GoogleApi.Forms.V1.Connection.t
) - Connection to server -
form_id
(type:String.t
) - Required. The form ID. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart").
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Forms.V1.Model.Form{}}
on success -
{:error, info}
on failure
forms_forms_responses_get(connection, form_id, response_id, optional_params \\ [], opts \\ [])
View Source@spec forms_forms_responses_get( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Forms.V1.Model.FormResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Get one response from the form.
Parameters
-
connection
(type:GoogleApi.Forms.V1.Connection.t
) - Connection to server -
form_id
(type:String.t
) - Required. The form ID. -
response_id
(type:String.t
) - Required. The response ID within the form. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart").
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Forms.V1.Model.FormResponse{}}
on success -
{:error, info}
on failure
forms_forms_responses_list(connection, form_id, optional_params \\ [], opts \\ [])
View Source@spec forms_forms_responses_list(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Forms.V1.Model.ListFormResponsesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
List a form's responses.
Parameters
-
connection
(type:GoogleApi.Forms.V1.Connection.t
) - Connection to server -
form_id
(type:String.t
) - Required. ID of the Form whose responses to list. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:filter
(type:String.t
) - Which form responses to return. Currently, the only supported filters are: timestamp > N which means to get all form responses submitted after (but not at) timestamp N. timestamp >= N which means to get all form responses submitted at and after timestamp N. For both supported filters, timestamp must be formatted in RFC3339 UTC "Zulu" format. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". -
:pageSize
(type:integer()
) - The maximum number of responses to return. The service may return fewer than this value. If unspecified or zero, at most 5000 responses are returned. -
:pageToken
(type:String.t
) - A page token returned by a previous list response. If this field is set, the form and the values of the filter must be the same as for the original request.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Forms.V1.Model.ListFormResponsesResponse{}}
on success -
{:error, info}
on failure
forms_forms_watches_create(connection, form_id, optional_params \\ [], opts \\ [])
View Source@spec forms_forms_watches_create(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Forms.V1.Model.Watch.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
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).
Parameters
-
connection
(type:GoogleApi.Forms.V1.Connection.t
) - Connection to server -
form_id
(type:String.t
) - Required. ID of the Form to watch. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.Forms.V1.Model.CreateWatchRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Forms.V1.Model.Watch{}}
on success -
{:error, info}
on failure
forms_forms_watches_delete(connection, form_id, watch_id, optional_params \\ [], opts \\ [])
View Source@spec forms_forms_watches_delete( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Forms.V1.Model.Empty.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Delete a watch.
Parameters
-
connection
(type:GoogleApi.Forms.V1.Connection.t
) - Connection to server -
form_id
(type:String.t
) - Required. The ID of the Form. -
watch_id
(type:String.t
) - Required. The ID of the Watch to delete. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart").
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Forms.V1.Model.Empty{}}
on success -
{:error, info}
on failure
forms_forms_watches_list(connection, form_id, optional_params \\ [], opts \\ [])
View Source@spec forms_forms_watches_list(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Forms.V1.Model.ListWatchesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
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.
Parameters
-
connection
(type:GoogleApi.Forms.V1.Connection.t
) - Connection to server -
form_id
(type:String.t
) - Required. ID of the Form whose watches to list. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart").
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Forms.V1.Model.ListWatchesResponse{}}
on success -
{:error, info}
on failure
forms_forms_watches_renew(connection, form_id, watch_id, optional_params \\ [], opts \\ [])
View Source@spec forms_forms_watches_renew( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Forms.V1.Model.Watch.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
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
.
Parameters
-
connection
(type:GoogleApi.Forms.V1.Connection.t
) - Connection to server -
form_id
(type:String.t
) - Required. The ID of the Form. -
watch_id
(type:String.t
) - Required. The ID of the Watch to renew. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.Forms.V1.Model.RenewWatchRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Forms.V1.Model.Watch{}}
on success -
{:error, info}
on failure