projects
/
m6w6
/
seekat
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
PHP8
[m6w6/seekat]
/
examples
/
promise.php
diff --git
a/examples/promise.php
b/examples/promise.php
index cee5c74a9652bb2d66392a8f3d6f6e3afc3845fe..e1f5b9d4fbd4a3311e322fe2706d6ffa11423928 100755
(executable)
--- a/
examples/promise.php
+++ b/
examples/promise.php
@@
-7,10
+7,10
@@
use seekat\API;
$api = new API(API\Future\amp(), API\auth("token", getenv("GITHUB_TOKEN")));
$api = new API(API\Future\amp(), API\auth("token", getenv("GITHUB_TOKEN")));
-$api->users->m6w6->gists()->
when
(function($error, $gists) {
+$api->users->m6w6->gists()->
onResolve
(function($error, $gists) {
$error and die($error);
foreach ($gists as $gist) {
$error and die($error);
foreach ($gists as $gist) {
- $gist->commits()->
when
(function($error, $commits) use($gist) {
+ $gist->commits()->
onResolve
(function($error, $commits) use($gist) {
$error and die($error);
foreach ($commits as $i => $commit) {
if (!$i) {
$error and die($error);
foreach ($commits as $i => $commit) {
if (!$i) {