ExVCOM
Elixir wrapper for the VCOM API.
installation
Installation
If available in Hex, the package can be installed
by adding ex_vcom to your list of dependencies in mix.exs:
def deps do
[
{:ex_vcom, "~> 0.1.1"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_vcom.
usage
Usage
# 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
Developing
# 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