Crates.io | aiven_rs |
lib.rs | aiven_rs |
version | 0.4.1 |
source | src |
created_at | 2020-04-17 19:02:34.814956 |
updated_at | 2021-01-11 03:25:37.670854 |
description | This is a rust sdk to interact with aiven-cloud apis. |
homepage | https://github.com/ansrivas/aiven-rs |
repository | https://github.com/ansrivas/aiven-rs |
max_upload_size | |
id | 231278 |
size | 484,687 |
// tokio = "1.0"
// aiven_rs = "0.4.0"
use aiven_rs::{cloud::types::ResClouds, AivenClient};
#[tokio::main]
async fn main() {
env_logger::init();
// use std::env;
//
// let token = env::var("AIVEN_TOKEN").expect("Please set env variable to read AIVEN_TOKEN");
// let client = AivenClient::from_token("https://api.aiven.io", "v1", &token);
let client = AivenClient::new("https://api.aiven.io", "v1");
let cloud_api = client.cloud();
let output: ResClouds = cloud_api.list_all().await.unwrap();
for cloud in &output.clouds {
println!("{:?}", cloud.cloud_name);
}
}
RUST_LOG=aiven_rs=debug cargo run --example clouds
This project is licensed under