# Brighterx [![Hex version]( "Hex version")]( ![Hex downloads]( "Hex downloads") [![Build Status](]( [![Coverage Status](](

> Elixir client for BrighterLink API

## Installation

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

        def deps do
          [{:brighterx, github: "Brightergy/brighterx"}]

Or from hex:

        def deps do
          [{:brighterx, "~> 0.0.2"}]

Ensure you list `brighterx` in application dependency in your mix.exs file.

        [applications: [:brighterx]]

## Usage

You can use the functions in `Brighterx.Api` for making requests to RESTful api of BrighterLink. There are shorthand functions that wrap the common get requests on the Brighterlink resources.

### Examples

Brighterx.Api.create(Brighterx.Resources.Device, %{name: "Test Thermostat", identifier: "00:01", facility_id: 1, type: "thermostat"})

Brighterx.Api.find(Brighterx.Resources.Company, [params: %{name: "Brightergy"}])

Brighterx.Api.update(Brighterx.Resources.Device, 1, %{name: "7th floor south"})