//! Fetch latest wet-bulb globe temperature readings (`/weather?api=wbgt`).
//!
//! ```bash
//! cargo run --example weather_wbgt
//! ```

mod common;

use nea_rs::NeaWeatherSubApi;
use satay_reqwest::{ReqwestActionExt, reqwest};
use std::error::Error;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let client = reqwest::Client::new();
    let api = common::api_from_env();
    let response = api
        .weather_sub_api(NeaWeatherSubApi::WetBulbGlobeTemperature)
        .send_with(&client)
        .await?;
    println!("{response:#?}");
    Ok(())
}
