rustana

Crates.iorustana
lib.rsrustana
version0.0.2
sourcesrc
created_at2019-05-21 12:17:23.103791
updated_at2019-05-21 12:40:08.58598
description
homepagehttps://github.com/telia-oss/rustana
repositoryhttps://github.com/telia-oss/rustana
max_upload_size
id135814
size10,913
Mohamad Al moualem (mhd999)

documentation

README

Rustana is a client for Grafana

Installation

Rustana is no available on crates.io ye. To use Rustana in your Rust program built with Cargo, add it as a dependency.

[dependencies]
rustana = { git = "https://github.com/telia-oss/rustana.git", tag = "0.0.1" }

Usage

Rustana containing Rust types for Grafana's API.

use rustana::GrafanaClient;

let mut client = GrafanaClient::new(&url, &token);

fn main() {
    let dashboard_id = "FT5SF";
    match client.get_dashboard_by_id(&dashboard_id) {
        Ok(dashboard) => println!("Dashboard response: {:?}", dashboard),
        Err(e) => println!("error fetching dashboard: {:?}", e),
    }

}

Commit count: 15

cargo fmt