@@ -15,6 +15,8 @@ around the GitHub API v3. This is achieved using a number of methods:
1515 * Abstracting the specific details of the GitHub API
1616
1717``` php
18+ use GitHub\API\User\User;
19+
1820 // Setup the user, and authenticate
1921 $user = new User();
2022 $user->setCredentials('username', 'password');
@@ -91,6 +93,8 @@ At present only basic authentication is available. OAuth with be available soon.
9193Authentication can be achieved as follows.
9294
9395``` php
96+ use GitHub\API\User\User;
97+
9498 $user = new User();
9599 $user->setCredentials('username', 'password');
96100 $user->login();
@@ -244,6 +248,8 @@ GitHub API Documentation - [User Email API](http://developer.github.com/v3/users
244248The email API can be used independently of the other API's as follows:
245249
246250``` php
251+ use GitHub\API\User\Email;
252+
247253 $email = new Email();
248254 $response = $email->all();
249255```
@@ -252,6 +258,8 @@ However, as emails are related to the user you can also access the email API via
252258user as follows:
253259
254260``` php
261+ use GitHub\API\User\User;
262+
255263 $user = new User();
256264 $response = $user->emails()->all();
257265```
@@ -302,14 +310,18 @@ GitHub API Documentation - [User Keys API](http://developer.github.com/v3/users/
302310The keys API can be used independently of the other API's as follows:
303311
304312``` php
305- $key = new Keys();
313+ use GitHub\API\User\Key;
314+
315+ $key = new Key();
306316 $response = $key->all();
307317```
308318
309319However, as keys are related to the user you can also access the keys API via the
310320user as follows:
311321
312322``` php
323+ use GitHub\API\User\User;
324+
313325 $user = new User();
314326 $response = $user->keys()->all();
315327```
@@ -365,6 +377,8 @@ GitHub API Documentation - [Gists API](http://developer.github.com/v3/gists/).
365377The gists API can be used independently of the other API's as follows:
366378
367379``` php
380+ use GitHub\API\Gist\Gist;
381+
368382 $gist = new Gist();
369383 $response = $gist->all();
370384```
@@ -511,14 +525,18 @@ GitHub API Documentation - [Gists Comments API](http://developer.github.com/v3/g
511525The gists comments API can be used independently of the other API's as follows:
512526
513527``` php
514- $comment = new GistComment();
528+ use GitHub\API\Gist\Comment;
529+
530+ $comment = new Comment();
515531 $response = $comment->all();
516532```
517533
518534However, as comments are related to the gists you can also access the comments API via the
519535gist as follows:
520536
521537``` php
538+ use GitHub\API\Gist\Gist;
539+
522540 $gist = new Gist();
523541 $response = $gist->comments()->all();
524542```
0 commit comments