wizmo-node-sdk
v0.0.2
Published
Node SDK for the Wizmo Online Shipping API with TypeScript typings.
Downloads
59
Maintainers
Readme
Wizmo Node SDK
Simple package to make calls to the Wizmo Online Shipping API with TypeScript typings.
Installation
npm install wizmo-node-sdkUsage
import Wizmo from 'wizmo-node-sdk';
const client = Wizmo({ username: 'x', password: 'y' });
const response = await client.getTracking({ tracknbr: '123' });
if ('error' in response) {
console.error(response.error.description);
} else {
console.log(response);
}You need an account at https://portal.shipwizmo.com/ to obtain credentials.
Pass debug: true in the options to log each outgoing request payload.
Notes
The xsd/ folder contains the original .xsd files, used by modelina to generate the types in src/generated. Some .xsd files were missing or wrong, so some adjustments were made.
For the most part Wizmo's JSON examples work with the types generated from the .xsd files.
