Skip to content

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

Package listing

@kentcdodds/producthunt

src/get-collection.ts

13 lines · 525 B · TypeScript
import { getCollection } from './domain.ts'
import type { ProductHuntGetCollectionOptions } from './types.ts'

/**
 * Look up a published Product Hunt collection by id or slug.
 * @example
 * import getCollection from 'kody:@kentcdodds/producthunt/get-collection'
 * const collection = await getCollection({ slug: 'ai-tools' })
 * // => { id: '...', name: '...', followersCount: 1200 }
 */
export default async function getCollectionEntrypoint(params: ProductHuntGetCollectionOptions) {
	return await getCollection(params)
}