Skip to content

Commit

Permalink
Add page_size parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Dec 30, 2017
1 parent 23b9857 commit 8f2bb5b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions taiga/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ def __init__(self, requester):

class ListResource(Resource):

def list(self, lazy_pagination=False, all=True, **queryparams):
def list(self, lazy_pagination=False, page_size=100, all=False,
**queryparams):
if page_size and not all:
queryparams['page_size'] = page_size
result = self.requester.get(
self.instance.endpoint, query=queryparams, paginate=all
self.instance.endpoint, query=queryparams, paginate=not all
)
objects = SearchableList()
objects.extend(self.parse_list(result.json()))
Expand Down

0 comments on commit 8f2bb5b

Please sign in to comment.