ahgora_api 0.1.7 copy "ahgora_api: ^0.1.7" to clipboard
ahgora_api: ^0.1.7 copied to clipboard

outdated

Unofficial Dart API for Ahgora.

Ahgora API #

Unofficial Dart API for Ahgora.

About #

This is a Dart (Flutter compatible) project.

Usage #

To use this library, add ahgora_api as a dependency in your pubspec.yaml file.

Example #

import 'package:ahgora_api/ahgora_api.dart';

Ahgora ahgora;

void main() {
  ahgora = Ahgora();
  ahgora.login('COMPANY_ID', 9999, 'USER_PASSWORD')
        .then(_loginCallback);
}

void _loginCallback() {
  if (result) {
    print('Login succeeded!');
    ahgora
      .getMonthlyReport(DateTime.now(), fiscalMonth: false)
      .then(_monthlyReportCallback);
  } else {
    print('Login failed!');
  }
}

void _monthlyReportCallback(MonthlyReport report) {
  print('Employee name: ${report.employee.name}');
  print('First day from this month: ${report.days.first.reference}');
}
2
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Unofficial Dart API for Ahgora.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http, intl, json_annotation

More

Packages that depend on ahgora_api