Skip to content

ProductHuntPostData

Interface for Product Hunt API response data.

Definition

tsx
interface ProductHuntPostData {
  name: string
  tagline: string
  description: string
  votes_count: number
  comments_count: number
  featured_at: string | null
  website: string
  url: string
}

Properties

PropertyTypeDescription
namestringProduct name
taglinestringProduct tagline
descriptionstringFull description
votes_countnumberUpvote count
comments_countnumberComment count
featured_atstring | nullFeatured date
websitestringProduct website URL
urlstringProduct Hunt URL

Usage

tsx
import { fetchProductHuntPost } from '@manningworks/projex'
import type { ProductHuntPostData } from '@manningworks/projex'

const data: ProductHuntPostData | null = await fetchProductHuntPost('my-product')

if (data) {
  console.log(data.votes_count)
  console.log(data.comments_count)
}

Export

tsx
import type { ProductHuntPostData } from '@manningworks/projex'

Authentication

Requires PRODUCT_HUNT_TOKEN environment variable.