Wakatime Api

This package just wraps wakatime api and provides a simple interface to use it.

Get started

Before starting, generate the *.freezed.dart and the *.g.dart classes by running

flutter pub run build_runner build --delete-conflicting-outputs

then instantiate the WakatimeApi singleton with your api key

final wakatime = WakatimeApi('your-api-key');

then you can request the heartbeats for a given date just by using

Wakatime().getHeartbeats(DateTime.now())
// Or
Wakatime().getHeartBeatsForRange(
    DateTime(1970, 1, 1),
    DateTime.now(),
)