#heroku

heroku_rs

Rust bindings for the Heroku API

14 releases

0.6.0 May 29, 2021
0.5.4 Dec 24, 2020
0.5.3 Aug 14, 2020
0.5.2 May 29, 2020
0.3.1 Mar 23, 2020

#4 in #heroku

22 downloads per month

MIT/Apache

705KB
10K SLoC

heroku_rs

crates.io Documentation MIT/Apache-2 licensed CI

Intro

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.

Getting Started

Add the following to your Cargo.toml and run cargo build. Voila.

Note that version 0.6 and later uses tokio 1.0

[dependencies]
heroku_rs = "0.6"

See FEATURES documentation for more information about the configurations of the crate.

- Example

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.

Useful reads if you're not familiar with Heroku

Heroku quickstart

Heroku API reference

Generating a heroku API key

License

Licensed under either of

at your option.

Licensing

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.

Dependencies

~5–17MB
~248K SLoC