3 [![Build Status](https://travis-ci.org/m6w6/seekat.svg)](https://travis-ci.org/m6w6/seekat)
5 Fluent Github API access with PHP-7 and [ext-http](https://github.com/m6w6/ext-http).
7 Support for the following promise providers built in:
8 * [ReactPHP](https://github.com/reactphp/promise)
9 * [AmPHP](https://github.com/amphp/amp)
11 Supports plugging into your favourite event loop through
12 [http\Client's custom event loop interface](https://mdref.m6w6.name/http/Client/Curl/User).
21 $api = new API(API\Future\react());
23 $api->repos->m6w6->seekat->readme->as("html")->then(function($readme) {
37 require_once __DIR__."/../vendor/autoload.php";
40 use function seekat\API\Links\next;
42 $cli = new http\Client("curl", "seekat");
44 "max_host_connections" => 10,
45 "max_total_connections" => 50,
48 $log = new Monolog\Logger("seekat");
49 $log->pushHandler(new Monolog\Handler\StreamHandler(STDERR, Monolog\Logger::WARNING));
51 $api = new API(API\Future\react(), [
52 "Authorization" => "token ".getenv("GITHUB_TOKEN")
56 $repos = yield $api->users->m6w6->repos([
57 "visibility" => "public",
58 "affiliation" => "owner"
64 foreach ($repos as $repo) {
65 $batch[] = $repo->hooks();
67 foreach (yield $batch as $key => $hooks) {
71 printf("%s:\n", $repos->{$key}->name);
72 foreach ($hooks as $hook) {
73 if ($hook->name == "web") {
74 printf("\t%s\n", $hook->config->url);
76 printf("\t%s\n", $hook->name);
91 composer require m6w6/seekat
95 A comprehensive list of changes can be obtained from the
96 [releases overview](https://github.com/m6w6/seekat/releases).
100 seekat is licensed under the 2-Clause-BSD license, which can be found in
101 the accompanying [LICENSE](./LICENSE) file.
105 All forms of contribution are welcome! Please see the bundled
106 [CONTRIBUTING](./CONTRIBUTING.md) note for the general principles followed.
108 The list of past and current contributors is maintained in [THANKS](./THANKS).