Skip to content

Commit

Permalink
Adding before parameter to Board.fetch_actions to enable pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego J. Romero López committed Oct 14, 2016
1 parent f16a28b commit 4a5eefa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion trello/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,15 @@ def get_members(self, filters=None):

return members

def fetch_actions(self, action_filter, action_limit=50, since=None):
def fetch_actions(self, action_filter, action_limit=50, before=None, since=None):
query_params = {'filter': action_filter, 'limit': action_limit}

if since:
query_params["since"] = since

if before:
query_params["before"] = before

json_obj = self.client.fetch_json('/boards/' + self.id + '/actions', query_params=query_params)

self.actions = json_obj
Expand Down

0 comments on commit 4a5eefa

Please sign in to comment.