1.2.20 • Published 1 year ago
@jetpropilots/kronos-client v1.2.20
JetPro Kronos Client
HTTP client to interact with the Kronos REST API
Installation
npm install @jetpropilots/kronos-client
Configuration
Required ENV VARS
The client requires the following env variables to be set.
KRONOS_API
KRONOS_API_KEY
KRONOS_USERNAME
KRONOS_PASSWORD
KRONOS_PASSWORD
KRONOS_COMPANY
Optional ENV VARS
The client supports the following optional vars to use a proxy
PROXY_HOST
PROXY_PORT
Usage
Note: authentication is handled implicitly ( assuming the correct environment variables are set). Just call the methods you need and the client will login and refresh as needed.
const client = require('@jetpropilots/kronos-client')
async function main() {
try {
const data = await client.jobRequisitions()
console.log('data', data)
const first = data.job_requisitions[0]
const detail = await client.jobRequisition(first.id)
console.log('detail', detail)
const employees = await client.getEmployees() // get all employees ( small dtos ... do not have all fields )
console.log('employees', employees)
const dto = employees[0] // get first employee for example
console.log('dto', dto)
const employee = await client.getEmployee(dto.id) // get full employee
console.log('employee', employee)
process.exit(0)
} catch (e) {
console.error(e)
process.exit(-1)
}
}
main()
1.2.20
1 year ago
1.2.18
2 years ago
1.2.19
2 years ago
1.2.16
2 years ago
1.2.17
2 years ago
1.2.15
2 years ago
1.2.9
3 years ago
1.2.12
2 years ago
1.2.13
2 years ago
1.2.10
3 years ago
1.2.14
2 years ago
1.2.8
3 years ago
1.2.7
3 years ago
1.2.6
3 years ago
1.2.5
3 years ago
1.2.4
3 years ago
1.2.3
3 years ago
1.2.2
3 years ago
1.2.0
3 years ago
1.1.0
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.2.1
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago