v1_synthetics_GetMobileTest/
v1_synthetics_GetMobileTest.rs

1// Get a Mobile test returns "OK" response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
4
5#[tokio::main]
6async fn main() {
7    // there is a valid "synthetics_mobile_test" in the system
8    let synthetics_mobile_test_public_id =
9        std::env::var("SYNTHETICS_MOBILE_TEST_PUBLIC_ID").unwrap();
10    let configuration = datadog::Configuration::new();
11    let api = SyntheticsAPI::with_config(configuration);
12    let resp = api
13        .get_mobile_test(synthetics_mobile_test_public_id.clone())
14        .await;
15    if let Ok(value) = resp {
16        println!("{:#?}", value);
17    } else {
18        println!("{:#?}", resp.unwrap_err());
19    }
20}