1.1.1 • Published 5 years ago
@fitmentgroup/viper-api-js v1.1.1
viper-api-js
This is the API client for our ViperApi hosted at api.fitmentgroup.com.
- lightweight
- client-agnostic (axios and ky are supported at the moment)
- camel cases responses and pascal cases requests
- type checks arguments
- tested
Usage
import axios from 'axios' // or your own axios instance
import { getTrendBrands } from 'viper-api-js/trends'
// This errors saying yearStart and monthStart should be defined
await getTrendBrands()
const yearStart = 2019
const monthStart = 1
const brands = await getTrendBrands({ yearStart, monthStart }).axios(axios)
// Or with ky
const brands = await getTrendBrands({ yearStart, monthStart }).ky(ky)