Skip to main content

get_organization/
get_organization.rs

1//! Get Organization Example
2
3use tmf_client::common::tmf_error::TMFError;
4#[cfg(feature = "tmf632")]
5use tmf_client::{BlockingOperations, TMFClient};
6#[cfg(feature = "tmf632")]
7use tmflib::{HasId, HasName};
8
9fn main() -> Result<(), TMFError> {
10    #[cfg(feature = "blocking")]
11    {
12        let organizations = TMFClient::new("https://localhost", None)
13            .tmf632()
14            .organization()
15            .list(None)?;
16
17        for o in organizations {
18            println!("Name: {} , Id: {}", o.get_name(), o.get_id());
19        }
20    }
21
22    Ok(())
23}