This is an API for the Timebutler service. It allows one to call the defined endpoints of Timebutler as described here.
This client is not production ready! (Early beta stage and subject to change)
npm i timebutlar-api-client
Provide API keys in the .env
file:
- TIMEBUTLER_API_KEY: needed for standard calls
- TIMEBUTLER_API_KEY_EXTENDED: optional, only needed for priviledged calls like salaries
In your Node project:
import { absences, createTimebutlerApiCaller } from "timebutler-api-client";
const apiKey = process.env.TIMEBUTLER_API_KEY;
const caller = createTimebutlerApiCaller(apiKey!);
const result = await absences(caller);
Directly inside a html page (download client.js
from
Releases):
<script src="client.js"></script>
<script>
const timebutler = globalThis["TimebutlerApi"];
const caller = timebutler.createTimebutlerApiCaller("a-timebutler-api-key");
const result = await timebutler.absences(caller);
</script>