Initiate library

- Create `Cargo.toml`
- Create basic library structure
- Initiate basic modules
- Edit README
This commit is contained in:
Candifloss 2025-10-09 23:28:34 +05:30
parent 2519c0d0fc
commit e56d43b9e7
9 changed files with 70 additions and 0 deletions

5
.gitignore vendored
View File

@ -20,3 +20,8 @@ Cargo.lock
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# Added by cargo
/target

18
Cargo.toml Normal file
View File

@ -0,0 +1,18 @@
[package]
name = "owm-rs"
description = "Rust SDK for the OpenWeatherMap APIs"
version = "0.0.1"
edition = "2024"
license = "GPL-3.0-or-later"
authors = ["candifloss <candifloss.cc>"]
repository = "https://git.candifloss.cc/candifloss/OpenWeatherMapSDK.git"
readme = "README.md"
keywords = ["weather", "api", "openweathermap", "sdk"]
categories = ["api-bindings"]
[dependencies]
toml = "0.9.6"
dirs = "6.0.0"
serde = { version = "1.0.225", features = ["derive"] }
serde_json = "1.0.145"
chrono = { version = "0.4.42", features = ["serde"] }

View File

@ -2,3 +2,7 @@
A light-weight Rust SDK for the OpenWeatherMap APIs.
It provides abstractions for APIs including Free API 2.5 and One Call 3.0, enabling simple weather data integration into your apps.
## Status
Work In Progress! Not suitable for general use... yet...

View File

@ -0,0 +1 @@
// WIP

View File

@ -0,0 +1 @@
// WIP

25
src/free_api_v25/mod.rs Normal file
View File

@ -0,0 +1,25 @@
//! Free-tier `OpenWeatherMap` API v2.5
//!
//! Includes `/weather` and `/forecast` endpoints.
//! Might include other endpoints like `/history` later.
/// Current weather
///
/// For the `/weather` endpoint, which provides the current weather data.
pub mod current;
/// Weather forecast
///
/// For the `/forecast` endpoint, which provides weather forecast data.
pub mod forecast;
/// API queries
///
/// The structs, values, and methods required for API calls.
pub mod query;
/* These are commented out until later to avoid `clippy` warnings.
pub use current::*;
pub use forecast::*;
pub use query::*;
*/

View File

@ -0,0 +1 @@
// WIP

12
src/lib.rs Normal file
View File

@ -0,0 +1,12 @@
//! # `OpenWeatherMap` SDK
//! A Rust SDK for the `OpenWeatherMap` APIs.
//! It provides abstractions for APIs to enable simple weather data integration into your apps.
//!
//! ## Currently Available APIs
//! - `free_api25`: `OpenWeatherMap` Free API v2.5
//!
//! ## Coming soon
//! - `onecall_api_v30`: `OpenWeatherMap` One Call API v3.0
pub mod free_api_v25;
pub mod onecall_api_v30; // WIP

View File

@ -0,0 +1,3 @@
//! `OpenWeatherMap` One Call API v3.0
//!
//! Work In Progress!