0.1.2 • Published 3 years ago
@lntw/fulfil-client v0.1.2
Fulfil.io API Client
A node package for the Fulfil.io API written in Typescript.
Installation
npm i @lntw/fulfil-clientQuickstart
import { Client } from 'fulfil-client'
CLIENT = new Client('<subdomain>', '<api key>')
PRODUCT = Client.model('product.product')
const getProduct = async () => {
  try {
    const products = await PRODUCT.find({
      fields: ['id', 'code'],
      filter: [
        ['code', 'ilike', '%iphone%']
      ]
    })
  } catch (e) {
    console.error(e)
  }
}
getProduct();