From 8d41e21c7ebf1de6864bbc617498f575ab5bda08 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 16 Jan 2017 09:33:54 +0100 Subject: [PATCH] fix example --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9dccecd..cdca980 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Full example: require_once __DIR__."/../vendor/autoload.php"; use seekat\API; +use function seekat\API\Links\next; $cli = new http\Client("curl", "seekat"); $cli->configure([ @@ -38,7 +39,7 @@ $cli->configure([ ]); $log = new Monolog\Logger("seekat"); -$log->pushHandler((new Monolog\Handler\StreamHandler(STDERR))->setLevel(Monolog\Logger::WARNING)); +$log->pushHandler(new Monolog\Handler\StreamHandler(STDERR, Monolog\Logger::WARNING)); $api = new API([ "Authorization" => "token ".getenv("GITHUB_TOKEN") @@ -50,7 +51,7 @@ $api(function($api) { "affiliation" => "owner" ]); while ($repos) { - $next = $repos->next(); + $next = next($repos); $batch = []; foreach ($repos as $repo) { -- 2.30.2