@parsew/sdk
v0.12.0
Published
TypeScript client for the Parsew icon and Open Graph image API.
Readme
@parsew/sdk
TypeScript client for the Parsew icon and Open Graph image API.
Install
pnpm add @parsew/sdkUse
import { ParsewBrands } from '@parsew/sdk/client'
const images = new ParsewBrands({ token: 'pk_...' })
const iconUrl = images.url('stripe.com', { size: 128, format: 'webp' })
const ogImageUrl = images.ogUrl('stripe.com', { format: 'webp' })Use fetch() or fetchOg() when you need the image bytes on the server:
const { data, contentType } = await images.fetchOg('stripe.com')Publishable keys can be restricted to a list of browser origins in the Parsew dashboard.
