google_api_docs v0.8.0 GoogleApi.Docs.V1.Api.Documents View Source

API calls for all endpoints tagged Documents.

Link to this section Summary

Functions

Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored.

Gets the latest version of the specified document.

Link to this section Functions

Link to this function

docs_documents_batch_update(connection, document_id, optional_params \\ [], opts \\ [])

View Source
docs_documents_batch_update(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Docs.V1.Model.BatchUpdateDocumentResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:error, Tesla.Env.t()}

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
Link to this function

docs_documents_create(connection, optional_params \\ [], opts \\ [])

View Source
docs_documents_create(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Docs.V1.Model.Document.t()}
  | {:ok, Tesla.Env.t()}
  | {:error, Tesla.Env.t()}

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
Link to this function

docs_documents_get(connection, document_id, optional_params \\ [], opts \\ [])

View Source
docs_documents_get(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, GoogleApi.Docs.V1.Model.Document.t()}
  | {:ok, Tesla.Env.t()}
  | {:error, Tesla.Env.t()}

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").
    • :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