X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=app%2FGithub%2FAPI.php;h=10cf2c0c33640f90f9dfbbc360b69366f4d0c000;hb=4c462ab66e6c65c15df7bd5fe6d2673884c639a0;hp=381533d298e8d6d2f2efe54a48a88488505913c6;hpb=ebc0d017c8a24bd16ca1f4347b39b07ba4349135;p=pharext%2Fpharext.org diff --git a/app/Github/API.php b/app/Github/API.php index 381533d..10cf2c0 100644 --- a/app/Github/API.php +++ b/app/Github/API.php @@ -111,6 +111,11 @@ class API $fetch = new Fetch\Token($this, compact("code") + $this->config->client->toArray()); return $fetch($callback); } + + function fetchUser(callable $callback) { + $fetch = new Fetch\User($this); + return $fetch($callback); + } function fetchRepos($page, callable $callback) { $fetch = new Fetch\Repos($this); @@ -139,4 +144,9 @@ class API $fetch->setPage($page); return $fetch($callback); } + + function fetchContents($repo, $path, callable $callback) { + $fetch = new Fetch\Contents($this, compact("repo", "path")); + return $fetch($callback); + } }