projects
/
m6w6
/
seekat
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
update to PHP-8.1
[m6w6/seekat]
/
examples
/
promise.php
diff --git
a/examples/promise.php
b/examples/promise.php
index e1f5b9d4fbd4a3311e322fe2706d6ffa11423928..b39890d8d51158bc21af4f350dd57724dd9c0973 100755
(executable)
--- a/
examples/promise.php
+++ b/
examples/promise.php
@@
-1,11
+1,7
@@
#!/usr/bin/env php
<?php
#!/usr/bin/env php
<?php
-require_once __DIR__."/../vendor/autoload.php";
-
-use seekat\API;
-
-$api = new API(API\Future\amp(), API\auth("token", getenv("GITHUB_TOKEN")));
+$api = include "examples.inc";
$api->users->m6w6->gists()->onResolve(function($error, $gists) {
$error and die($error);
$api->users->m6w6->gists()->onResolve(function($error, $gists) {
$error and die($error);
@@
-17,7
+13,7
@@
$api->users->m6w6->gists()->onResolve(function($error, $gists) {
printf("\nGist %s, %s:\n", $gist->id, $gist->description ?: "<no title>");
}
$cs = $commit->change_status;
printf("\nGist %s, %s:\n", $gist->id, $gist->description ?: "<no title>");
}
$cs = $commit->change_status;
- printf("\t%s: ", substr($commit->version,
0,
8));
+ printf("\t%s: ", substr($commit->version,
0,
8));
printf("-%s+%s=%s\n", $cs->deletions, $cs->additions, $cs->total);
}
});
printf("-%s+%s=%s\n", $cs->deletions, $cs->additions, $cs->total);
}
});