Skip to content

Function to get all objects in paged results #6

merged 6 commits into from Sep 16, 2011

2 participants

paulgb commented Sep 13, 2011

I have a use-case where I need to access all available objects rather than just the first page of results from the API. I've added a get_all function to the GraphAPI class to do so.

jgorset commented Sep 14, 2011

This is really cool, but I'd rather refactor _query and get to facilitate for this behavior than introduce get_all. What are your thoughts on implementing a page argument to get that defaults to False, but returns an interator instead of a dictionary if set to True?

paulgb commented Sep 14, 2011

Good idea, I've refactored this as suggested.

@jgorset jgorset merged commit 1482ab7 into jgorset:master Sep 16, 2011
jgorset commented Sep 16, 2011

I've merged this and bumped the version to 0.3. Thanks, @paulgb – this is an awesome feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.