0.0.9 • Published 7 years ago
alice-app v0.0.9
#Alice.js A node.js wrapper for the Alice App API.
Table of Contents
Installation
npm install alice-app
##Usage
Standard Initialization (defaults to https://rest.aliceapp.com
)
var Alice = require('alice-app');
alice = new Alice('YOUR API KEY', 'YOUR AUTHENTICATION KEY');
Standard Initialization with alternate API URL
var Alice = require('alice-app');
alice = new Alice('YOUR API KEY', 'YOUR AUTHENTICATION KEY', 'ALTERNATE API URL');
Tickets
Get
Request:
alice.tickets('get', { hotelId: 'HOTELID', ticketId: 'TICKETID' })
Create
alice.tickets('create', {
hotelId: '1',
request: {
"dueDate": "2016-11-22T22:19:37.270Z",
"info": "Bring towels",
"lang": "en",
"options": [{
"id": "222",
"value": "2020-03-03T12:30:00.000Z"
}],
"owner": 0,
"requester": "Guest",
"reservation": 0,
"roomNumber": "string",
"serviceId": "102"
}
})
Search
alice.tickets('search', { hotelId: '1', ticketTypes: 'ServiceRequest' })