Skip to content

Repository files navigation

Israel Postal Service API

An API for Israel postal service - query shipment price easily. Supports both NodeJS and browser environments.

licencenpm versionDependencies statusDocumentation



Installation

npm install --save israel-postal-service-api

Usage

Import library:

import{IPS,Options}from'israel-postal-service-api';

Define Package Characteristics:

// define package shipment characteristicsletweightInGrams=20;letserviceType=Options.AbroadMailOptions.LETTER.shipmentType;letserviceSubtype=Options.AbroadMailOptions.LETTER.shipmentSubtypes.regular;letoption=serviceSubtype.options.signed;// initialize serviceletpostalService=newIPS();

Calculate Shipping Rate:

// calculate package shipping rate asynchronouslyletresponse=awaitpostalService.calculateAbroadShippingRate("Spain",weightInGrams,serviceType,serviceSubtype,option);// see {@class ResponseParser} API to discover the response structureconsole.log(response.getTotalPrice());

Supported Environments

  • 💻 Browser (including browserify / webpack based environments [such as Angular])
  • 🖥 Node.js

Documentation

Support

If you're having any problem, please raise an issue on GitHub and we'll be happy to help.

Contribute

Before submitting a pull request, please make sure that you include tests, and that jshint runs without any warnings: Download VSCode extension.

Test

Run the test suite by executing:

$ npm test

Note: This API was create as an open source service for makers and entrepreneurs. This is not an official API for Israel Post service.

Author: Benny Megidish.

About

An API for Israel postal service

Topics

Resources

Code of conduct

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages