node-webservice
Webservice helper for api requests
Installation
Install via npm:
$ npm install node-webservice
Documentation
SOAP
Usage
const Webservice = SOAP; const webservice = options<Object>; webservice Promise;
Constructor
options
object will be pass as argument for Service
constructor
execute
Service
: see below for explainationparams
: object will be pass as argument forService
methodbuildRequest
(requireservice
key containing client path in soap object)
HTTP
Usage
const Webservice = HTTP; const webservice = options<Object>; webservice Promise;
Constructor
options
object will be pass as argument for Service
constructor
execute
Service
: see below for explainationparams
: object will be pass as argument forService
methodbuildRequest
Service Class
First argument for webservice execute
function
Skeleton
/** * Initialize the operation * * @param */ { // do your stuff } /** * Build the JSON request * * @param * @return {Promise/undefined} */ { // do your stuff } /** * Get the JSON request * * @return */ { // do your stuff } /** * Parse webservice response * * @param * @param * @return {???} your parse response */ { // do your stuff } /** * Parse webservice error * * @param * @return {???} your parse error */ { // do your stuff } /** * Return service URL * * @return */ { return 'https://google.com'; }
Examples
See examples
Contributing
This project is a work in progress and subject to API changes, please feel free to contribute