habitipy
habitipy copied to clipboard
Optional parameter not optional in habitipy
When working on the Home Assistant Habitica integration i noticed the method for fetching the users tasks api.tasks.user.get(type=task_type)
takes the parameter type
as mandatory though for the habitica api it is optional. HA uses habitipy v. 0.2.0 but I updated to 0.3.0 and this was still an issue. Could you maybe take a look into this?
This library parses apidoc from Habitica (see cached apidoc.txt
).
The param you mentioned is not "optional" in apidoc in Habitica. It is stated in description, but not marked in apidoc itself. I'll try and fix it in Habitica itself and create a hotfix here.
But after that I'd need to rework the apidoc parser here, as it will no longer work with newer versions of Habitica.
Thanks for the quick fix, already tested it and works like a charm. Now i can reduce the number of api call for tasks to 1 instead of 4 :)