# ExDesk

A library for accessing [The API]( 

I used this as a project to help with learning Elixir and is very much a work in progress. Feel free to comment and or contribute :)

## Installation

The package can be installed via:

  1. Add `exdesk` to your list of dependencies in `mix.exs`:

        def deps do
          [{:exdesk, "~> 0.1.0"}]

  2. Ensure exdesk is started before your application:

        def application do
          [applications: [:exdesk]]

## Usage and examples
  To configure the authorization globally, you can either call `ExDesk.configure`:
      site_name: "",
      email: "",
      password: "yourpassword"
  Or set a `EXDESK_CONFIG` environment variable with site_name, email and password separated by commas.
  * this environment variable will override all config calls from within the application.
    $,,yourpassword iex -S mix
  Or you can scope to config to the current process:
      site_name: "",
      email: "",
      password: "yourpassword"

All responses will be a `Map` of the response from This will return a `Map` ozf the JSON response described here:
[]( )

  Fetching a list of the first ten cases:
	ExDesk.list("cases", [per_page: 10, sort_field: "created_at", sort_direction: "asc"])
Creating a new resource:

    ExDesk.create("labels", [name: "A Label", description: "a description", types: ["case"], enabled: true, color: "purple"])

Fetching a single resource:"cases/12345")
Searching for a resource:

    ExDesk.list("labels/search", [name: "Feedback"])
Updating a resource:

    ExDesk.update("labels/12345", [color: "red"])
Deleting a resource: