# OpenXchangeClient

Documentation of the Open-Xchange HTTP API which is used by the new AJAX GUI.

### Building

To install the required dependencies and to build the elixir project, run:
mix local.hex --force
mix do deps.get, compile

## Installation

If [available in Hex](, the package can be installed
by adding `open_xchange_client` to your list of dependencies in `mix.exs`:

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

Documentation can be generated with [ExDoc](
and published on [HexDocs]( Once published, the docs can
be found at [](

## Usage

alias OpenXchangeClient.Api
alias OpenXchangeClient.Model

endpoint = ""
username = ""
password = "secure-password"
conn =

# Get a authenticated session for the current user
{:ok, %{session: session}} = Api.Login.do_login(conn, username, password)

# Use the session for authenticated requests
{:ok, data: %Model.CurrentUserData{ user_id: uid}} = Api.UserMe.get_current_user(conn, session)

# Don't forget to logout - otherwise you might hit a rate limit from OX
Api.Login.do_logout(conn, session)