Skip to main content

get_product_specification/
get_product_specification.rs

1//! Product Offering Example
2
3#[cfg(feature = "tmf620")]
4use tmf_client::{BlockingOperations, QueryOptions, TMFClient};
5#[cfg(feature = "tmf620")]
6use tmflib::{HasId, HasName};
7
8fn main() {
9    #[cfg(feature = "tmf620")]
10    {
11        let mut client = TMFClient::new("https://localhost", None);
12        let filter = QueryOptions::default()
13            //.limit(2)
14            .offset(0);
15        let tmf = client.tmf620().product_specification().list(Some(filter));
16        match tmf {
17            Ok(r) => {
18                // It worked
19                for c in r {
20                    println!("Entry: {} [{}]", c.get_name(), c.get_id())
21                }
22            }
23            Err(e) => {
24                println!("Error: {:?}", e)
25            }
26        }
27    }
28}