Tatsh / kate-wakatime

Kate plugin to interface with WakaTime
https://tatsh.github.io/kate-wakatime/
11 stars 9 forks source link

Extension uses api_url setting incorrectly #35

Open wizzardx opened 3 months ago

wizzardx commented 3 months ago

According to the Wakatime docs:

https://wakatime.com/developers/

The API endpoint is over here:

https://api.wakatime.com/api/v1/

kate-wakatime seems to appends a v1 onto the end of whatever you use in the api_url setting, so for Kate Wakatime, I need to make the setting in ~/.wakatime.cfg, this, as a workaround:

api_url=https://api.wakatime.com/api

However, when I use PyCharm and Wakatime on the same PC, then PyCharm can't access Wakatimes APIs, it needs the V1 to be in the url. So in other words, PyCharm needs the endpoint that's listed on Wakatime's website, this:

https://api.wakatime.com/api/v1/

After doing that change, the wakatime extension in kate starts using v1/v1 api endpoints, which fails.