Skip to content

Fixed #189 not clear documentation #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 10, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions doc/result_pager.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

### Usage examples

Get all repositories of a organization
#### Get all repositories of a organization

```php
$client = new Github\Client();
Expand All @@ -15,7 +15,14 @@ $parameters = array('github');
$result = $paginator->fetchAll($organizationApi, 'repositories', $parameters);
```

Get the first page
Parameters of the `fetchAll` method:

* The API object you're working with
* The method of the API object you're using
* The parameters of the method

#### Get the first page

```php
$client = new Github\Client();

Expand All @@ -26,22 +33,26 @@ $parameters = array('github');
$result = $paginator->fetch($organizationApi, 'repositories', $parameters);
```

Check for a next page:
#### Check for a next page:

```php
$paginator->hasNext();
```

Get next page:
#### Get next page:

```php
$paginator->fetchNext();
```

Check for previous page:
#### Check for previous page:

```php
$paginator->hasPrevious();
```

Get previous page:
#### Get previous page:

```php
$paginator->fetchPrevious();
```
Expand Down