View Source Electric.Client.Fetch.Request (Electric Client v0.1.0-dev-6)

Summary

Functions

Returns the URL for the Request.

Types

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

Functions

Link to this function

url(request, opts \\ [])

View Source

Returns the URL for the Request.