X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fseekat;a=blobdiff_plain;f=examples%2Fhooks.php;h=fdeca097cb281c0921e596115c5ac0bfec2bd985;hp=612e6de75dbfc014f7ac97daaf11a7152896e50a;hb=HEAD;hpb=2121556150be871684b5046af7cf250b8219128d diff --git a/examples/hooks.php b/examples/hooks.php index 612e6de..fdeca09 100755 --- a/examples/hooks.php +++ b/examples/hooks.php @@ -3,20 +3,15 @@ require_once __DIR__."/../vendor/autoload.php"; -use seekat\{API, API\Future, API\Links}; -use Monolog\{Logger, Handler}; +use seekat\API\Links; -$cli = new http\Client("curl", "seekat"); -$cli->configure([ +$client = new http\Client("curl", "seekat"); +$client->configure([ "max_host_connections" => 10, "max_total_connections" => 50, "use_eventloop" => true, ]); - -$log = new Logger("seekat"); -$log->pushHandler(new Handler\StreamHandler(STDERR, Logger::NOTICE)); - -$api = new API(Future\react(), API\auth("token", getenv("GITHUB_TOKEN")), null, $cli, $log); +$api = include "examples.inc"; $api(function() use($api) { $repos = yield $api->users->m6w6->repos([