Crates.io | bump-api |
lib.rs | bump-api |
version | 2.0.0 |
source | src |
created_at | 2022-09-29 21:52:32.929976 |
updated_at | 2022-10-06 21:58:04.795429 |
description | Bump client, generated from the OpenAPI spec. |
homepage | https://github.com/libninjacom/bump-rs |
repository | https://github.com/libninjacom/bump-rs |
max_upload_size | |
id | 676931 |
size | 72,303 |
Bump client, generated from the OpenAPI spec.
use bump_api::BumpClient;
use bump_api::model::*;
#[tokio::main]
async fn main() {
let client = BumpClient::from_env();
let response = client
.post_diffs()
.url("your url")
.previous_url("your previous url")
.previous_definition("your previous definition")
.previous_references(
vec![
Reference { location : Some("your location".to_owned()), content :
Some("your content".to_owned()) }
],
)
.definition("your definition")
.references(
vec![
Reference { location : Some("your location".to_owned()), content :
Some("your content".to_owned()) }
],
)
.expires_at("your expires at")
.send()
.await
.unwrap();
println!("{:#?}", response);
}
This example loads configuration from environment variables, specifically:
BUMP_BASE_URL
BUMP_AUTHORIZATION_TOKEN
BUMP_BASIC_TOKEN
Add this to your Cargo.toml:
[dependencies]
bump-api = "0.1.0"
You can see working examples of every API call in the examples/
directory.
Contributions are welcome!
Library created with Libninja.