projects
/
m6w6
/
seekat
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
history
|
raw
|
HEAD
typeof
[m6w6/seekat]
/
examples
/
cli.php
1
<
?php
2
3
require_once
__DIR__
.
"/../vendor/autoload.php"
;
4
5
$api
=
new
seekat\
API
([
6
"Authorization"
=>
"token "
.
getenv
(
"GITHUB_TOKEN"
)
7
]);
8
array_shift
(
$argv
);
9
10
(
$self
=
function
(
$api
)
use
(&
$self
) {
11
global
$argv
;
12
13
while
(
null
!== (
$arg
=
array_shift
(
$argv
))) {
14
if
(
"."
===
$arg
) {
15
$api
->
then
(
$self
);
16
return
;
17
}
18
$api
=
$api
->
$arg
;
19
}
20
21
echo
$api
,
"
\n
"
;
22
})(
$api
);
23
24
$api
->
send
();