iOS Shortcuts
With the Shortcuts app on your iPhone you start, switch and stop the timer with Siri, from the home screen or automatically with an NFC tag. Shortcuts are included in every plan.
- Under Settings, Shortcuts and tap links, add a device for shortcuts. The device page then shows every step with all values to copy, with token and project already filled in.
- Open the Shortcuts app, tap "+" in the top right corner and add the action "Get Contents of URL".
- Set the URL from the values below, tap the arrow next to it and set the method to POST.
- Under "Headers", tap "Add new header": key
Authorization, valueBearerand your token. - Set "Request Body" to JSON, tap "Add new field", choose "Text", key
projectand your project as the value (code, alias or ID). - Name the shortcut "Toggle timer", then "Hey Siri, toggle timer" is enough. Via Share, "Add to Home Screen" it sits on your home screen as an icon.
Values for "Toggle timer" (if the project is running, the timer stops, otherwise it starts):
URL: https://api.horaka.com/v1/track/toggle
Method: POST
Header: Authorization: Bearer YOUR_TOKEN
Request Body: JSON, field project (Text) = PROJECT
For "Switch project" use /track/switch, for "Start timer" /track/start, for "Stop timer" /track/stop without a field.
Values for "How many hours today": the same action with method GET, followed by the action "Speak Text". Siri then reads out how much you have tracked today and what is running.
URL: https://api.horaka.com/v1/track/status?format=text
Method: GET
Header: Authorization: Bearer YOUR_TOKEN
With an NFC tag instead of Siri: in Shortcuts open the tab "Automation", tap "+", choose "NFC", scan the tag, choose "Run Immediately" and as the action "Run Shortcut" with your shortcut. NFC automations need an iPhone XS or later; any tag works (for example NTAG213), it does not need to be written.
There are no ready-made shortcut files to tap: since iOS 15 Apple only opens files that were signed on a Mac or shared through iCloud. The steps take about two minutes per shortcut.