@flexfactory/service-client
v1.2.6
Published
A client library to call the hotelflex services
Downloads
57
Readme
service-client
Install
npm i --save @flexfactory/service-client
Usage
const ServiceClient = require('@flexfactory/service-client');
const client = new ServiceClient({
environment: config.env,
token: config.serviceToken,
local: true //indicates whether client is on the same network (e.g inside cluster or localhost)
});
const accounts = await client.Auth.accounts.getAll({
query: {
name: { like: '*turnbull' },
},
});
const campaign = await client.Booking.campaigns.create({
body: {
name: 'my new campaign',
...
},
headers: {
hotelId: 'xxxxxxx',
},
});