Skip to content

Commit

Permalink
added docstring to get_all
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgb committed Sep 13, 2011
1 parent e1fe839 commit 3c2e5e7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions facepy/graph_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ def __init__(self, oauth_token=None, signed_request=None, app_secret=None):
self.oauth_token = oauth_token

def get_all(self, path, **params):
"""Get a generator for all the results returned by a particular query, including
ones beyond the first page of results returned by the API.
Arguments:
path -- A string describing the path to the item.
**options -- Graph API parameters such as 'limit', 'offset' or 'since' (see http://developers.facebook.com/docs/reference/api/).
Returns:
An iterator over all the objects returned by a query which lazily loads results
beyond the first "page" as required.
"""
# Convert option lists to comma-separated values; Facebook chokes on array-like constructs
# in the query string (like [...]?ids=['johannes.gorset', 'atle.mo']).
for key, value in params.items():
Expand Down

0 comments on commit 3c2e5e7

Please sign in to comment.