weatherapi-rs 0.3.5

Small weather CLI util for weatherapi.com
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use serde::Deserialize;

#[derive(Deserialize, Debug)]
pub struct Config {
    pub api_key: String,
}

pub fn get_config() -> Config {
    let api_key =
        std::env::var("RAPIDAPI_KEY").expect("RAPIDAPI_KEY not found in environment variables");

    Config { api_key }
}