| Total Complexity | 3 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | final class FilesEndpoint extends ResourceEndpoint |
||
| 19 | { |
||
| 20 | /** @use ListEndpointTrait<File> */ |
||
| 21 | use ListEndpointTrait; |
||
| 22 | use GetEndpointTrait; |
||
| 23 | |||
| 24 | public function __construct(DigiSign $parent) |
||
| 25 | { |
||
| 26 | parent::__construct($parent, '/api/files', File::class); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function upload(FileStream $file): File |
||
| 30 | { |
||
| 31 | return $this->makeResource($this->postRequest('', ['multipart' => ['file' => $file]])); |
||
|
|
|||
| 32 | } |
||
| 33 | |||
| 34 | public function content(string $id): FileResponse |
||
| 37 | } |
||
| 38 | } |
||
| 39 |