3 namespace app\Github\Delete
;
6 use app\Github\Exception\WebhookDeleteFailed
;
7 use http\Client\Request
;
9 class Webhook
extends Delete
11 function getRequest() {
12 $url = $this->url
->mod("./repos/". $this->args
["repo"] ."/hooks/". $this->args
["id"]);
13 $request = new Request("DELETE", $url, [
14 "Accept" => "application/vnd.github.v3+json",
15 "Authorization" => "token " . $this->api
->getToken(),
20 function getException($message, $code, $previous = null) {
21 return new WebhookDeleteFailed($message, $code, $previous);