← Public packages
@kentcdodds/producthunt
Read Product Hunt posts, hunters, and topics through the saved Product Hunt OAuth integration.
README.md
41 lines · 1.7 KB · Markdown@kentcdodds/producthunt
Intent
Give Kody agents a reusable Product Hunt helpers surface: one generic GraphQL
request util plus common read helpers for posts, hunters, topics, collections,
and comments. The saved producthunt OAuth integration is credentials only;
this package is how agents should call Product Hunt.
What it does
- List featured or filtered hunts; look up a post, hunter, topic, or collection
- Read comments on a post
- Return the connected hunter (
viewer.user) when private scope is granted - Call any Product Hunt GraphQL operation (including mutations) through
request - Verify the saved OAuth integration with a read-only smoke test
Read helpers only for the common paths. Page sizes are clamped to 1–20 to match
the Product Hunt API. Use request for uncommon queries or mutations.
Prerequisites / setup
- Create a Confidential Product Hunt OAuth app at api.producthunt.com/v2/oauth/applications.
- Redirect URI:
https://kody.codes/connect/oauth(or your Kody origin plus/connect/oauth). - Connect with
publicandprivatescopes (use theguideexport for the connect URL). Saved OAuth integration name:producthunt. - Approve host:
api.producthunt.com. - Agents: see
AGENTS.mdfor import paths, smoke, and edge cases.
Public scope is enough for featured posts. Private scope is required for
viewer.user. Write mutations need Product Hunt app approval and the write
scope.
Done when
- The
producthuntOAuth integration is connected (public+private) - Host
api.producthunt.comis approved - Smoke test returns
{ ok: true }with viewer + a featured post sample