4 require_once __DIR__
."/../vendor/autoload.php";
8 $api = new API(API\Future\amp
(), API\auth
("token", getenv("GITHUB_TOKEN")));
10 $api->users
->m6w6
->gists()->onResolve(function($error, $gists) {
11 $error and die($error);
12 foreach ($gists as $gist) {
13 $gist->commits()->onResolve(function($error, $commits) use($gist) {
14 $error and die($error);
15 foreach ($commits as $i => $commit) {
17 printf("\nGist %s, %s:\n", $gist->id
, $gist->description ?
: "<no title>");
19 $cs = $commit->change_status
;
20 printf("\t%s: ", substr($commit->version
,0,8));
21 printf("-%s+%s=%s\n", $cs->deletions
, $cs->additions
, $cs->total
);