2.0.0 • Published 4 years ago

@pierce-h/shipengine-node v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

ShipEngine Node

Quality jest

Installation

Install the package with:

npm install @pierce-h/shipengine-node
# or
yarn add @pierce-h/shipengine-node

Usage

The package needs to be configured with an API key. You can download a sandbox API key for testing purposes or a production API key.

Using ES modules:

import { ShipEngine } from "@pierce-h/shipengine-node";

const client = new ShipEngine("TEST_...")

(async () => {
  const carriers = await client.listCarriers();

  console.log(carriers);
})();

or

const shipengine = require("@pierce-h/shipengine-node")

const client = new shipengine.ShipEngine("TEST_...")

client.listCarriers()
  .then(response => console.log(response))
  .catch(error => console.error(error));