It's simple library, which helps to work with baselinker api in js.
Add dependency to your project:
yarn add baselinker-api
# or
npm install baselinker-api
Here is an example how to use:
import { baselinkerClient, types } from 'baselinker-api'
// generate token here: https://panel.baselinker.com/other_api_token.php
const token = process.env.BL_TOKEN || '1234-56789-8JGKELWOIRJD8JWJQJB0DKEILBJLKSD3WJLKJEJIO3NC'
const options = { token }
const client = baselinkerClient(options)
// example 1:
const storages: types.Storages[] = await client.getStoragesList()
// example 2:
const orderStatusList: types.OrderStatusResponse = await client.request('getOrderStatusList')
You can read more on api.baselinker.com.
- replace deprecated 'request' module with modern one
Please open an issue for support.
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.