nea-rs 0.1.1

A type-safe, sans-IO Rust client for Singapore NEA real-time weather and environmental APIs.
Documentation
1
2
3
4
5
6
7
8
9
//! Shared helpers for NEA realtime API examples.

pub fn api_from_env() -> nea_rs::Api {
    let mut api = nea_rs::Api::new();
    if let Ok(key) = std::env::var("X_API_KEY") {
        api = api.x_api_key(key);
    }
    api
}