PiholeApi class abstract

Provides Pi-hole API endpoints.

The endpoints are based on the AdminLTE API.

Implementers

Constructors

PiholeApi()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

disable(CancelToken cancelToken) Future<PiholeStatus>
Disables the Pi-hole.
enable(CancelToken cancelToken) Future<PiholeStatus>
Enables the Pi-hole.
fetchClientActivityOverTime(CancelToken cancelToken) Future<PiClientActivityOverTime>
The data is scraped from the admin page, since no known endpoint is available.
fetchForwardDestinations(CancelToken cancelToken) Future<PiForwardDestinations>
Retrieves forwarded DNS servers.
fetchPiDetails(CancelToken cancelToken) Future<PiDetails>
Retrieves client activity over time and memory usage.
fetchQueriesOverTime(CancelToken cancelToken) Future<PiQueriesOverTime>
Retrieves queries over time.
fetchQueryItems(CancelToken cancelToken, int maxResults) Future<List<QueryItem>>
Retrieves DNS queries.
fetchQueryTypes(CancelToken cancelToken) Future<PiQueryTypes>
Retrieves query types.
fetchSummary(CancelToken cancelToken) Future<PiSummary>
Retrieves summary information.
fetchTopItems(CancelToken cancelToken) Future<TopItems>
Retrieves the top queries and top ads.
fetchVersions(CancelToken cancelToken) Future<PiVersions>
Retrieves API versions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ping(CancelToken cancelToken) Future<PiholeStatus>
Retrieves the Pi-hole status.
sleep(Duration duration, CancelToken cancelToken) Future<PiholeStatus>
Disables the Pi-hole for a specified duration.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

supportedVersions → const List<String>
AdminLTE API versions that have been manually tested against.