Metabase

Installation

metabase is published on Hex. Add it to your list of dependencies in mix.exs:

def deps do
  [
    {:metabase, "~> 0.1"}
  ]
end

Usage

Requests can be made using the send/2 function. This function accepts a Metabase.RequestOperation struct as the first argument and a keyword list of configuration options as the second argument.

Example

  iex> %Metabase.RequestOperation{}
  ...> |> Map.put(:body, username: "person@mymetabase.com", password: "fakepassword")
  ...> |> Map.put(:method, :post)
  ...> |> Map.put(:path, "/session")
  ...> |> Metabase.send(host: "mymetabase.com/api")
  {:ok, %Metabase.Response{}}

Configuration

The send/2 function takes a keyword list of configuration options as the second argument. These provide the client with additional details needed to make a request and various other options for how the client should process the request and how it should behave.

Options