Skip to content

Small node backend to handle LaMetric Time triggered requests to toggl.com

License

Notifications You must be signed in to change notification settings

maxsommer/lametric-time-toggl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lametric-time-toggl

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.

Getting started

  1. Go to 'Profile Settings' on toggl.com
  2. Find your 'API Token' on that page and copy it
  3. Open up the smartphone LaMetric Time app and search for 'toggl.com (unofficial)'
  4. Install the app.
  5. Select the app and enter your API Token there to get started tracking your time.

REST API

API information

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"
    }
  }
}

Get display for current timer

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"
    }
  ]
}

Toggle timer

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."
  }
}

About

Small node backend to handle LaMetric Time triggered requests to toggl.com

Topics

Resources

License

Stars

Watchers

Forks