oxide-api

Crates.iooxide-api
lib.rsoxide-api
version0.1.0-rc.41
sourcesrc
created_at2022-01-13 05:07:09.604233
updated_at2022-09-09 06:19:18.802549
descriptionA fully generated & opinionated API client for the Oxide API.
homepage
repositoryhttps://github.com/oxidecomputer/oxide.rs/tree/main/oxide
max_upload_size
id513189
size616,768
(oxideservicebot)

documentation

https://docs.rs/oxide-api/

README

oxide-api

A fully generated, opinionated API client library for Oxide.

docs.rs

API Details

API for interacting with the Oxide control plane

Contact

url email
https://oxide.computer api@oxide.computer

Client Details

This client is generated from the Oxide OpenAPI specs based on API spec version 0.0.1. This way it will remain up to date as features are added. The documentation for the crate is generated along with the code to make this library easy to use.

To install the library, add the following to your Cargo.toml file.

[dependencies]
oxide-api = "0.1.0-rc.41"

Basic example

Typical use will require intializing a Client. This requires a user agent string and set of credentials.

use oxide_api::Client;

let oxide = Client::new(
    String::from("api-key"),
    String::from("host"),
);

Alternatively, the library can search for most of the variables required for the client in the environment:

  • OXIDE_TOKEN
  • OXIDE_HOST

And then you can create a client from the environment.

use oxide_api::Client;

let oxide = Client::new_from_env();
Commit count: 701

cargo fmt