PPlusFireStore.Connection (pplus_firestore v0.1.7)

View Source

Handle connection with Google Firestore API

configuration:

config :google_api_firestore, :base_url, "https://my-custom-url.com/"

config :pplus_firestore, PPlusFireStore.Connection,
  decompress_opts: [format: "gzip"]

Summary

Functions

Execute a request on this connection

Configure an authless client connection

Configure a client connection using a provided OAuth2 token as a Bearer token, or a function which yields one.

Types

t()

@type t() :: Tesla.Env.client()

Functions

execute(connection, request)

@spec execute(Tesla.Client.t(), GoogleApi.Gax.Request.t()) :: {:ok, Tesla.Env.t()}

Execute a request on this connection

Returns

  • {:ok, Tesla.Env.t} - If the call was successful
  • {:error, reason} - If the call failed

new()

@spec new() :: Tesla.Client.t()

Configure an authless client connection

Returns

  • Tesla.Env.client

new(token)

@spec new(String.t() | ([String.t()] -> String.t())) :: Tesla.Client.t()

Configure a client connection using a provided OAuth2 token as a Bearer token, or a function which yields one.

Parameters

  • token (type: String.t) - Bearer token
  • token_fetcher (type: list(String.t()) -> String.t()) - Callback which provides an OAuth2 token given a list of scopes

Returns

  • Tesla.Env.client