From 8a8989b7a1f4768c07d37625c915d493f05c31b4 Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 18 Jan 2017 19:28:50 +0100 Subject: fix player filtering and offsets --- gamelocker/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gamelocker/api.py') diff --git a/gamelocker/api.py b/gamelocker/api.py index 112ec8c..3f0388f 100644 --- a/gamelocker/api.py +++ b/gamelocker/api.py @@ -176,9 +176,9 @@ class Gamelocker(object): if sort: # TODO make this nice and usable params["sort"] = sort if player: - params["filter[playerName]"] = player + params["filter[playerNames]"] = player if team: - params["filter[teamName]"] = team + params["filter[teamNames]"] = team if createdAtStart: if isinstance(createdAtStart, datetime.datetime): createdAtStart = createdAtStart.isoformat() @@ -192,7 +192,7 @@ class Gamelocker(object): matches = [] for batch in range(0, limit, max_limit): params["page[limit]"] = min(limit, max_limit) - params["page[offset]"] = max_limit+offset + params["page[offset]"] = batch+offset matches += self._get("matches", params=params) limit -= max_limit -- cgit v1.3.1