gnome-pomodoro / gnome-pomodoro-tracking

Connect your Pomodoros to popular time tracking services (@odoo, @clockify, @toggl).
MIT License
27 stars 7 forks source link

Toggl API is deprecated #21

Closed sojusnik closed 1 month ago

sojusnik commented 5 months ago

Starting from yesterday, Toggl stopped working. After double-checking, it seems that the problem lies in the deprecated API:

$ gnome-pomodoro-tracking --plugin toggl
gnome-pomodoro-tracking --token XXX
"The V8 endpoint is scheduled to be shutdown on **23/05/2024**, this is a brownout. Please find the migration guide at https://engineering.toggl.com/changes/2022/10/01/api-v8-deprecation/index.html"
Traceback (most recent call last):
  File "/home/sojusnik/.local/pipx/venvs/gnome-pomodoro-tracking/lib/python3.12/site-packages/gnome_pomodoro_tracking/toggl.py", line 52, in auth
    raise Exception(req.text)
Exception: "The V8 endpoint is scheduled to be shutdown on 23/05/2024, this is a brownout. Please find the migration guide at https://engineering.toggl.com/changes/2022/10/01/api-v8-deprecation/index.html"
Fail auth check your token!

The solution is to move from API v8 to API v9, see also here. Could you have a look please?

josehbez commented 2 months ago

WIP

josehbez commented 1 month ago

Solved, please install latest version.

sojusnik commented 1 month ago

Installed the new version, but it's still not working. Although f.i. I can now access my projects through gnome-pomodoro-tracking --projects and gnome-pomodoro-tracking --status shows the correct information when a pomodoro is running, but after I stop a pomodoro, Toggl doesn't receive the data. Can you have a second look on it please?

sojusnik commented 1 month ago

Another thing that might be important: your animation shows that all three field (Pomodoro, Long Break, Short Break) in the settings should be enabled: https://github.com/gnome-pomodoro/gnome-pomodoro-tracking/blob/master/docs/img/gnome-pomodoro-settings.gif

But from my experience it was enough to only enable "Pomodoro" there, else after a Pomodoro stops, the timer will still be running, as shown in gnome-pomodoro-tracking --status. Can you clarify the proper setup please?

josehbez commented 1 month ago

Installed the new version, but it's still not working. Although f.i. I can now access my projects through gnome-pomodoro-tracking --projects and gnome-pomodoro-tracking --status shows the correct information when a pomodoro is running, but after I stop a pomodoro, Toggl doesn't receive the data. Can you have a second look on it please?

Please install from pip install -U git+https://github.com/gnome-pomodoro/gnome-pomodoro-tracking.git,

I have a problem publishing on pypi, I'm working on solving it.

sojusnik commented 1 month ago

With git+https://github.com/gnome-pomodoro/gnome-pomodoro-tracking.git it finally works, thanks!

josehbez commented 1 month ago

With git+https://github.com/gnome-pomodoro/gnome-pomodoro-tracking.git it finally works, thanks!

Great, I finally upgrade package at pypi.

josehbez commented 1 month ago

Another thing that might be important: your animation shows that all three field (Pomodoro, Long Break, Short Break) in the settings should be enabled: https://github.com/gnome-pomodoro/gnome-pomodoro-tracking/blob/master/docs/img/gnome-pomodoro-settings.gif

But from my experience it was enough to only enable "Pomodoro" there, else after a Pomodoro stops, the timer will still be running, as shown in gnome-pomodoro-tracking --status. Can you clarify the proper setup please?

The animation is an example to capture all time blocks. I am updating the guide and animation to leave only the minimum required.