Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add kit domain layer with feed and search ops#1

Open
tamnd wants to merge 1 commit into
mainfrom
feat/kit-domain
Open

Add kit domain layer with feed and search ops#1
tamnd wants to merge 1 commit into
mainfrom
feat/kit-domain

Conversation

@tamnd

@tamnd tamnd commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Registers substack as a kit Domain (blank-import driver) so any-cli hosts can compose it
  • Adds feed <publication> op that lists recent posts via the existing per-newsletter API
  • Adds search <query> op that searches Substack publications via the public search API
  • Adds Host constant, Publication record type, searchResp wire type, and Search method
  • newClient factory applies kit.Config overrides to DefaultConfig

Test plan

  • go test ./substack/... passes (14 tests, all green including 8 new domain tests)
  • Domain info test verifies scheme/host/binary identity
  • Host wiring test verifies kit.Open succeeds after init registration
  • Feed tests verify JSON parsing, date truncation, URL routing, limit query param, User-Agent header
  • Search tests verify publication parsing, limit, query encoding, empty results

Register substack as a kit Domain so any-cli hosts can drive it with a
blank import. Two ops: feed <publication> lists recent posts via the
existing per-newsletter API, search <query> hits the Substack search API
and returns Publication records. Add Host constant, Publication/searchResp
types, Search method, newClient factory, and eight offline tests.
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