Skip to content

feat: add Client Management and Network Information, completing both API areas - #122

Merged
mikemadeja merged 1 commit into
developfrom
feature/client-management
Sep 27, 2026
Merged

mikemadeja merged 1 commit into
developfrom
feature/client-management

Conversation

@mikemadeja

Copy link
Copy Markdown
Owner

Summary

  • Adds Get-PiHoleClient, New-PiHoleClient, Update-PiHoleClient, Remove-PiHoleClient, and Get-PiHoleClientSuggestion, covering Pi-hole's client management API. Single-item DELETE is intentionally skipped in favor of the batch endpoint, same precedent as Remove-PiHoleList/Remove-PiHoleDomain.
  • Adds Get-PiHoleNetworkGateway, Get-PiHoleNetworkRoute, Get-PiHoleNetworkInterface, Get-PiHoleNetworkDevice, and Remove-PiHoleNetworkDevice, covering the full Network Information API. Unlike Clients/Domains/Lists, there's no batch-delete alternative for devices, so Remove-PiHoleNetworkDevice implements the single-item DELETE directly.
  • Interface/route/gateway responses vary significantly by type and aren't fully enumerable from the OpenAPI spec, so they're returned via the module's existing generic PascalCase-conversion helper (already used by Get-PiHoleConfig) rather than a hand-picked set of fields. Confirmed against the real server this also correctly surfaces at least one live field not documented in the spec (interface.stats.bits).
  • Adds "Client Management" as its own README/docs/EXAMPLES.md category; Network Information folds into "Configuration & Diagnostics" like the module's other read-only diagnostic areas (FTL Information, PADD, Teleporter, History).

This completes both the "Clients" and "Network" areas from the API coverage audit (12 of 12 operations addressed: 11 implemented, 1 intentionally skipped).

Test plan

  • All behavior verified directly against the real Pi-hole server before writing tests (create, duplicate detection, get/filter, group assignment including invalid-group-name rejection, update-merge, not-found errors, batch/single remove, confirm-gone).
  • 41 new Pester integration tests across the 10 functions (23 Clients + 18 Network), all passing against the real server.
  • Confirmed server left in a clean state after every test run and after regenerating docs/EXAMPLES.md.
  • Invoke-ScriptAnalyzer clean against the full module.
  • Full non-integration Pester unit suite passes (4/4; unaffected by this change).

🤖 Generated with Claude Code

…API areas

Adds Get/New/Update/Remove-PiHoleClient and Get-PiHoleClientSuggestion,
covering Pi-hole's client management API (GET/POST/PUT + batch-delete,
plus unconfigured-client suggestions). Single-item DELETE is
intentionally skipped in favor of the batch endpoint, same precedent
as Remove-PiHoleList/Remove-PiHoleDomain.

Adds Get-PiHoleNetworkGateway/Route/Interface/Device and
Remove-PiHoleNetworkDevice, covering the full Network Information API.
Unlike Clients/Domains/Lists there's no batch-delete alternative for
devices, so Remove-PiHoleNetworkDevice implements the single-item
DELETE directly. Interface/route/gateway responses vary significantly
by type and aren't fully enumerable from the spec, so they're returned
via the existing generic PascalCase-conversion helper (already used by
Get-PiHoleConfig) rather than a hand-picked set of fields - confirmed
against the real server that this also correctly surfaces at least one
live field not documented in the OpenAPI spec (interface stats.bits).

Adds Client Management as its own README/EXAMPLES category; Network
Information folds into "Configuration & Diagnostics" like the other
read-only diagnostic areas (FTLInformation, Padd, Teleporter, History).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@mikemadeja
mikemadeja merged commit d0595ef into develop Sep 27, 2026
3 checks passed
mikemadeja added a commit that referenced this pull request Sep 28, 2026
Resolves the README.md/docs/EXAMPLES.md conflicts from merging develop
(which now includes PR #122's Client Management and Network
Information) by regenerating both from the merged source instead of
hand-resolving generated-file diffs.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@mikemadeja mikemadeja mentioned this pull request Sep 28, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant