Initiate library
- Create `Cargo.toml` - Create basic library structure - Initiate basic modules - Edit README
This commit is contained in:
parent
2519c0d0fc
commit
e56d43b9e7
5
.gitignore
vendored
5
.gitignore
vendored
@ -20,3 +20,8 @@ Cargo.lock
|
|||||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
# 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.
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
#.idea/
|
#.idea/
|
||||||
|
|
||||||
|
|
||||||
|
# Added by cargo
|
||||||
|
|
||||||
|
/target
|
||||||
|
18
Cargo.toml
Normal file
18
Cargo.toml
Normal 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"] }
|
@ -2,3 +2,7 @@
|
|||||||
|
|
||||||
A light-weight Rust SDK for the OpenWeatherMap APIs.
|
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.
|
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...
|
1
src/free_api_v25/current.rs
Normal file
1
src/free_api_v25/current.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
// WIP
|
1
src/free_api_v25/forecast.rs
Normal file
1
src/free_api_v25/forecast.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
// WIP
|
25
src/free_api_v25/mod.rs
Normal file
25
src/free_api_v25/mod.rs
Normal 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::*;
|
||||||
|
*/
|
1
src/free_api_v25/query.rs
Normal file
1
src/free_api_v25/query.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
// WIP
|
12
src/lib.rs
Normal file
12
src/lib.rs
Normal 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
|
3
src/onecall_api_v30/mod.rs
Normal file
3
src/onecall_api_v30/mod.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
//! `OpenWeatherMap` One Call API v3.0
|
||||||
|
//!
|
||||||
|
//! Work In Progress!
|
Loading…
x
Reference in New Issue
Block a user