Skip to content
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

Allow No Limit Parameter #63

Merged
merged 1 commit into from
Jan 3, 2017

Conversation

TruePath
Copy link
Contributor

@TruePath TruePath commented Jan 3, 2017

If one goes to the zotero api page and looks at the recommended means of syncing with the repository they suggest using format=versions to get the current versions of all objects. Unlike other requests a versions request (merely returning a dict mapping key -> version number) this request has no limit and the normal usage is to get all versions in one request. Indeed, it is important to be able to retrieve all version information in a single request so you know that your version information matches up with the last modified header.

Currently the add_parameters function always inserts a limit parameter. This can be hacked around by passing limit=-1 but this is undesirable and depends on unspecified behavior from the api. This change deletes the limit parameter if limit=None or limit=-1 is passed.

I also threw in a .gitignore ignoring the caches created by the test and a few deleted spaces at the end of lines.

…o allow format=versions requests to be unlimited. Also add .gitignore
@coveralls
Copy link

coveralls commented Jan 3, 2017

Coverage Status

Coverage increased (+0.03%) to 40.952% when pulling a2845e3 on TruePath:allow_limit_to_be_unset into 3339b07 on urschrei:master.

@urschrei urschrei merged commit a2845e3 into urschrei:master Jan 3, 2017
@urschrei
Copy link
Owner

urschrei commented Jan 3, 2017

Thanks!

@TruePath TruePath deleted the allow_limit_to_be_unset branch January 9, 2017 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants