Knock.Api (Knock v0.4.18)

View Source

Api client for interacting with Knock

Summary

Types

Defines available options to pass to an API function

Describes a response from calling an API function

Functions

Executes a delete request against the Knock api.

Executes a get request against the Knock api.

Returns the current version for the library

Executes a post request against the Knock api.

Executes a put request against the Knock api

Types

options()

@type options() :: [Tesla.option() | {:idempotency_key, binary()}] | []

Defines available options to pass to an API function

response()

@type response() ::
  {:ok, Knock.Response.t()} | {:error, Knock.Response.t()} | {:error, any()}

Describes a response from calling an API function

Functions

delete(client, path, opts \\ [])

@spec delete(Knock.Client.t(), String.t(), options()) :: response()

Executes a delete request against the Knock api.

get(client, path, opts \\ [])

@spec get(Knock.Client.t(), String.t(), options()) :: response()

Executes a get request against the Knock api.

library_version()

Returns the current version for the library

post(client, path, body, opts \\ [])

@spec post(Knock.Client.t(), String.t(), map(), options()) :: response()

Executes a post request against the Knock api.

put(client, path, body, opts \\ [])

@spec put(Knock.Client.t(), String.t(), map(), options()) :: response()

Executes a put request against the Knock api