Small node backend to handle LaMetric Time triggered requests to toggl.com
Important note: This app is no longer hosted and available on LaMetric. If you want to use it you need to host it yourself unfortunately.
Delivers information about the API status and version.
Request:
curl /api/v1
Response:
{
"meta": {
"name": "lametric-time-toggl",
"version": "1.0.0",
"repository": {
"type": "git",
"url": "git+https://github.com/maxsommer/lametric-time-toggl.git"
}
}
}
If no timer is running the 'stop' icon with text '--:--' will be displayed.
Otherwise icon 'play' with the text of hours and minutes of current timer will be displayed (e.g. '02:15').
curl /api/v1/current?api_token=XXX_YOUR_TOKEN_XXX
Running timer response:
{
"frames": [
{
"text": "02:13",
"icon": "38671"
}
]
}
Stopped timer response:
{
"frames": [
{
"text": "--:--",
"icon": "38674"
}
]
}
If no timer for current user is active will start a new one. Otherwise will stop the running timer.
Request:
curl /api/v1/toggle?api_token=XXX_YOUR_TOKEN_XXX
Response for started entry:
{
"meta": {
"message": "Started entry."
}
}
Response for stopped entry:
{
"meta": {
"message": "Stopped entry."
}
}