neursh / open-meteo-dart

A simple, fast, asynchronous Dart/Flutter client package for Open-Meteo weather APIs.
https://pub.dev/packages/open_meteo
MIT License
4 stars 3 forks source link

No 15 minutes forecast #15

Closed orl0pl closed 1 week ago

orl0pl commented 1 week ago

I can't access minutely_15 from response of request method in WeatherApi class.

neursh commented 1 week ago

I'm currently working on this feature, it needs some tuning here and there, I'll release it soon.

neursh commented 1 week ago

Okay, it should be available in 2.0.2-dev.1:

dependencies:
  open_meteo: ^2.0.2-dev.1

Example:

import 'package:open_meteo/open_meteo.dart';

void main() async {
  final weather = WeatherApi();
  final response = await weather.request(
      latitude: 52.52,
      longitude: 13.41,
      minutely15: {WeatherMinutely15.temperature_2m});
  final data = response.minutely15Data[WeatherMinutely15.temperature_2m]!;
  final minutely15Temperature = data.values;

  print(minutely15Temperature);
}

Feel free to reopen this issue if you have any problem while using it!