API

The Time2Emphasize App automatically generates an API-Key, which is used for connections. This is to be replaced with <customer> below.

Changing the language

The Time2Emphasize App will open in the languages detected on the device and which is supported. The language can be changed via the following links:

Export, import and reset

The Time2Emphasize App allows field-layouts (in JSON-format) and all tracking data (in CSV-format) in the dialog "export, import and reset" to be exported (create a backup) and to be imported (restore a backup). All tracking data may also be deleted (reset).

Reset all settings

The Time2Emphasize App can be reset to default by opening:

https://time2.emphasize.de?a=reset

Attention: this deletes all field-layouts and tracking data from the device!

Creating connections

Connections can created by opening the links as described below. Alternatively this can also be configured manually in the dialog available over the menu item "connections". Here you can also copy the URL for this connection to the clipboard by clicking on the first icon at the top of the list.

connections dialog

Some connections allow control of objects for the time-tracking via endpoints in the Time2Emphasize REST API.

Receiving activities for example by scanning QRCodes

https://time2.emphasize.de?m=e

By printing the page (Ctrl + P) a list of all QRCodes is printed.

In the toolbar mode qrcode a QRCode mode button appears, which will display each QRCode per field.

The "pair device" and "receive activities" connections are accessible via endpoints in the Time2Emphasize REST API.

Placing the pawn

The figure is placed on a field by sending a push request.

Taking the pawn off the board

The figure is removed from all fields by sending an off request.

Add an info

An info is entered in the timeline by sending an info request.

Pairing with another device

https://time2.emphasize.de?m=a

After opening this the dialog reachable over the menu item "connections" can be used to copy the pairing link. This should then be opened on the other device. Consider resetting the device beforehand.

Connection for a spectator

https://time2.emphasize.de?m=v

After opening this the dialog reachable over the menu item "connections" can be used to copy the pairing link and send this link to the spectator. By opening the link the spectator can view the layout and position of the pawn without being able to change either of them.

Connection to display a status badge

https://time2.emphasize.de?m=p

After opening this the dialog reachable over the menu item "connections" can be used to copy the html-code to insert into any website to share the current status publicly.

time2emphasize-badge

It is possible to add badges of several Time2Emphasize instances on the same page by adding the <script>...</script> part only once (preferrably at the end just before the closing body tag). An example showing this layout:

<!DOCTYPE html>
<html>
  <body>
    person A state:
    <a data-channel="y89h2je1vs" href="https://www.emphasize.de" title="free time-reporting tool" class="time2-badge"> Time2Emphasize <span class="time2-event">time-reporting tool</span></a>
    and person B state:
    <a data-channel="a9110wvv67" href="https://www.emphasize.de" title="free time-reporting tool" class="time2-badge"> Time2Emphasize <span class="time2-event">time-reporting tool</span></a>

    <script>...</script>
  </body>
</html>

Connecting to a storage

https://time2.emphasize.de?m=s&c=<customer>&d=<url>

Download to install a storage service: ZIP

Sources are publicly available in the following GitHub repository: time2.store

Requirements: Nginx, PHP and PDO-SQLite/-MySql available! To check this and determine the <url> open the following in your browser:

https://<url>/check_pdo.php

check_pdo.php can be deleted on your server thereafter.

The "storage" connection is accessible via an endpoint in the Time2Emphasize REST API.

Placing the pawn

The pawn is placed on a field by sending a post request with an Event object containing the values s: %CURRENT_TIMESTAMP%, n: field name, and c: field color. Example POST payload:

[{"s": %CURRENT_TIMESTAMP%, "n": "work", "c": "#4aff00"}]

Taking the pawn off the board

This is achived by sending a post request with an Event object containing just the value s: %CURRENT_TIMESTAMP%. Example POST payload:

[{"s": %CURRENT_TIMESTAMP%}]

Add an info

An info is added to the timeline by sending a post request with an Event object with the values s: %CURRENT_TIMESTAMP% and i: info text. Example POST payload:

[{"s": %CURRENT_TIMESTAMP%, "i": "some info"}]

Setting a layout

The layout is set by sending a post request with a layout object. Example POST payload:

[{"v":"2","format":"time.emphasize","r":{"s":[{"s":[{"n":"one","c":"#4aff00"},{"n":"two","c":"#ffaa11"}],"l":"h"},{"n":"three","c":"#308a11"}],"l":"v"}}]

The example sets a layout with three fields "one", "two" and "three".

Example layout

Create invoices

The menu under "Create invoices" opens the view for creating invoices. The invoices created are ZUGFeRD (PDF with XML attachment) compatible and can be validated here, for example.

The view can also be used without time recording - but if both are used, the items on the invoice can automatically come from the recorded time!

Invoices bar below

In the lower area there is a bar that always shows the most important entries and symbols that can be used to open further input pages. This bar may be scrollable vertically if the display area is not wide enough:

Invoice bar may be scrollable

If you click on the "GENERATE INVOICE" button, a dialog opens in which important entries are described if they are missing. One of the relevant input pages opens, in which the corresponding input field is then outlined in red. If all the information is present, the PDF is generated, displayed and can be sent or saved immediately.

Correct missing, important entries

The input pages can also be opened using the symbols on the far right of the bar.

Open input page for seller

The layout of the main area and the footer can be opened and edited using the last symbol. In addition to direct editing, finer changes can also be made in the source code.

Edit layout code

If the layout is no longer correct, you can restore the initial status using the "Reset" button below the input field.

Reset layout code

The input data for generated invoices is only saved in the browser or on the device and can be reloaded by selecting it in the "Invoice number" input field. A ⚠️ symbol will then appear in it, warning that the invoice number already exists. If you click on the ⚠️ symbol, a previously unused invoice number is automatically generated.

All data for customers already used in the "Recipient" input page can be quickly set by selecting in the "Name" field.

The language set also affects the initial status. The language can therefore also be changed for the "Create invoices" view, sample values ​​and layout templates using the following links: