X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=examples%2Fgistlog.php;fp=examples%2Fgistlog.php;h=723cc0c6f72d7fc1eb693c3e8545c42dc657c0ed;hb=2451d97f1cb7b97e445b4dd839835b8673a4d0fc;hp=455b30d180d6e3a1ca67d5f345a1a1f1b8e82e1f;hpb=3958595e9ff27162ae918db1453ddecd4840d481;p=m6w6%2Fseekat diff --git a/examples/gistlog.php b/examples/gistlog.php index 455b30d..723cc0c 100755 --- a/examples/gistlog.php +++ b/examples/gistlog.php @@ -4,12 +4,14 @@ require __DIR__."/../vendor/autoload.php"; $api = new seekat\API([ - "Authentication" => "token ".getenv("GUTHUB_TOKEN") + "Authorization" => "token ".getenv("GITHUB_TOKEN") ]); $api(function($api) { $gists = yield $api->users->m6w6->gists(); while ($gists) { + $next = \seekat\API\Links\next($gists); + foreach ($gists as $gist) { foreach ($gist->files as $name => $file) { if ($name == "blog.md") { @@ -25,6 +27,6 @@ $api(function($api) { } } - $gists = yield $gists->next(); + $gists = yield $next; } });