-
Notifications
You must be signed in to change notification settings - Fork 23
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
Api broken? #33
Comments
try to use pdb.fetch_all(resource.Network, 999, asn=2906) |
did that fix your problem, @nicoduck? |
Yes, but that also means that the documentation seems to be outdated. |
Would you mind to list the URL, @nicoduck you are referring to? |
I'm referring to the docs linked in the Readme (aka the startpage) of the project: http://peeringdb.github.io/peeringdb-py/api/ |
fetch_all avoids the local database and requests data directly from the API, is that intentional? |
Yes, fetch is fetching from server. If you are looking to access local data django's objects.all is what you would want. |
Hi,
I have some issues with the refactoring and the documentation, for example:
pdb.all(resource.Network, asn=2906) is listed as an example in the documentation but throws an error nowadays:
I assume that my setup works completely since pdb.get(resource.Network, 16954) returns the expected network.
>>> pdb.get(resource.Network, 16954) <Network: Pfalzkom>
It also seems that the presentation about PeeringDB 2 refers to the old library implementation as pdb.all('ix', name='chix', country='us') does not seem to work anymore too.
Could you please clarify how the syntax has changed, how to get the expected results and update the documentation?
I'm running python 3.6.8 and peeringdb --version returns:
peeringdb 1.0.0
Thanks
Nico
The text was updated successfully, but these errors were encountered: