Skip to content

Commit

Permalink
Merge remote-tracking branch 'truepath/allow_limit_to_be_unset' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
urschrei committed Jan 3, 2017
2 parents 67a400f + a2845e3 commit 58c4793
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/__pycache__
9 changes: 6 additions & 3 deletions pyzotero/zotero.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,9 @@ def add_parameters(self, **params):
# TODO: rewrite format=atom, content=json request
if not params.get('limit'):
params['limit'] = 100
# Need ability to request arbitrary number of results for version response
elif (params['limit'] == -1 or params['limit'] is None): # -1 value is hack that works with current version
del params['limit']
self.url_params = urlencode(params, doseq=True)

def _build_query(self, query_string, no_params=False):
Expand Down Expand Up @@ -481,7 +484,7 @@ def file(self, item, **kwargs):
return self._build_query(query_string, no_params=True)

def dump(self, itemkey, filename=None, path=None):
"""
"""
Dump a file attachment to disk, with optional filename and path
"""
if not filename:
Expand Down Expand Up @@ -544,7 +547,7 @@ def subcoll(clct):
[subcoll(c) for c in
self.everything(self.collections_sub(clct['data']['key']))]

# select all top-level collections or a specific collection and children
# select all top-level collections or a specific collection and children
if collid:
toplevel = [self.collection(collid)]
else:
Expand Down Expand Up @@ -1435,7 +1438,7 @@ def upload(self):
File upload functionality
Goes through upload steps 0 - 3 (private class methods), and returns
a dict noting success, failure, or unchanged
a dict noting success, failure, or unchanged
"""
# TODO: The flow needs to be a bit clearer
created = self._create_prelim()
Expand Down

0 comments on commit 58c4793

Please sign in to comment.