Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kentcdodds/producthunt

src/list-topics.ts

15 lines · 662 B · TypeScript
import { listTopics } from './domain.ts'
import type { ProductHuntListTopicsOptions } from './types.ts'

/**
 * List Product Hunt topics, optionally filtered by search query.
 * @param params.query - Topic name search.
 * @param params.order - `FOLLOWERS_COUNT` (default) or `NEWEST`.
 * @example
 * import listTopics from 'kody:@kentcdodds/producthunt/list-topics'
 * const page = await listTopics({ query: 'developer', first: 5 })
 * // => { nodes: [{ name: 'Developer Tools', slug: 'developer-tools' }], pageInfo: { ... } }
 */
export default async function listTopicsEntrypoint(params: ProductHuntListTopicsOptions = {}) {
	return await listTopics(params)
}