wakatime / legacy-python-cli

Command line interface used by all WakaTime text editor plugins.
https://wakatime.com/
BSD 3-Clause "New" or "Revised" License
1.02k stars 84 forks source link

Respect custom API URL for all endpoints #260

Open muety opened 3 years ago

muety commented 3 years ago

https://github.com/muety/wakapi/issues/153 brought up an issue related to the fact that many endpoints inside the CLI are hard-coded. It would be nice to be able to configure the base URL via wakatime.cfg instead, just like it's already possible for the heartbeats endpoint.

For instance, here: https://github.com/wakatime/wakatime/blob/e8deb156f1c2d26e5cf874da97f7b4354b3f5d20/wakatime/api.py#L173

alanhamlett commented 3 years ago

We'll do this in our new Go language version of wakatime-cli being released soon.

To do this, we need to change api_url to be the base api url instead of the heartbeats endpoint.

muety commented 3 years ago

Would you accept a PR for this, even though the new CLI is on its way? If so, I'll have a look.