Skip to content

olinkl/ovh-rs

Repository files navigation

OVH-rs Build Status Build status Coverage Status License MIT

A lightweight wrapper around OVH's APIs.

Handles credential management and requests signing.

Prerequisites

Considere using stable Rust. Tested on Linux, Windows, MacOSX.

Quickstart

Compile and fetch dependencies

cargo build

Fill your credentials

$cp Config.toml.dist Config.toml

Edit your Config.toml file.

[default]
endpoint = "ovh-eu"

[ovh-eu]
application_key = "<APPLICATION KEY>"
application_secret = "<APPLICATION SECRET>"

Create your credential via : https://eu.api.ovh.com/createApp/ or via a simple curl but take care of accessRules given,

$curl -XPOST -H"X-Ovh-Application: <APPLICATION KEY>" \
-H "Content-type: application/json" \
https://eu.api.ovh.com/1.0/auth/credential  -d '{
    "accessRules": [
        {"method": "GET","path": "/*"},
        {"method": "POST","path": "/*"},
        {"method": "PUT","path": "/*"},
        {"method": "DELETE","path": "/*"}
    ],
    "redirection":"https://api.ovh.com/"
}'

With great power comes with great responsibility ;)

Edit your Config.toml file.

consumer_key = "<CONSUMER KEY>"

How to run tests?

cargo test

How to build doc?

cargo doc --no-deps

and explore ./target/doc/ovh/index.html with your favorite browser

Tested on APIs

OVH Europe

License

MIT

Thanks to Rust community

About

A lightweight Rust wrapper around OVH's APIs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages