pihole_api 0.1.3 copy "pihole_api: ^0.1.3" to clipboard
pihole_api: ^0.1.3 copied to clipboard

outdated

A Flutter library for the Pi-hole API.

Pi-hole API #

codecov License

A Flutter library for the Pi-hole API.

Used in the FlutterHole app.

Example #

Use it:

final dio = Dio();
final pihole = PiholeRepositoryDio(PiholeRepositoryParams(
  dio: dio,
  baseUrl: "http://pi.hole",
  apiPath: "/admin/api.php",
  apiPort: 80,
  apiTokenRequired: true,
  apiToken: "API_TOKEN",
  allowSelfSignedCertificates: false,
  adminHome: "/admin",
));
pihole.fetchSummary(CancelToken()).then((summary) => print(summary.toString()));

Development #

Build it:

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