From e88410b3095901cf18ca4e625a74a9022f856f7e Mon Sep 17 00:00:00 2001 From: cp6 Date: Thu, 21 Oct 2021 21:20:38 +1100 Subject: [PATCH 1/3] Updated readme Updated wording Updated version Removed max execution reference --- README.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) 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) From b6d7475164ca6c2028c4f14e9747642769840e8d Mon Sep 17 00:00:00 2001 From: cp6 Date: Thu, 21 Oct 2021 21:23:46 +1100 Subject: [PATCH 2/3] Removed max execution parameter Can no longer set max execution time in the constructor --- src/BunnyAPI.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/BunnyAPI.php b/src/BunnyAPI.php index 8a539a0..556815d 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(bool $json_header = false) { try { if (!$this->constApiKeySet()) { @@ -37,7 +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'); } From 92b8d8f4d20c22c5c8e847244dbc581391a8f187 Mon Sep 17 00:00:00 2001 From: cp6 Date: Fri, 11 Feb 2022 23:17:33 +1100 Subject: [PATCH 3/3] Removed set JSON header in construct Removed set JSON header in construct function Use jsonHeader() instead --- src/BunnyAPI.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/BunnyAPI.php b/src/BunnyAPI.php index 556815d..ba97911 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(bool $json_header = false) + public function __construct() { try { if (!$this->constApiKeySet()) { @@ -37,9 +37,6 @@ public function __construct(bool $json_header = false) } catch (BunnyAPIException $e) {//display error message echo $e->errorMessage(); } - if ($json_header) { - header('Content-Type: application/json'); - } } public function apiKey(string $api_key = '')