Open JOJ0 opened 1 month ago
While investigating I played around with a graphical view of modules. This is the Master class. It didn't really help my investigation but it was fun to look at đŸ˜†
Now that would be neat for the docs page :sweat_smile: , but I'm guessing that is an separate tool that generated that graph?
Hi @AnssiAhola yes this would indeed be neat but as you've guessed it's from a separate tool and if we include it, it would mean "manual" maintenance of keeping this pictures up to date:
This is the oneliner I used to generate it (on macOS zsh). The main tool that generates it is pyreverse
: https://pylint.pycqa.org/en/latest/pyreverse.html
export CLASS=discogs_client.models.Master; pyreverse -ASmy -c ${CLASS} discogs_client; dot -Tpng ${CLASS}.dot > ${CLASS}.png; open -a Preview ${CLASS}.png
I would like to add the filter possibility for Master versions to our docs. See below how it's done already concisely described by @AnssiAhola, which came up in a recent Discussions post.
Now while I'm at it, I want to investigate if there are maybe more objects that make use of the
filter
from theBasePaginatedResponse
class...Original Post
It's pretty hard to figure it out from the source code, but
Master.versions
is actually aPaginatedList
under the hood which inheritsBasePaginatedResponse
so it has thefilter()
method and should call that specific api when invoked.Example
The
filter()
method supports all the parameters described in the API docs and can be passed in as kwargsHope that helps, Cheers!
_Originally posted by @AnssiAhola in https://github.com/joalla/discogs_client/discussions/155#discussioncomment-10672974_