Skip to content

Commit f23e88e

Browse files
authored
Merge pull request #268 from 2lenet/master
Update README.md
2 parents 010fe9f + 9f20fd2 commit f23e88e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,22 @@ $project = $client->api('projects')->create('My Project', array(
4848

4949
```
5050

51+
Example with Pager
52+
------------------
53+
54+
to fetch all your closed issue with pagination ( on the gitlab api )
55+
56+
```php
57+
$client = \Gitlab\Client::create('http://git.yourdomain.com')
58+
->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_URL_TOKEN)
59+
;
60+
$pager = new ResultPager($client);
61+
$issues = $pager->fetchall($client->api('issues'),'all',[null, ['state' => 'closed']]);
62+
63+
```
64+
65+
66+
5167
Model Usage
5268
-----------
5369

0 commit comments

Comments
 (0)