@@ -52,7 +52,7 @@ Now we can use autoloader from Composer by:
52
52
// This file is generated by Composer
53
53
require_once 'vendor/autoload.php';
54
54
55
- $client = new Github\Client();
55
+ $client = new \ Github\Client();
56
56
$repositories = $client->api('user')->repositories('ornicar');
57
57
```
58
58
@@ -66,19 +66,19 @@ From `$client` object, you can access to all GitHub.
66
66
// This file is generated by Composer
67
67
require_once 'vendor/autoload.php';
68
68
69
- $client = new Github\Client(
70
- new Github\HttpClient\CachedHttpClient(array('cache_dir' => '/tmp/github-api-cache'))
69
+ $client = new \ Github\Client(
70
+ new \ Github\HttpClient\CachedHttpClient(array('cache_dir' => '/tmp/github-api-cache'))
71
71
);
72
72
73
73
// Or select directly which cache you want to use
74
- $client = new Github\HttpClient\CachedHttpClient();
74
+ $client = new \ Github\HttpClient\CachedHttpClient();
75
75
$client->setCache(
76
76
// Built in one, or any cache implementing this interface:
77
77
// Github\HttpClient\Cache\CacheInterface
78
- new Github\HttpClient\Cache\FilesystemCache('/tmp/github-api-cache')
78
+ new \ Github\HttpClient\Cache\FilesystemCache('/tmp/github-api-cache')
79
79
);
80
80
81
- $client = new Github\Client($client);
81
+ $client = new \ Github\Client($client);
82
82
```
83
83
84
84
Using cache, the client will get cached responses if resources haven't changed since last time,
0 commit comments