# Exgrafana

[![Build Status](]( [![Hex pm](]( [![ downloads](]( [![Deps Status](]( [![Inline docs](](

(Incomplete) Grafana client library for Elixir using `HTTPoison`.

The available functions are:

@spec create_dashboard(map) :: {:ok, map} | {:error, term}
@spec create_dashboard(map, Keyword.t) :: {:ok, map} | {:error, term}

@spec get_dashboard(binary) :: {:ok, map} | {:error, term}

@spec update_dashboard(map) :: {:ok, map} | {:error, term}
@spec update_dashboard(map, Keyword.t) :: {:ok, map} | {:error, term}

@spec delete_dashboard(binary) :: {:ok, map} | {:error, term}

For more information about the dashboard model structure and the slugs look
[Grafana HTTP API reference](

## Configuration

The following are the configuration arguments available:

  * `:url` - URL of your Grafana server.
  * `:token` - Your API token.
  * `version` - Schema version (Default is 14).


config :exgrafana
  url: "<URL of your Grafana server>",
  token: "<your API token>"

## Installation

`Exgrafana` is available as a Hex package. To install, add it to your
dependencies in your `mix.exs` file:

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

and ensure `httpoison` is started before your application:

def application do
  [applications: [:httpoison]]