legacy-python-cli icon indicating copy to clipboard operation
legacy-python-cli copied to clipboard

Respect custom API URL for all endpoints

Open muety opened this issue 4 years ago • 2 comments
trafficstars

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

muety avatar Apr 01 '21 11:04 muety

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.

alanhamlett avatar Apr 06 '21 14:04 alanhamlett

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

muety avatar May 01 '21 08:05 muety