@divante-adventure/adventure-api-client
v2.0.1
Published
Library for connect to Adventure backend
Downloads
113
Readme
Adventure Rest Client
Install library to your project
npm i @divante-adventure/adventure-api-client
Add library to your code
var client = require('@divante-adventure/adventure-api-client').AdventureClient;
Configure client object
client({url: "http://tajnyprojekt2.test.divante.pl", port: 49152, subdir: 'api'})
Used methods
client.employee.get() // return all employees as Promise object
client.project.get() // return all project as Promise object
client.employeeProject.get // return all assignes projects to employees as Promise object
client.employeeProject.assign({employeeId: 1, projectId: 1}) // assign employee to project. Return promise object
client.employeeProject.unassign(id); // delete assign. Return promise object
client.occupancy.getByStartAndEndTimestamp(startTimestamp, endTimestamp) /// get occupancy by parameters. Return promise object
client.occupancy.add({}) // Add ocupancy. Return promise object
client.occupancy.update(id, {}) // Update occupancy by id. Return promise object
client.occupancy.delete(id) // Delete occupancy by id. Return promise object