-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from ToshY/feature/127
Add Edge Storage API download as ZIP
- Loading branch information
Showing
4 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ToshY\BunnyNet\Model\API\EdgeStorage\ManageFiles; | ||
|
||
use ToshY\BunnyNet\Enum\Header; | ||
use ToshY\BunnyNet\Enum\Method; | ||
use ToshY\BunnyNet\Enum\Type; | ||
use ToshY\BunnyNet\Model\AbstractParameter; | ||
use ToshY\BunnyNet\Model\EndpointBodyInterface; | ||
use ToshY\BunnyNet\Model\EndpointInterface; | ||
|
||
class DownloadZip implements EndpointInterface, EndpointBodyInterface | ||
{ | ||
public function getMethod(): Method | ||
{ | ||
return Method::POST; | ||
} | ||
|
||
public function getPath(): string | ||
{ | ||
return '%s/'; | ||
} | ||
|
||
public function getBody(): array | ||
{ | ||
return [ | ||
new AbstractParameter(name: 'RootPath', type: Type::STRING_TYPE), | ||
new AbstractParameter(name: 'Paths', type: Type::ARRAY_TYPE, required: true, children: [ | ||
new AbstractParameter(name: null, type: Type::STRING_TYPE), | ||
]), | ||
]; | ||
} | ||
|
||
public function getHeaders(): array | ||
{ | ||
return [ | ||
Header::CONTENT_TYPE_JSON, | ||
]; | ||
} | ||
} |