nicer exception handling
[pharext/pharext.org] / app / Github / API.php
index 10cf2c0c33640f90f9dfbbc360b69366f4d0c000..8737c16ce5a9edeccf692baed7ec8ad04068d3f4 100644 (file)
@@ -149,4 +149,29 @@ class API
                $fetch = new Fetch\Contents($this, compact("repo", "path"));
                return $fetch($callback);
        }
+       
+       function createRepoHook($repo, $conf, callable $callback) {
+               $create = new Create\Webhook($this, compact("repo", "conf"));
+               return $create($callback);
+       }
+       
+       function updateRepoHook($repo, $id, $conf, callable $callback) {
+               $update = new Update\Webhook($this, compact("repo", "id", "conf"));
+               return $update($callback);
+       }
+       
+       function deleteRepoHook($repo, $id, callable $callback) {
+               $delete = new Delete\Webhook($this, compact("repo", "id"));
+               return $delete($callback);
+       }
+       
+       function createRelease($repo, $tag, callable $callback) {
+               $create = new Create\Release($this, compact("repo", "tag"));
+               return $create($callback);
+       }
+       
+       function createReleaseAsset($url, $asset, $type, callable $callback) {
+               $create = new Create\ReleaseAsset($this, compact("url", "asset", "type"));
+               return $create($callback);
+       }
 }