-
Notifications
You must be signed in to change notification settings - Fork 89
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
'self' entry missing from links #43
Comments
Here is an update on this from a user of zot_bib_web:
|
API v3 removed the 'self' link, so it's no longer possible to compare 'last' and 'self' to check whether more data can be retrieved. However, checking to see if 'next' exists should work just as well. Closes #43
Could you try again with the |
I made that change, and this appears to fix the problem with "everything" - |
Do you mean that |
When called directly, it does not return all collections. — On Wed, Feb 11, 2015 at 9:32 AM, Stephan Hügel notifications@github.com
|
OK, looking at this a bit more, it seems as if So if you want to return all of them, you'd have to either use |
I'm now using a recursive algorithm based on collections_sub. That works, too, causes more requests but for smaller chunks of data from the server. Closing this, because the bug I reported seems fixed now. Thanks. |
With version 1.1.2, I am getting the error below during a request to 'everything'.
A little investigation shows that there is indeed no 'self' pagination entry in 'links'. I think one can produce this from self.request.url, but I wonder if there's an easier way.
From the v3 Zotero API, it does not seem there is a 'self' entry in the pagination links:
So, I'm not sure how this is/was supposed to work. My application (zot_bib_web) runs fine with a previous version, 0.10.2.
File "./zot.py", line 185, in retrieve_bib
items = zot.everything(zot.collection_items(collection, content=content, style=style, order=order_by, sort=sort_order))
File "/Library/Python/2.7/site-packages/pyzotero/zotero.py", line 544, in everything
while not self.links['self'] == self.links['last']:
KeyError: u'self'
The text was updated successfully, but these errors were encountered: