Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional parameter not optional in habitipy #25

Closed
tr4nt0r opened this issue Apr 27, 2024 · 2 comments · May be fixed by HabitRPG/habitica#15194
Closed

Optional parameter not optional in habitipy #25

tr4nt0r opened this issue Apr 27, 2024 · 2 comments · May be fixed by HabitRPG/habitica#15194

Comments

@tr4nt0r
Copy link

tr4nt0r commented Apr 27, 2024

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?

@ASMfreaK
Copy link
Owner

ASMfreaK commented Apr 28, 2024

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.

@tr4nt0r
Copy link
Author

tr4nt0r commented Apr 28, 2024

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 :)

@tr4nt0r tr4nt0r closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants