Seperate library from project
- Move OWM library crate to a seperate repo - https://git.candifloss.cc/candifloss/OpenWeatherMapSDK.git
This commit is contained in:
parent
e66bf8b2e9
commit
e8a2707987
@ -1,6 +1,6 @@
|
||||
[workspace]
|
||||
resolver = "3"
|
||||
members = [
|
||||
"owm_api25", "owm_widg_config", "weatherd",
|
||||
"owm_widg_config", "weatherd",
|
||||
"widget",
|
||||
]
|
||||
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
owm_api25 = { path = "../owm_api25" }
|
||||
owm-rs = { git = "https://git.candifloss.cc/candifloss/OpenWeatherMapSDK.git" }
|
||||
serde = { version = "1.0.225", features = ["derive"] }
|
||||
toml = "0.9.7"
|
||||
dirs = "6.0.0"
|
@ -1,4 +1,4 @@
|
||||
use owm_api25::query::{QueryParams, Units};
|
||||
use owm_rs::free_api_v25::query::{QueryParams, Units};
|
||||
use serde::Deserialize;
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
|
@ -9,5 +9,5 @@ toml = "0.9.7"
|
||||
dirs = "6.0.0"
|
||||
serde = { version = "1.0.225", features = ["derive"] }
|
||||
serde_json = "1.0.145"
|
||||
owm_api25 = { path = "../owm_api25" }
|
||||
owm_widg_config = { path = "../owm_widg_config" }
|
||||
owm-rs = { git = "https://git.candifloss.cc/candifloss/OpenWeatherMapSDK.git" }
|
@ -1,4 +1,4 @@
|
||||
use owm_api25::current::WeatherResponse;
|
||||
use owm_rs::free_api_v25::{current::WeatherResponse, query::QueryParams};
|
||||
use owm_widg_config::config::Config;
|
||||
use reqwest::blocking;
|
||||
use std::error::Error;
|
||||
@ -31,7 +31,7 @@ fn fetch_and_cache() -> Result<(), Box<dyn Error>> {
|
||||
|
||||
match cfg.general.api_version.as_str() {
|
||||
"free_2.5" => {
|
||||
let query = owm_api25::query::QueryParams::from(cfg.query_params);
|
||||
let query = QueryParams::from(cfg.query_params);
|
||||
|
||||
let url = query.weather_url()?;
|
||||
let resp = blocking::get(&url)?.json::<WeatherResponse>()?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user