diff --git a/README.md b/README.md index 1794bc2..c799b09 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,12 @@ BunnyCDN) pull, video streaming and storage zones [API](https://docs.bunny.net/r This class whilst having a main focus on storage zone interaction includes pull zone features. Combining API with FTP, managing and using BunnyNet storage zones just got easier. -[![Generic badge](https://img.shields.io/badge/version-1.6-blue.svg)]() +[![Generic badge](https://img.shields.io/badge/version-1.7-blue.svg)]() [![Generic badge](https://img.shields.io/badge/PHP-8-purple.svg)]() **Note video streaming API is seemingly not finalized and changes from time to time** -### Requires +### Requirements For Pull zone, billing and statistics API interaction you will need your BunnyNet API key, this is found in your dashboard in the My Account section. @@ -64,7 +64,7 @@ You can get this with ```listStorageZones()``` as it returns all the storage zon ## Usage -Usage is simple, install with: +Install with composer: ``` composer require corbpie/bunny-cdn-api @@ -102,14 +102,6 @@ $bunny->apiKey('XXXX-XXXX-XXXX');//Bunny api key --- -To have max execution time of 300 seconds - -```php -$bunny = new bunnyAPI(300); -``` - ---- - Storage zone name and access key for storage zone interaction (**not needed if just using pull zone functions**) Set ```$access_key = ''``` to obtain key automatically (storage name must be accurate) diff --git a/src/BunnyAPI.php b/src/BunnyAPI.php index d756eb4..e0aff96 100644 --- a/src/BunnyAPI.php +++ b/src/BunnyAPI.php @@ -26,7 +26,7 @@ class BunnyAPI private string $stream_collection_guid; private string $stream_video_guid; - public function __construct(int $execution_time = 240, bool $json_header = false) + public function __construct() { try { if (!$this->constApiKeySet()) { @@ -37,10 +37,6 @@ public function __construct(int $execution_time = 240, bool $json_header = false } catch (BunnyAPIException $e) {//display error message echo $e->errorMessage(); } - ini_set('max_execution_time', $execution_time); - if ($json_header) { - header('Content-Type: application/json'); - } } public function apiKey(string $api_key = '')