open_meteo 1.0.1 copy "open_meteo: ^1.0.1" to clipboard
open_meteo: ^1.0.1 copied to clipboard

A simple, fast, asynchronous Dart/Flutter SDK package for Open-Meteo API.

Open-Meteo API SDK (Rewritten) #

A simple, fast, asynchronous Dart/Flutter SDK package for Open-Meteo API.

All features from Open-Meteo API are available with fully (some limited) implementation.

Caution

This SDK simplified hourly and daily values in across all 7 features that needed it into 2 enum files. Remember to read the docs carefully before using it.

Note

All parameters are shipped from the official Open-Meteo's docs.

Usage & Docs #

Note

There're 9 classes represent 9 features available in Open-Meteo API: Weather, Historical, Ensemble, Climate, Marine, AirQuality, Geocoding, Elevation and Flood.

Out of all classes, there're 7 classes that requires either daily or hourly parameter, they will all have a similar style of implementation. For example, this is how to get current temperature from London, 2 meters above sea level using Weather:

var weather = Weather(latitude: 52.52, longitude: 13.41);
var hourly = [Hourly.temperature_2m];
var result = await weather.raw_request(hourly: hourly);

Tip

raw_request will return a JSON, which is the result if nothing is wrong.

Only two exceptions are Geocoding and Elevation:

var result = await Geocoding.search(name: "Somewhere");
var result = await Elevation.search(latitudes: [52.52], longitudes: [13.41]);

Bugs & Pull requests #

Before issuing a problem you encounter, please make sure that you're calling to the right API with the correct arguments.

All pull requests are welcome!

13
likes
0
points
185
downloads

Publisher

verified publisherneurs.space

Weekly Downloads

A simple, fast, asynchronous Dart/Flutter SDK package for Open-Meteo API.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on open_meteo