Skip to content

Commit

Permalink
Merge pull request #14 from cp6/1.7
Browse files Browse the repository at this point in the history
Updated readme
  • Loading branch information
cp6 authored Aug 5, 2022
2 parents 4ca5111 + 92b8d8f commit c655729
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 1 addition & 5 deletions src/BunnyAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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 = '')
Expand Down

0 comments on commit c655729

Please sign in to comment.