google_api_firestore v0.0.1 GoogleApi.Firestore.V1beta1.RequestBuilder View Source

Helper functions for building Tesla requests

Link to this section Summary

Functions

Add optional parameters to the request

Add optional parameters to the request

Handle the response for a Tesla request

Specify the request method when building a request

Specify the request method when building a request

Link to this section Functions

Link to this function add_optional_params(request, definitions, list) View Source
add_optional_params(map(), %{optional(:atom) => :atom}, keyword()) :: map()

Add optional parameters to the request

Parameters

  • request (Map) - Collected request options
  • definitions (Map) - Map of parameter name to parameter location.
  • options (KeywordList) - The provided optional parameters

Returns

Map

Link to this function add_param(request, location, key, value) View Source
add_param(map(), :atom, :atom, any()) :: map()

Add optional parameters to the request

Parameters

  • request (Map) - Collected request options
  • location (atom) - Where to put the parameter
  • key (atom) - The name of the parameter
  • value (any) - The value of the parameter

Returns

Map

Link to this function decode(env, struct \\ nil, opts \\ []) View Source
decode(Tesla.Env.t(), struct() | false, keyword()) ::
  {:ok, struct()} | {:error, Tesla.Env.t()}

Handle the response for a Tesla request

Parameters

  • env (Tesla.Env) - The response object
  • struct (struct | false) - The shape of the struct to deserialize into. If false, returns the Tesla response.
  • opts (KeywordList) - [optional] Optional parameters

    • :dataWrapped (boolean()): If true, the remove the wrapping “data” field.

Returns

{:ok, struct} on success {:error, info} on failure

Link to this function method(request, m) View Source
method(map(), String.t()) :: map()

Specify the request method when building a request

Parameters

  • request (Map) - Collected request options
  • m (String) - Request method

Returns

Map

Link to this function replace_path_template_vars(u, replacements) View Source
Link to this function url(request, u, replacements) View Source
url(map(), String.t(), Map.t()) :: map()

Specify the request method when building a request

Parameters

  • request (Map) - Collected request options
  • u (String) - Request URL

Returns

Map