PPlusFireStore.API.Projects (pplus_firestore v0.1.7)

View Source

API calls for the Projects endpoints actually used by PPlusFireStore.API.

Summary

Functions

firestore_projects_databases_documents_create_document(connection, parent, collection_id, optional_params \\ [], opts \\ [])

@spec firestore_projects_databases_documents_create_document(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Firestore.V1.Model.Document.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Creates a new document.

Parameters

  • connection (type: GoogleApi.Firestore.V1.Connection.t) - Connection to server
  • parent (type: String.t) - Required. The parent resource. For example: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}
  • collection_id (type: String.t) - Required. The collection ID, relative to parent, to list. For example: chatrooms.
  • 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").
    • :documentId (type: String.t) - The client-assigned document ID to use for this document. Optional. If not specified, an ID will be assigned by the service.
    • :"mask.fieldPaths" (type: list(String.t)) - The list of field paths in the mask. See Document.fields for a field path syntax reference.
    • :body (type: GoogleApi.Firestore.V1.Model.Document.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Firestore.V1.Model.Document{}} on success
  • {:error, info} on failure

firestore_projects_databases_documents_delete(connection, name, optional_params \\ [], opts \\ [])

@spec firestore_projects_databases_documents_delete(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Firestore.V1.Model.Empty.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Deletes a document.

Parameters

  • connection (type: GoogleApi.Firestore.V1.Connection.t) - Connection to server
  • name (type: String.t) - Required. The resource name of the Document to delete. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}.
  • 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").
    • :"currentDocument.exists" (type: boolean()) - When set to true, the target document must exist. When set to false, the target document must not exist.
    • :"currentDocument.updateTime" (type: DateTime.t) - When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Firestore.V1.Model.Empty{}} on success
  • {:error, info} on failure

firestore_projects_databases_documents_get(connection, name, optional_params \\ [], opts \\ [])

@spec firestore_projects_databases_documents_get(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Firestore.V1.Model.Document.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Gets a single document.

Parameters

  • connection (type: GoogleApi.Firestore.V1.Connection.t) - Connection to server
  • name (type: String.t) - Required. The resource name of the Document to get. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}.
  • 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").
    • :"mask.fieldPaths" (type: list(String.t)) - The list of field paths in the mask. See Document.fields for a field path syntax reference.
    • :readTime (type: DateTime.t) - Reads the version of the document at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
    • :transaction (type: String.t) - Reads the document in a transaction.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Firestore.V1.Model.Document{}} on success
  • {:error, info} on failure

firestore_projects_databases_documents_list(connection, parent, collection_id, optional_params \\ [], opts \\ [])

@spec firestore_projects_databases_documents_list(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Firestore.V1.Model.ListDocumentsResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Lists documents.

Parameters

  • connection (type: GoogleApi.Firestore.V1.Connection.t) - Connection to server
  • parent (type: String.t) - Required. The parent resource name. In the format: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/{document_path}. For example: projects/my-project/databases/my-database/documents or projects/my-project/databases/my-database/documents/chatrooms/my-chatroom
  • collection_id (type: String.t) - Optional. The collection ID, relative to parent, to list. For example: chatrooms or messages. This is optional, and when not provided, Firestore will list documents from all collections under the provided parent.
  • 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").
    • :"mask.fieldPaths" (type: list(String.t)) - The list of field paths in the mask. See Document.fields for a field path syntax reference.
    • :orderBy (type: String.t) - Optional. The optional ordering of the documents to return. For example: priority desc, __name__ desc. This mirrors the ORDER BY used in Firestore queries but in a string representation. When absent, documents are ordered based on __name__ ASC.
    • :pageSize (type: integer()) - Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.
    • :pageToken (type: String.t) - Optional. A page token, received from a previous ListDocuments response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of page_size) must match the values set in the request that generated the page token.
    • :readTime (type: DateTime.t) - Perform the read at the provided time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
    • :showMissing (type: boolean()) - If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, create_time, or update_time set. Requests with show_missing may not specify where or order_by.
    • :transaction (type: String.t) - Perform the read as part of an already active transaction.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Firestore.V1.Model.ListDocumentsResponse{}} on success
  • {:error, info} on failure

firestore_projects_databases_documents_patch(connection, name, optional_params \\ [], opts \\ [])

@spec firestore_projects_databases_documents_patch(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Firestore.V1.Model.Document.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Updates or inserts a document.

Parameters

  • connection (type: GoogleApi.Firestore.V1.Connection.t) - Connection to server
  • name (type: String.t) - The resource name of the document, for example projects/{project_id}/databases/{database_id}/documents/{document_path}.
  • 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").
    • :"currentDocument.exists" (type: boolean()) - When set to true, the target document must exist. When set to false, the target document must not exist.
    • :"currentDocument.updateTime" (type: DateTime.t) - When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.
    • :"mask.fieldPaths" (type: list(String.t)) - The list of field paths in the mask. See Document.fields for a field path syntax reference.
    • :"updateMask.fieldPaths" (type: list(String.t)) - The list of field paths in the mask. See Document.fields for a field path syntax reference.
    • :body (type: GoogleApi.Firestore.V1.Model.Document.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Firestore.V1.Model.Document{}} on success
  • {:error, info} on failure

firestore_projects_databases_documents_run_query(connection, parent, optional_params \\ [], opts \\ [])

@spec firestore_projects_databases_documents_run_query(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Firestore.V1.Model.RunQueryResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Runs a query.

Parameters

  • connection (type: GoogleApi.Firestore.V1.Connection.t) - Connection to server
  • parent (type: String.t) - Required. The parent resource name. In the format: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/{document_path}. For example: projects/my-project/databases/my-database/documents or projects/my-project/databases/my-database/documents/chatrooms/my-chatroom
  • 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.Firestore.V1.Model.RunQueryRequest.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Firestore.V1.Model.RunQueryResponse{}} on success
  • {:error, info} on failure