mailgun-php/doc/pagination.md
Tobias Nyholm af98ed3307 Added documentation for the API classes (#328)
* Added documentation for the API classes

* Added more docs

* Added domain

* Typo

* Minor fixes
2017-04-08 10:45:25 +02:00

18 lines
449 B
Markdown

# Pagination
Some API endpoints do support pagination.
```php
/** @var Mailgun\Model\Tag\IndexReponse $response */
$reponse = $mailgun->tags()->index('example.com');
// Parse through the first response
// ...
$nextResponse = $mailgun->tags()->nextPage($response);
$previousResponse = $mailgun->tags()->previousPage($response);
$firstResponse = $mailgun->tags()->firstPage($response);
$lastResponse = $mailgun->tags()->lastPage($response);
```