tmf-client 0.1.13

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

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

fn main() -> Result<(), TMFError> {
    #[cfg(feature = "blocking")]
    {
        use tmflib::{HasId, HasName};
        let mut client = TMFClient::new("https://localhost", None);

        let individuals = client.tmf632().individual().list(None)?;

        for i in individuals {
            println!(
                "Name: {} Id: {}, Gender: {}",
                i.get_name(),
                i.get_id(),
                i.gender.unwrap_or("Gender not set".to_string())
            );
        }
    }

    Ok(())
}