Skip to content

Commit 1072b24

Browse files
committed
Update readme for model usage
1 parent c2bb251 commit 1072b24

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.markdown

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,22 @@ $repositories = $client->api('user')->repositories('ornicar');
5858

5959
From `$client` object, you can access to all GitHub.
6060

61+
## Model usage (WIP)
62+
63+
```php
64+
<?php
65+
66+
$org = new Github\Model\Org('screenpages');
67+
$repo = $org->createRepo('github-api');
68+
$issue = $repo->createIssue('This is a problem', array(
69+
'body' => 'Oh dear, now what?!'
70+
));
71+
72+
$issue->addLabel('critical');
73+
74+
print_r($issue->labels());
75+
```
76+
6177
## Documentation
6278

6379
See the `doc` directory for more detailed documentation.

0 commit comments

Comments
 (0)