ExOvh is an helper library for the elixir language for the Ovh Api. To use the Openstack components of the OVH API, see Openstex
application key
, application secret
and consumer key
.
This may be done manually by going to https://eu.api.ovh.com/createApp/
and following the directions outlined by OVH
at
their first steps guide.
Alternatively, this may be achieved by running a mix task. This saves me a lot of time when generating a new application.
The client module (eg AwesomeApp.OvhClient
) is the interface for accessing the
functions of the ex_ovh API
.
GET /me
%ExOvh.Query{headers: [], method: :get, params: %{}, service: :ovh, uri: "/me"} \
|> MyApp.OvhClient.request!()
GET /me/api/application
%ExOvh.Query{headers: [], method: :get, params: %{}, service: :ovh, uri: "/me/api/application"} \
|> MyApp.OvhClient.request!()
GET /me/api/application/#{app_id}
app_id = "0"
%ExOvh.Query{headers: [], method: :get, params: %{}, service: :ovh, uri: "/me/api/application/#{app_id}"} \
|> MyApp.OvhClient.request!()
GET /cloud/project/{serviceName}/storage
service_name = "service_name" \
%ExOvh.Query{headers: [], method: :get, params: %{}, service: :ovh, uri: "/cloud/project/#{service_name}/storage"} \
MyApp.OvhClient.request!()
Note: The Helper functions are listed under Services
. Helper functions are only available currently for the
/Cloud
portion of the OVH API. Where other parts of the api need to be queried, just build the query manually
using Method 1 as above. Pull requests for helper functions for other parts of the OVH API are welcome.
Eventually, I would like to write a macro to create the queries.
GET /cloud/project/{serviceName}/storage
ExOvh.Services.V1.Cloud.Cloudstorage.Query.get_containers(service_name) \
|> ExOvh.request!()
For more information See Hex Docs
This is an unofficial client to the OVH api and is not maintained by OVH.