feat: posts and snippets commands - #16
Merged
Merged
Conversation
Two endpoint families the CLI had no support for. Posts (issue #5): kit posts list [--include-content] kit posts get <id> Snippets (issue #7): kit snippets list [--snippet-type <inline|block>] [--archived] kit snippets get <id> kit snippets create <name> --type <inline|block> (--content | --html) kit snippets create and update reject --content with --html An inline snippet stores Liquid text in content. A block snippet stores HTML in document_attributes.value_html. The create command checks the pairing before sending, so a mismatch reads as a CLI error instead of a 422. Snippets have no delete endpoint, so update takes --archive and --restore instead. Post detail output prints publication_id. Posts and broadcasts that came from the same publication share it, which is how you match one to the other.
This was referenced Aug 20, 2026
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.
Part 3 of 8. Base: #15.
What this adds
Two endpoint families that the CLI did not reach at all.
Posts:
Snippets:
Design notes
An inline snippet stores Liquid text in
content. A block snippet stores HTML indocument_attributes.value_html. The create command checks the pairing before it sends. A mismatch reads as a CLI error instead of a 422.Snippets have no delete endpoint.
updatetherefore takes--archiveand--restore.Post detail output prints
publication_id. A post and a broadcast that came from the same publication share this value. It is how you match one to the other.Review notes
Issue #7 reported description changes on the three snippet endpoints. That was the signal to check coverage. The CLI had none, so this branch adds it.
Tests: 198 before, 232 after.
Closes #5
Part of #7
Part of #12
The stack
Merge from the top down. Each part builds on the one above it.
Base branch:
mainfor part 1, the previous part's branch for the rest.GitHub retargets each base to
mainas the part below it merges.