ComradeTurtle / courier-api

Node.js module that interfaces with Greek courier companies.
Apache License 2.0
12 stars 1 forks source link

courier-api

Node.js module that interfaces with Greek courier companies.

Current supported couriers

Install

Using npm

Using yarn

Usage example

const DHL = new (require("courier-api").DHL);
// or
const {DHL} = require("courier-api");
// It's the same for the other supported couriers

const courier = new DHL();
courier.get("TRACK_ID").then((response) => {
    /* your code here */
}).catch(console.error);
// or
(async () => {
    const data = await courier.get("TRACK_ID");
    /* your code here */
})();

// same goes for the other couriers!