- needsCursors = method.parameters.has_key('cursor')
- if needsCursors and isinstance(json, dict) and 'previous_cursor' in json and 'next_cursor' in json:
- cursors = json['previous_cursor'], json['next_cursor']
- return json, cursors
+ needs_cursors = 'cursor' in method.session.params
+ if needs_cursors and isinstance(json, dict):
+ if 'previous_cursor' in json:
+ if 'next_cursor' in json:
+ cursors = json['previous_cursor'], json['next_cursor']
+ return json, cursors