weather_kit 0.0.6 copy "weather_kit: ^0.0.6" to clipboard
weather_kit: ^0.0.6 copied to clipboard

A dart library for interfacing with the Apple WeatherKit API.

Weather Kit #

Usage #

To use this plugin, add weather_kit as a dependency in your pubspec.yaml file.

Examples #

Here are small examples that show you how to use the API.

Generate JWT

final weatherKit = WeatherKit();
final token = weatherKit.generateJWT(
  bundleId: 'com.example',
  teamId: 'team id',
  keyId: 'key id',
  pem: 'example.p8',
  expiresIn: const Duration(hours: 1),
);

Obtain current weather

final result = await weatherKit.obtainWeatherData(
  jwt: token,
  language: 'ja',
  latitude: '35.71',
  longitude: '139.811',
  dataSets: 'currentWeather',
);

References #

https://zenn.dev/bon/articles/weatherkit-restapi https://allthecode.co/blog/post/setting-up-weatherkit-rest-api-in-node-js

15
likes
0
pub points
48%
popularity

Publisher

verified publishermafreud.dev

A dart library for interfacing with the Apple WeatherKit API.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

dart_jsonwebtoken, flutter, http

More

Packages that depend on weather_kit