You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I originally thought that the second argument of things like getitem was parameters (this should be documented better). It seems they have to be added manually.
I originally thought that the second argument of things like getitem was parameters (this should be documented better).
Please feel free to open a separate issue -- or even a PR 😉 -- about this, although the documentation for the argument does specify it's for URL templating.
It seems they have to be added manually.
Correct. There's no explicit URL parameter support.
I'm of two minds on this one. One is that adding parameters is not hard and you have to specify the URL anyway, so this isn't preventing anyone from being productive. But obviously it would be convenient for those cases where parameters are necessary.
So I guess if someone wants to propose adding a keyword-only url_parameters argument that takes a Mapping[str, str] then I would be willing to consider it.
I didn't notice it is mentioned in the docstring of the class. I was looking at the docstring of the individual method (like getitem). I think it would be helpful to put a blurb about it on each method's docstring.
One is that adding parameters is not hard and you have to specify the URL anyway, so this isn't preventing anyone from being productive.
I suppose that's true in the general case. I'm using it for a GitHub bot which responds to webhooks, so I never actually create API URLs myself. The main URL comes from an event, and I get the additional URLs from the API itself (like event.data['pull_request']['base']['repo']['contents_url'] ).
Also building the URL by hand isn't necessarily trivial (you have to remember to properly quote the parameter arguments, for instance).
By the way, I guess my intuition for parameters being the second argument comes from requests, where the second argument to get is params.
I originally thought that the second argument of things like
getitem
was parameters (this should be documented better). It seems they have to be added manually.Here is an example of a GitHub API call that has a parameter https://developer.github.com/v3/repos/contents/#get-contents.
The text was updated successfully, but these errors were encountered: