pihole_api 0.1.3 pihole_api: ^0.1.3 copied to clipboard
A Flutter library for the Pi-hole API.
Pi-hole API #
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