2017-07-15 11:20:25 +00:00
|
|
|
[![Build Status](https://travis-ci.org/avitex/elixir-vultr.svg)](https://travis-ci.org/avitex/elixir-vultr)
|
2017-07-30 09:37:35 +00:00
|
|
|
[![Hex.pm](https://img.shields.io/hexpm/v/vultr.svg)](https://hex.pm/packages/vultr)
|
2017-07-15 14:07:47 +00:00
|
|
|
[![Hex Docs](https://img.shields.io/badge/hex-docs-blue.svg)](https://hexdocs.pm/vultr)
|
2017-07-15 11:20:25 +00:00
|
|
|
|
|
|
|
# Vultr
|
|
|
|
|
|
|
|
**Simple wrapper for the [Vultr API](https://www.vultr.com/api/).**
|
|
|
|
Documentation hosted on [hexdocs](https://hexdocs.pm/vultr).
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
Add `vultr` to your list of dependencies in `mix.exs`:
|
|
|
|
|
|
|
|
```elixir
|
|
|
|
def deps do
|
2017-08-23 08:15:08 +00:00
|
|
|
[{:vultr, "~> 0.2.2"}]
|
2017-07-15 11:20:25 +00:00
|
|
|
end
|
|
|
|
```
|
|
|
|
|
|
|
|
## Examples
|
2017-07-15 11:33:29 +00:00
|
|
|
#### Retrieving app list
|
2017-07-15 11:20:25 +00:00
|
|
|
|
|
|
|
```elixir
|
|
|
|
Vultr.app_list()
|
|
|
|
|
|
|
|
# Example response
|
2017-07-30 09:37:35 +00:00
|
|
|
{:ok, %{ "1" => %{"APPID" => "1", "deploy_name" => "LEMP on CentOS 6 x64", ... }, ... }}
|
2017-07-15 11:20:25 +00:00
|
|
|
```
|
|
|
|
|
2017-07-15 11:33:29 +00:00
|
|
|
#### Using authenticated methods
|
2017-07-15 11:20:25 +00:00
|
|
|
|
|
|
|
```elixir
|
|
|
|
client = Vultr.client("<APIKEY>")
|
2017-07-30 09:37:35 +00:00
|
|
|
Vultr.server_list(client, [])
|
|
|
|
```
|