1.0.1 • Published 5 years ago

mws-extract-document v1.0.1

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

mws-extract-document

Work around to extract Zip/PDF Document from MWS Base64-encoded string mws api response.

MWS End-Points

  • GetPackageLabels
  • GetUniquePackageLabels
  • GetPalletLabels
  • GetBillOfLading

Install

$ npm install mws-extract-document --save

Basic Usage

const mwsExtract = require('mws-extract-document');

const dist = './folder/to/document.zip';
const base64String = ''; //located at PdfDocument data response from MWS api.

// PROMISE
mwsExtract(base64String, dist)
          .then((msg)=>{
            // file saved. do something here...
            console.log(msg);
          })
          .catch(err)=>{
            console.log(err);
          });

License

MIT © Jorge Rosal