angelodlfrtr / open-meteo-rs Goto Github PK
View Code? Open in Web Editor NEWRust API client for https://open-meteo.com/
License: MIT License
Rust API client for https://open-meteo.com/
License: MIT License
Support to geo primitives like geo#Point could be added, maybe under a feature.
PR #5 introduced air-quality
endpoint.
Some code is shared between the forecast
and air-quality
modules :
extract_times
, unix_time_to_naive_datetime
methods.CellSelection
, CurrentResult
, ForecastResultHourly
, ForecastResultItem
structs.Methods could be moved to an utils
module and structs to a more generic form that could be shared with forecast
and air-quality
modules.
The code is not yet tested.
Tests should be added :
TryFrom
TryInto`, ... implementations.It seems that time_zone
is sent, but timezone
is required. See docs.
This is manifesting for me as this error
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidResponseStatus { status_code: 400, text: "{\"reason\":\"Timezone is required\",\"error\":true}" }', src/main.rs:21:43
When requesting daily data with slightly modified example code:
let mut opts = open_meteo_rs::forecast::Options::default();
opts.location = open_meteo_rs::Location {
lat: 48.864716,
lng: 2.349014,
};
opts.current_weather = Some(true);
opts.daily = vec![
"temperature_2m_max".to_string(),
"temperature_2m_min".to_string(),
"precipitation_probability_max".to_string(),
"windspeed_10m_max".to_string(),
];
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.