Knock.Api (Knock v0.4.14) View Source

Api client for interacting with Knock

Link to this section 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

Link to this section Types

Specs

options() :: [Tesla.option()] | []

Defines available options to pass to an API function

Specs

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

Describes a response from calling an API function

Link to this section Functions

Link to this function

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

View Source

Specs

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

Executes a delete request against the Knock api.

Link to this function

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

View Source

Specs

Executes a get request against the Knock api.

Returns the current version for the library

Link to this function

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

View Source

Specs

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

Executes a post request against the Knock api.

Link to this function

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

View Source

Specs

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

Executes a put request against the Knock api