2.0.0 • Published 2 years ago
courier-api v2.0.0
courier-api
Node.js module that interfaces with Greek courier companies.
Current supported couriers
- ΕΛΤΑ Courier (website)
- ACS Courier (website)
- Γενική Ταχυδρομική (website)
- Speedex (website)
- EasyMail (website)
- DHL (website)
- SpeedPAK Standard / Economy (website)
- ..and more to come!
Install
npm i courier-api
oryarn add courier-api
Usage example
const DHL = new (require("courier-api").speedex);
// or
const {DHL} = require("courier-api");
// It's the same for the other supported couriers
DHL.get("TRACK_ID").then((response) => {
/* your code here */
}).catch(console.error);
// or
(async () => {
const data = await DHL.get("TRACK_ID");
/* your code here */
})();
// same goes for the other couriers!