rki_corona_api 2.0.0 copy "rki_corona_api: ^2.0.0" to clipboard
rki_corona_api: ^2.0.0 copied to clipboard

Unoffical Api for the RKI. Uses the rki-covid-api from marlon 360 to get information.

example/rki_corona_api_example.dart

import 'package:rki_corona_api/rki_corona_api.dart';

void main() async {
  _getCases();
  _getStates();
  _getDistricts();
}

void _getCases() async {
  var statsGermany = await RKICovidAPI.getCases();
  print('stats: ${statsGermany.deaths}');
}

void _getStates() async {
  var statsGermany = await RKICovidAPI.getStates();
  for (var state in statsGermany.states!) {
    print(
        '${state.name}: cases: ${state.count} deaths: ${state.deaths} Cases per 100k: ${state.casesPer100K}');
  }
}

void _getDistricts() async {
  var statsGermany = await RKICovidAPI.getDisctricts();
  for (var district in statsGermany.districts!) {
    print(
        '${district.name}: cases: ${district.count} deaths: ${district.deaths} Cases per 100k: ${district.casesPer100K}');
  }
}
2
likes
120
pub points
0%
popularity

Publisher

unverified uploader

Unoffical Api for the RKI. Uses the rki-covid-api from marlon 360 to get information.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http

More

Packages that depend on rki_corona_api