tmf-client 0.1.13

A Rust client library for TMF conformant APIs
Documentation
//! Get Organization Example

use tmf_client::common::tmf_error::TMFError;
#[cfg(feature = "tmf632")]
use tmf_client::{BlockingOperations, TMFClient};
#[cfg(feature = "tmf632")]
use tmflib::{HasId, HasName};

fn main() -> Result<(), TMFError> {
    #[cfg(feature = "blocking")]
    {
        let organizations = TMFClient::new("https://localhost", None)
            .tmf632()
            .organization()
            .list(None)?;

        for o in organizations {
            println!("Name: {} , Id: {}", o.get_name(), o.get_id());
        }
    }

    Ok(())
}