chore: promote develop to main - #119
Merged
Merged
Conversation
Get-PiHoleList: was fully functional already (heavily exercised all
session as a dependency of Add/Remove/Update-PiHoleList), just had the WIP
flag lingering and an incomplete docstring (missing -List param docs,
.DESCRIPTION, .EXAMPLE).
Get-PiHoleLogWebserver: wasn't exported at all, had the stray break bug,
and its formatted-output branch was a literal empty stub
(`#$ObjectFinal = @()`, did nothing). Also fixed a real bug found while
rewriting it: the nextID query parameter was sent as `nextId` (wrong
case) - confirmed against the live API spec, which names it `nextID`.
Rewrote the formatted output as {Log, NextID, Pid, File}, preserving the
NextID field so incremental polling (the endpoint's whole reason for
existing) actually works from PowerShell. Exported it.
Get-PiHoleTeleporterDownload: wasn't exported, had the stray break bug, a
copy-pasted wrong .SYNOPSIS ("Get info about logs for webserver"), and
assumed the downloaded backup was a .tar.gz - the live API spec documents
the response as application/zip, confirmed by actually downloading a file
and checking its magic bytes (50 4B 03 04, a real ZIP) and opening it with
System.IO.Compression.ZipFile. Removed the RawOutput parameter, since the
API always returns a binary archive rather than JSON - there's no
alternate raw representation for it to toggle to. Exported it.
Verified all three against a real Pi-hole v6 server. Added dedicated
integration test files for the latter two (Get-PiHoleList already had
one). README regenerated to drop the WIP flag and list the two newly
exported functions.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds tools/Update-ExampleOutput.ps1, which runs every exported function against a real Pi-hole server and writes docs/EXAMPLES.md - one section per function with the exact invocation and the real captured output, grouped the same way as README.md's Command Reference. State-changing functions (groups, lists, sessions) use a throwaway resource that's cleaned up immediately after capture. Functions with real side effects on a live server (gravity rebuild, DNS restart, network/log flush, DNS blocking toggle) are skipped by default in favor of a previously captured static example, unless -IncludeDisruptive is passed. Links docs/EXAMPLES.md from README.md's table of contents and Command Reference section. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…functions fix: finish all 3 remaining in-construction functions
docs: add auto-generated real example output for every function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Get-PiHoleList,Get-PiHoleLogWebserver,Get-PiHoleTeleporterDownload) and docs: add auto-generated real example output for every function #118 (auto-generated real example output for every function,docs/EXAMPLES.md) intomain.Test plan
develop.🤖 Generated with Claude Code