1.0.1 • Published 5 years ago

gdeposylka-api v1.0.1

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

gdeposylka-api

Small pacakge to work with gdeposylka.ru trackging api.

npm ##Features

  • Send requests to tracking api
  • Find all needed info with one method

Installing

Using npm:

npm install gdeposylka-api

##Example

const Gdeposylka = require('gdeposylka-api');

// Init tracking class first
const trackingApi = new Gdeposylka('API_KEY');

//List slugs
trackingApi.getCouriers().then(console.log);

//Find slug by tracking number
trackingApi.getSlug('TRACKING_NUMBER').then(console.log);

//Find tracking info by tracking number and slug
trackingApi.getSlug('TRACKING_NUMBER', 'SLUG_ID').then(console.log);

//Find all info about tracking number but firstly finds correct slug
trackingApi.getSlugAndInfo('TRACKING_NUMBER').then(console.log);