devo-ps/dopy — pull request #16 by zyegfryed (2014-10-29 10:30:34+00:00)
Title: Added options support when listing objects with API v2

DigitalOcean API v2 introduces [pagination](https://developers.digitalocean.com/v2/#links) by default when listing objects.

The following patch allows to specify the number of items to return when calling listing methods either globally when instantiating the manager:

```python
>>> from dopy.manager import DoManager
>>> do = DoManager(None, 'api_token', api_version=2, per_page=666)
```

... or on a per-function basis for fined-grained control:

```python
>>> do.all_active_droplets(per_page=42)
```

A side-effect on a per-function basis, it that we now allow also to pass arbitrary options supported by the API. Hence, if at some point DO allows to disabled pagination via a parameter, it will be just a matter of using it in calls to disable it. hint. hint.