Instagram/python-instagram — pull request #35 by henninge (2012-08-07 10:20:00+00:00)
Title: Add pagination_format parameter to api methods.

This patch makes it possible to use the api to follow a media stream.

Reacting to real-time updates about a tag requires the use of the "min_tag_id" parameter which is included in the pagination object returned by api methods that paginate. Unfortunately, python-instagram only exposes the "next_url" member of that object, which is not needed if you only want the "latest since last time I polled". Mike described the use of "min_tag_id" [here](https://groups.google.com/forum/?fromgroups#!topic/instagram-api-developers/lGJvmwWF45E "Explanation on Google Groups").

This patch fixes that by adding a "pagination_format" parameter to the api methods which defaults to "next_url" so it won't break existing code. Setting the parameter to "dict" will return the full pagination dictionary instead of just its "next_url" member. Setting "as_generator" to "True" will cause the "pagination_format" parameter to be ignored since the generator does not return pagination information anyway.

I hope you find this patch useful and unobtrusive enough to include it.
Thank you!
Henning