sweettracker
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

SweetTracker(스윗트래커) SDK

📦 - Unofficial sweettracker SDK for Node.js

SweetTracker SDK for Asynchronous Node.js. You can easily search for delivery information.

Table of Contents

How does it work?


Use Sweet Tracker API to track shipment status. if you do not have an API KEY, click here to register as a member.

Install


Use NPM

$ npm install sweettracker

Or Yarn

$ yarn add sweettracker

Usage


Create SweetTracker Client

import SweetTracker from 'sweettracker';

const tracker = new SweetTracker('{ WRITE YOUR SWEET TRACKER API KEY }');

Get Companies

import SweetTracker from 'sweettracker';

const tracker = new SweetTracker('{ WRITE YOUR SWEET TRACKER API KEY }');
const companies = await tracker.getCompanies().then(console.log);

If no error occurs, the following response will come.

[
  { "id": "04", "name": "CJ대한통운" },
  { "id": "05", "name": "한진택배" },
  { "id": "08", "name": "롯데택배" },
  ...
]

Get Recommended Companies

import SweetTracker from 'sweettracker';

const tracker = new SweetTracker('{ WRITE YOUR SWEET TRACKER API KEY }');
const companies = await tracker
  .getRecommendedCompanies('{ WRITE YOUR TRACKING NUMBER }')
  .then(console.log);

If no error occurs, the following response will come.

[
  { "id": "04", "name": "CJ대한통운" },
  { "id": "05", "name": "한진택배" },
  { "id": "08", "name": "롯데택배" },
  ...
]

Get Tracking Information

import SweetTracker from 'sweettracker';

const tracker = new SweetTracker('{ WRITE YOUR SWEET TRACKER API KEY }');
const companies = await tracker
  .getTracking('{ WRITE COMPANY ID }', '{ WRITE YOUR TRACKING NUMBER }')
  .then(console.log);

If no error occurs, the following response will come.

{
  "status": "arrived",
  "receiver": {},
  "item": {},
  "details": [
    {
      "timestamp": "2020-11-13T03:25:00.000Z",
      "kind": "Shipping Label Created, USPS Awaiting Item",
      "where": "FORT LAUDERDALE, FL 33351",
      "status": "collected",
      "phoneNumber": [],
      "courier": {}
    }
    ...
  ]
}

License

MIT

Copyright (c) 2020 Daniel Uhm.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.1214latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.1214
1.1.00
1.0.12

Package Sidebar

Install

npm i sweettracker

Weekly Downloads

216

Version

1.1.1

License

MIT

Unpacked Size

20.3 kB

Total Files

15

Last publish

Collaborators

  • danieluhm2004