README.md in pihole-api-0.0.2 vs README.md in pihole-api-0.0.3
- old
+ new
@@ -12,13 +12,14 @@
This is an unofficial project and still a work in progress (WIP) ... more to come soon.
## TODO
- Login and Auth token generation: `admin/scripts/pi-hole/php/api_token.php`
-- Undocumented endpointsw
+- Undocumented endpoints
- Undocumented filters for getAllQueries
- Generate WebPassword Hash
+- getAllQueries allow client input
## Installation
Add this line to your application's Gemfile:
@@ -36,21 +37,22 @@
## Usage
```ruby
require 'pihole-api'
- client = PiholeApi::Client.new(base_path: 'http://localhost:80/', api_token: '', port: 80)
+ client = PiholeApi::Client.new(base_path: 'http://localhost:80/', api_token: api_token, port: 80)
# Some example calls
client.type
```
Double hash web password to get the api_token. A helper method exists on the client to do this:
```ruby
require 'pihole-api'
-PiholeApi::Client.hash_password(password)
+api_token = PiholeApi::Client.hash_password(password)
end
+```
### Endpoints
#### Authorised
- `summary_raw`
- `summary(params: {})`
@@ -58,10 +60,10 @@
- `top_items(number_of_items=10)`
- `get_query_sources(number_of_items=10)`
- `top_clients(number_of_items=10)`
- `get_forward_destinations`
- `get_query_types`
-`get_all_queries(params: {}, from_time: nil, until_time: nil, latest_number_of_items: nil)`
+- `get_all_queries(params: {}, from_time: nil, until_time: nil, latest_number_of_items: nil)`
- `recent_blocked`
- `enable`
- `disable`
#### Unauthorised