Seperate library from project

- Move OWM library crate to a seperate repo
- https://git.candifloss.cc/candifloss/OpenWeatherMapSDK.git
This commit is contained in:
Candifloss 2025-10-10 11:46:39 +05:30
parent e66bf8b2e9
commit e8a2707987
5 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
[workspace]
resolver = "3"
members = [
"owm_api25", "owm_widg_config", "weatherd",
"owm_widg_config", "weatherd",
"widget",
]

View File

@ -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"

View File

@ -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)]

View File

@ -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_widg_config = { path = "../owm_widg_config" }
owm-rs = { git = "https://git.candifloss.cc/candifloss/OpenWeatherMapSDK.git" }

View File

@ -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>()?;