You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>`php-github-api` follows the PSR-4 convention names for its classes, which means you can easily integrate `php-github-api` classes loading in your own autoloader.
36
+
Why`php-http/guzzle6-adapter`? We are decoupled form any HTTP messaging client with help by [HTTPlug](http://httplug.io/). Read about clients in our [docs](doc/customize.md).
46
37
47
38
## Using Laravel?
48
39
@@ -70,19 +61,15 @@ From `$client` object, you can access to all GitHub.
70
61
// This file is generated by Composer
71
62
require_once 'vendor/autoload.php';
72
63
73
-
$client = new \Github\Client(
74
-
new \Github\HttpClient\CachedHttpClient(array('cache_dir' => '/tmp/github-api-cache'))
75
-
);
64
+
$client = new \Github\Client();
65
+
$client->useCache();
76
66
77
67
// Or select directly which cache you want to use
78
-
$client = new \Github\HttpClient\CachedHttpClient();
79
-
$client->setCache(
68
+
$client->useCache(
80
69
// Built in one, or any cache implementing this interface:
81
70
// Github\HttpClient\Cache\CacheInterface
82
71
new \Github\HttpClient\Cache\FilesystemCache('/tmp/github-api-cache')
83
72
);
84
-
85
-
$client = new \Github\Client($client);
86
73
```
87
74
88
75
Using cache, the client will get cached responses if resources haven't changed since last time,
0 commit comments