View Source Electric.Client.Fetch.Request (Electric Client v0.1.2)

Summary

Functions

Returns the URL for the Request.

Types

@type attr() ::
  {:headers, headers()}
  | {:params, params()}
  | {:shape, Electric.Client.ShapeDefinition.t()}
  | {:next_cursor, Electric.Client.cursor()}
  | {:live, boolean()}
  | {:replica, Electric.Client.replica()}
  | {:shape_handle, Electric.Client.shape_handle() | nil}
  | {:offset, Electric.Client.Offset.t()}
  | {:method, :get | :head | :delete}
@type attrs() ::
  [attr()]
  | %{
      method: :get | :head | :delete,
      offset: Electric.Client.Offset.t(),
      shape_handle: Electric.Client.shape_handle() | nil,
      replica: Electric.Client.replica(),
      live: boolean(),
      next_cursor: Electric.Client.cursor(),
      shape: Electric.Client.ShapeDefinition.t(),
      params: params(),
      headers: headers()
    }
@type authenticated() :: %Electric.Client.Fetch.Request{
  authenticated: true,
  base_url: URI.t(),
  database_id: term(),
  headers: headers(),
  live: boolean(),
  method: :get | :head | :delete,
  next_cursor: Electric.Client.cursor(),
  offset: Electric.Client.Offset.t(),
  params: params(),
  replica: Electric.Client.replica(),
  shape: Electric.Client.ShapeDefinition.t(),
  shape_handle: Electric.Client.shape_handle() | nil
}
@type headers() :: %{required(String.t()) => [String.t()] | String.t()}
@type params() :: %{required(String.t()) => String.t()}
@type t() :: unauthenticated() | authenticated()
@type unauthenticated() :: %Electric.Client.Fetch.Request{
  authenticated: false,
  base_url: URI.t(),
  database_id: term(),
  headers: headers(),
  live: boolean(),
  method: :get | :head | :delete,
  next_cursor: Electric.Client.cursor(),
  offset: Electric.Client.Offset.t(),
  params: params(),
  replica: Electric.Client.replica(),
  shape: Electric.Client.ShapeDefinition.t(),
  shape_handle: Electric.Client.shape_handle() | nil
}

Functions

Link to this function

url(request, opts \\ [])

View Source

Returns the URL for the Request.