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
/
cli.php
diff --git
a/examples/cli.php
b/examples/cli.php
old mode 100644
(file)
new mode 100755
(executable)
index
650ca85
..
fc72130
--- a/
examples/cli.php
+++ b/
examples/cli.php
@@
-1,24
+1,25
@@
+#!/usr/bin/env php
<?php
require_once __DIR__."/../vendor/autoload.php";
<?php
require_once __DIR__."/../vendor/autoload.php";
-$api = new seekat\API([
+$api = new seekat\API(
seekat\API\Future\react(),
[
"Authorization" => "token ".getenv("GITHUB_TOKEN")
]);
array_shift($argv);
"Authorization" => "token ".getenv("GITHUB_TOKEN")
]);
array_shift($argv);
-($self = function($api) use(&$self) {
+($self = function($
error, $
api) use(&$self) {
global $argv;
while (null !== ($arg = array_shift($argv))) {
if ("." === $arg) {
global $argv;
while (null !== ($arg = array_shift($argv))) {
if ("." === $arg) {
- $api->
t
hen($self);
+ $api->
w
hen($self);
return;
}
$api = $api->$arg;
}
echo $api, "\n";
return;
}
$api = $api->$arg;
}
echo $api, "\n";
-})($api);
+})(
null,
$api);
$api->send();
$api->send();