projects
/
m6w6
/
seekat
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
flush
[m6w6/seekat]
/
examples
/
generator.php
diff --git
a/examples/generator.php
b/examples/generator.php
index acee8a5f48870e1d6a393464d1af60d782dcc73f..1fd81e60e1edf0296e241bf9556a7101ca26c28a 100755
(executable)
--- a/
examples/generator.php
+++ b/
examples/generator.php
@@
-11,13
+11,13
@@
$log->pushHandler((new Monolog\Handler\StreamHandler(STDERR))->setLevel(Monolog\
$cli = new http\Client("curl", "seekat");
$cli = new http\Client("curl", "seekat");
-$api = new API([
+$api = new API(
API\Future\react(),
[
"Authorization" => "token ".getenv("GITHUB_TOKEN")
], null, $cli, $log);
$api(function($api) {
$count = 0;
"Authorization" => "token ".getenv("GITHUB_TOKEN")
], null, $cli, $log);
$api(function($api) {
$count = 0;
- $events = yield $api->repos->m6w6->{"ext-
http
"}->issues->events();
+ $events = yield $api->repos->m6w6->{"ext-
pq
"}->issues->events();
while ($events) {
/* pro-actively queue the next request */
$next = Links\next($events);
while ($events) {
/* pro-actively queue the next request */
$next = Links\next($events);
@@
-38,7
+38,7
@@
$api(function($api) {
$events = yield $next;
}
return $count;
$events = yield $next;
}
return $count;
-})->
done(function(
$count) {
+})->
when(function($error,
$count) {
printf("Listed %d events\n", $count);
});
printf("Listed %d events\n", $count);
});