README.md

# ExVCOM

Elixir wrapper for the [VCOM API](https://meteocontrol.github.io/vcom-api).

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `ex_vcom` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [
    {:ex_vcom, "~> 0.1.1"}
  ]
end
```

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/ex_vcom](https://hexdocs.pm/ex_vcom).

## Usage

```elixir
# Create basic auth client
client = ExVcom.Connection.new("myUsername", "myPassword")

# Retrieve access token
{:ok, oauth_credentials } = ExVcom.Api.Default.login_post(client, %{ "grant_type" => "password", "username" => "myUsername", "password" => "myPassword" })

# Generate OAuth client
oauth_client = ExVcom.ConnectionOAuth.new("acess_token_from_step_2", "my-access-token")

# Query VCOM API for data
ExVcom.Api.Default.systems_get(oauth_client)
```

## Developing

```bash
# install the latest version of "openapi-generator-cli"
$ npm install @openapitools/openapi-generator-cli -g

$ openapi-generator-cli generate -i openapi.yaml -g elixir -o lib --additional-properties=invokerPackage=ExVcom
```