PiholeApiDio class
Implements the Pi-hole API using Dio
.
- Implemented types
Constructors
- PiholeApiDio({required PiholeApiParams params, Dio? dio})
Properties
- dio → Dio
-
The Dio instance.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- params → PiholeApiParams
-
The parameters.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
disable(
CancelToken cancelToken) → Future< PiholeStatus> -
Disables the Pi-hole.
override
-
enable(
CancelToken cancelToken) → Future< PiholeStatus> -
Enables the Pi-hole.
override
-
fetchClientActivityOverTime(
CancelToken cancelToken) → Future< PiClientActivityOverTime> -
The data is scraped from the admin page,
since no known endpoint is available.
override
-
fetchForwardDestinations(
CancelToken cancelToken) → Future< PiForwardDestinations> -
Retrieves forwarded DNS servers.
override
-
fetchPiDetails(
CancelToken cancelToken) → Future< PiDetails> -
Retrieves client activity over time and memory usage.
override
-
fetchQueriesOverTime(
CancelToken cancelToken) → Future< PiQueriesOverTime> -
Retrieves queries over time.
override
-
fetchQueryItems(
CancelToken cancelToken, int maxResults) → Future< List< QueryItem> > -
Retrieves DNS queries.
override
-
fetchQueryTypes(
CancelToken cancelToken) → Future< PiQueryTypes> -
Retrieves query types.
override
-
fetchSummary(
CancelToken cancelToken) → Future< PiSummary> -
Retrieves summary information.
override
-
fetchTopItems(
CancelToken cancelToken) → Future< TopItems> -
Retrieves the top queries and top ads.
override
-
fetchVersions(
CancelToken cancelToken) → Future< PiVersions> -
Retrieves API versions.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ping(
CancelToken cancelToken) → Future< PiholeStatus> -
Retrieves the Pi-hole status.
override
-
sleep(
Duration duration, CancelToken cancelToken) → Future< PiholeStatus> -
Disables the Pi-hole for a specified duration.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited