heroku-rs

crates.io Documentation MIT/Apache-2 licensed CI

This project is currently under development

Intro

This is a rust api wrapper for the Heroku v3 API.

Getting Started

Add the following to your Cargo.toml

toml [dependencies] heroku_rs = "0.3" run: cargo build

Here's a simple example which fetches the apps list. At the moment, the client is blocking by default.

```rust use herokurs::framework::{ auth::Credentials, response::{ApiResponse, ApiResult}, apiclient::HerokuApiClient, ApiEnvironment, HttpApiClient, HttpApiClientConfig, }; use herokurs::endpoints::apps;

fn main() -> Result<(), Box> {

let credentials = Credentials::UserAuthToken {
    token: String::from("TOKEN_HERE"),
};

let api_client = HttpApiClient::new(
    credentials,
    HttpApiClientConfig::default(),
    ApiEnvironment::Production,
)?;

let response = api_client.request(&apps::AppList {});

match response {
    Ok(success) => println!("Success: {:#?}", success),
    Err(e) => println!("Error: {}", e),
}

Ok(())

} ```

Useful links

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.