View Source GoogleApi.Docs.V1.Api.Documents (google_api_docs v0.16.0)
API calls for all endpoints tagged Documents
.
Summary
Functions
Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies, the reply to the third request, and another empty reply, in that order. Because other users may be editing the document, the document might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the document should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically.
Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document.
Gets the latest version of the specified document.
Functions
docs_documents_batch_update(connection, document_id, optional_params \\ [], opts \\ [])
View Source@spec docs_documents_batch_update( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Docs.V1.Model.BatchUpdateDocumentResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies, the reply to the third request, and another empty reply, in that order. Because other users may be editing the document, the document might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the document should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically.
Parameters
-
connection
(type:GoogleApi.Docs.V1.Connection.t
) - Connection to server -
document_id
(type:String.t
) - The ID of the document to update. -
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.Docs.V1.Model.BatchUpdateDocumentRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Docs.V1.Model.BatchUpdateDocumentResponse{}}
on success -
{:error, info}
on failure
docs_documents_create(connection, optional_params \\ [], opts \\ [])
View Source@spec docs_documents_create(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.Docs.V1.Model.Document.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document.
Parameters
-
connection
(type:GoogleApi.Docs.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.Docs.V1.Model.Document.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Docs.V1.Model.Document{}}
on success -
{:error, info}
on failure
docs_documents_get(connection, document_id, optional_params \\ [], opts \\ [])
View Source@spec docs_documents_get(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Docs.V1.Model.Document.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Gets the latest version of the specified document.
Parameters
-
connection
(type:GoogleApi.Docs.V1.Connection.t
) - Connection to server -
document_id
(type:String.t
) - The ID of the document to retrieve. -
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"). -
:includeTabsContent
(type:boolean()
) - Whether to populate the Document.tabs field instead of the text content fields like body and documentStyle on Document. - WhenTrue
: Document content populates in the Document.tabs field instead of the text content fields in Document. - WhenFalse
: The content of the document's first tab populates the content fields in Document excluding Document.tabs. If a document has only one tab, then that tab is used to populate the document content. Document.tabs will be empty. -
:suggestionsViewMode
(type:String.t
) - The suggestions view mode to apply to the document. This allows viewing the document with all suggestions inline, accepted or rejected. If one is not specified, DEFAULT_FOR_CURRENT_ACCESS is used.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Docs.V1.Model.Document{}}
on success -
{:error, info}
on failure