Node.js module that interfaces with Greek courier companies.
Using npm
npm install courier-api
Using yarn
yarn add courier-api
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!