Artifact [a702f295c2]
Not logged in

Artifact a702f295c25f58cfbfe80f22b1035487f2aff337:

Wiki page [TODO] by MCO 2019-03-01 09:05:54.
D 2019-03-01T09:05:54.160
L TODO
N text/x-markdown
P fa706b1649e554d3d97493736bc791b6fdf8b68a
U MCO
W 1527
TODO
====

Add Toggl support
-----------------

* FetchHoursOnline: `https://toggl.com/reports/api/v2/details?user_agent={authorEmail}&workspace_id={workspaceID}&order_desc=off&since={since:yyyy-MM-dd}&until={until:yyyy-MM-dd}` (and parse resulting JSON)
* Fetch today’s first activity; use its start time as today’s start time (rounded down to 5 minutes)
* On Friday, fetch all hours since Monday, cumulate these, subtract from the required weekly hours, and add that to today’s start time + pause time to get the suggested end time, capped at 9 hours maximum. If the suggested end time lies before today’s start time, just use the default end time.
* [API key] in ini file
* [Workspace ID] in ini file (or autodetect if the given API key has only one workspace?)

Additions to .ini:

        [Toggl]
        Email=<required. Where author can be contacted if Toggl has questions>
        API key=...
        Workspace ID=<if left empty, the first Toggl workspace ID associated with the API key will be inserted>
        First day of week=<0..6 = Sunday..Saturday; defaults to 1 = Monday>
        Last day of week=<0..6 = Sunday..Saturday; defaults to 5 = Friday>
        Hours required=40

Add Google Calendar v3 support?
------------------------------

* Implement authentication
* Use new URLs
* Parse JSON instead of XML


### See also [tickets]


[API key]: https://toggl.com/app/profile#api_token
[Workspace ID]: https://www.toggl.com/api/v8/workspaces
[tickets]: rptview?rn=1

Z 133cd919973b2253f7d5dd60eff11803