Instagram/python-instagram — pull request #41 by aventurella (2013-01-02 22:05:41+00:00)
Title: Fix custom api calls where as_generator is needed but objectify_response is False

Return the next url for requests where objectify_response=False. Fixes as_generator when requesting endpoints where the response is paginated but not objectified.

Currently if you were to make your own api method to return every page but as a vanilla dict, not objectified:

```python
my_user_followed_by = bind_method(
path="/users/{user_id}/followed-by",
accepts_parameters=["user_id"],
objectify_response=False,
max_pages=float("inf"),
as_generator=True,
paginates=True)
```

you could not:

```python

for result in my_user_followed_by(user_id=1234):
print(len(result['data']))
```

you will only get one response and then a failure:

```python
TypeError: 'NoneType' object is not subscriptable
```

This is caused because if you have objectify_response=False in the definition, the current code returns None as the next_url breaking the while loop in *_paginator_with_url*

This patch address that issue.