node-tourico
Tourico connector for nodeJs
Last updated 2 years ago by shuhailshuvo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install node-tourico 
SYNC missed versions from official npm registry.

Tourico Connector for nodeJs.

This module lets you connect to tourico web services using WSDL.

Install

Install with npm:

  npm install node-tourico

Usages

Require node-tourico

  const tourico = require('node-tourico');

Create async client:

  tourico.createClientAsync(url, user, pass, culture, version)

Add headers:

  tourico.createClientAsync(url).then((client) => {
    const header = {
      'aut:AuthenticationHeader': {
        'aut:LoginName': user,
        'aut:Password': pass,
        'aut:Culture': culture,
        'aut:Version': version
      }
    };
    client.addSoapHeaderAsync(header);
  });

Set SOAP Action:

  client.setSOAPAction(actionUrl);

Call API:

  const inputs = {
    'hot:SearchHotelsById': {
      'hot:request': {
        'hot1:HotelIdsInfo': '<hot1:HotelIdInfo id="1234"/>',
        'hot1:CheckIn': '2019-04-25',
        'hot1:CheckOut': '2019-04-26',
        'hot1:RoomsInformation': {
          'hot1:RoomInfo': {
            'hot1:AdultNum': 1
          }
        }
      }
    }
  }
  client.SearchHotelsByIdAsync(inputs);

Current Tags

  • 1.0.3                                ...           latest (2 years ago)

4 Versions

  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (13)
Dev Dependencies (16)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |