X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fseekat;a=blobdiff_plain;f=examples%2Fgenerator.php;h=88b69cd004c9eddc6bd2e1b84520f0cfec7def8f;hp=1fd81e60e1edf0296e241bf9556a7101ca26c28a;hb=d38b3ae03472ba2f9af5009778574b23472bb3f7;hpb=e368287b3cd2dd40945ac8d1a1946bc32268007d diff --git a/examples/generator.php b/examples/generator.php index 1fd81e6..88b69cd 100755 --- a/examples/generator.php +++ b/examples/generator.php @@ -11,7 +11,7 @@ $log->pushHandler((new Monolog\Handler\StreamHandler(STDERR))->setLevel(Monolog\ $cli = new http\Client("curl", "seekat"); -$api = new API(API\Future\react(), [ +$api = new API(API\Future\amp(), [ "Authorization" => "token ".getenv("GITHUB_TOKEN") ], null, $cli, $log); @@ -38,7 +38,7 @@ $api(function($api) { $events = yield $next; } return $count; -})->when(function($error, $count) { +})->onResolve(function($error, $count) { printf("Listed %d events\n", $count); });