-
Notifications
You must be signed in to change notification settings - Fork 107
Allow Project Issues to be filtered by passing kwargs #112
Conversation
I was wondering of doing away with any named parameters and just use **kwargs everywhere including per_page and page. IIRC they will default to sane parameters if not included so it would be easiar to use them as input for the data instead of managing all kwargs manually. |
In my opinion, to use **kwargs for things like per_page and page, where they do have default values on the API end, is kind of misleading (and makes things harder to document). Keeping them as named args with default values not only makes docs easier but also makes usage more clarified. The use of kwargs should be limited only to parameters where they are optional, such as where I used them in this patch. |
Extending with keyword args would be really useful - e.g. to specify the foo_projects = getprojects(search="foo") (Note: this behaviour can't be achieved using the |
Any progress towards this pull request? Is there any reason this should not be pulled to the master branch? |
Hey nick, Thanks for reminding me :) |
No problem, just becoming more and more daunting for me every time pip clones via a git repo rather than the real package :P never know when a new version will drop, and my fork will be left behind. Cheers, |
@nickw444 Looks great, can you update your branch with the latest changes from develop so I can merge it? Thanks! |
Just pulled latest upstream changes from develop and pushed, Thanks :) |
Perfect, thanks for the patch! |
Allow Project Issues to be filtered by passing kwargs
This can be extended to many other areas of the API which support filtering by query string arguments.
This significantly improves performance when querying projects which have > 100 issues since you can filter them on the API rather than with python code, which needs to request more than one API call.