Skip to content

Commit

Permalink
Updated for composer usage
Browse files Browse the repository at this point in the history
Updated for composer usage
  • Loading branch information
cp6 committed Nov 7, 2020
1 parent e2898db commit 6787bc7
Showing 1 changed file with 14 additions and 23 deletions.
37 changes: 14 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,27 @@ If you want to interact with storage zones you will need your BunnyCDN API key s
* Calculate costs

## Usage
Usage is simple, make sure the class file is included
```php
require_once('bunnyAPI.php');
```
Usage is simple, install with:

```
composer require corbpie/bunny-cdn-api
```
Use like:
```php
require __DIR__ . '/vendor/autoload.php';

use Corbpie\BunnyCdn\BunnyAPI;

$bunny = new bunnyAPI();//Initiate the class

echo $bunny->listPullZones();
```

#### Setting API key:

**option 1 (preferred)**

Line 10 ```bunnyAPI.php```
Line 12 ```bunnyAPI.php```

```php
const API_KEY = 'XXXX-XXXX-XXXX';
Expand Down Expand Up @@ -545,21 +552,5 @@ $bunny->insertPullZoneLogs($id, $date);

## TODO

* Access more refined, individual data
* Improve action logging

## VERSIONS

#### 1.1

* Fixed rename file function
* Introduced MySQL functions (MySQL_database.sql)
* Log actions
* Store Pull and Storage zone basic data
* Fixed Storage zone requests log documentation for date (dd-mm-yy -> mm-dd-yy)
* Added formatted responses for most actions

#### 1.0

* Core actions
* Basic FTP commands for Storage zone interaction
* Proper exception handling
* Improve action logging

0 comments on commit 6787bc7

Please sign in to comment.