Crates.io | heroku_rs |
lib.rs | heroku_rs |
version | 0.6.0 |
source | src |
created_at | 2020-02-29 18:38:55.917473 |
updated_at | 2021-05-29 20:48:43.359255 |
description | Rust bindings for the Heroku API |
homepage | https://github.com/bensadiku/heroku_rs |
repository | https://github.com/bensadiku/heroku_rs |
max_upload_size | |
id | 213845 |
size | 795,981 |
This crate provides some convenient Rust bindings for the Heroku v3 API.
See the documentation for more information on which endpoints are covered by the crate.
Add the following to your Cargo.toml
and run cargo build
. Voila.
[dependencies]
heroku_rs = "0.6"
See FEATURES documentation for more information about the configurations of the crate.
Here's a simple example which fetches the apps list.
use heroku_rs::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
//create the client
let heroku = HttpApiClient::create("API_KEY")?;
//request all the apps
let response = heroku.request(&AppList::new());
//match response
match response {
Ok(apps) => println!("Success: {:#?}", apps),
Err(e) => println!("Error: {}", e),
}
Ok(())
}
For more documentation see the docs.
For more examples see the directory.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.