1.0.8 • Published 6 years ago
@typischtouristik/midoffice-api v1.0.8
Install
The preferred way to install the Midoffice.io-API for Node.js is to use the npm package manager for Node.js. Simply type the following into a terminal window:
npm install @typischtouristik/midoffice-api --save
Usage
Initialize with your credentials:
var api = require('@typischtouristik/midoffice-api')({
url: 'https://app.midoffice.io',
auth: {
key: 'your-key-provided-by-midoffice-io',
secret: 'your-secret-provided-by-midoffice-io'
}
});
Do request to a specific endpoint:
api.request('/api/travels/' + travelsId).then(function (data) {
// do sth. with your data
});