refactor guthub api
[pharext/pharext.org] / app / Github / Create / ReleaseAsset.php
diff --git a/app/Github/Create/ReleaseAsset.php b/app/Github/Create/ReleaseAsset.php
deleted file mode 100644 (file)
index 538273d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-
-namespace app\Github\Create;
-
-use app\Github\Create;
-use app\Github\Exception\ReleaseAssetCreateFailed;
-use http\Client\Request;
-
-class ReleaseAsset extends Create
-{
-       function getRequest() {
-               $body = new \http\Message\Body(fopen($this->args["asset"], "rb"));
-               $request = new Request("POST", $this->args["url"], [
-                       "Accept" => "application/vnd.github.v3+json",
-                       "Content-Type" => $this->args["type"],
-                       "Authorization" => "token ". $this->api->getToken()
-               ], $body);
-               return $request;
-       }
-       
-       function getException($message, $code, $previous = null) {
-               return new ReleaseAssetCreateFailed($message, $code, $previous);
-       }
-}