Skip to content

Commit cf6a12b

Browse files
committed
update readme, licence
1 parent 3e65372 commit cf6a12b

2 files changed

Lines changed: 17 additions & 21 deletions

File tree

File renamed without changes.

‎README.md‎

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,20 @@
11
## Backblaze B2 SDK for PHP
2-
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
2+
[![GitHub](https://img.shields.io/github/license/zaxbux/backblaze-b2-php)][licence] [![Packagist Version](https://img.shields.io/packagist/v/zaxbux/backblaze-b2-php)][packagist]
33

4-
`b2-sdk-php` is a client library for working with Backblaze's B2 storage service.
4+
`backblaze-b2-php` is a client library for working with the B2 cloud storage service from Backblaze.
55

66
## Documentation
77

8-
[Full documentation of the Backblaze B2 API can be found here.](https://www.backblaze.com/b2/docs/index.html)
8+
[Full documentation of the Backblaze B2 API can be found here.][b2-docs]
99

10-
Each method is well documented in [`src/client.php`](src/Client.php).
11-
12-
For examples and options that are specific to this library, please see [`docs/`](docs/):
13-
14-
* [Authorization](docs/authorization.md)
15-
* [Downloading](docs/downloading.md)
16-
* [Uploading](docs/uploading.md)
17-
* [Large Files](docs/large_files.md)
18-
* [Buckets](docs/buckets.md)
19-
* [Files](docs/files.md)
20-
* [Keys](docs/keys.md)
10+
Complete documentation for this library does not exist yet, however most methods are already documented in the source code.
2111

2212
## Installation
2313

2414
Installation is via Composer:
2515

2616
```bash
27-
$ composer require zaxbux/b2-sdk-php
17+
$ composer require zaxbux/backblaze-b2-php
2818
```
2919

3020
## Getting Started
@@ -37,15 +27,15 @@ use Zaxbux\BackblazeB2\Client;
3727
$accountId = '...';
3828
$applicationKey = '...';
3929

40-
$client = new Client($accountId, $applicationKey);
30+
$client = new Client([$accountId, $applicationKey]);
4131

4232
// Retrieve an array of Bucket objects on your account.
4333
$buckets = $client->listBuckets();
4434
```
4535

4636
## Authorization Cache
4737

48-
If you want to cache the authorization token to reduce the number of API calls, create a class that implements `Zaxbux\BackblazeB2\AuthorizationCacheInterface`.
38+
If you want to cache the authorization token to reduce the number of API calls, create a class that implements `Zaxbux\BackblazeB2\Interfaces\AuthorizationCacheInterface`.
4939

5040
```php
5141
<?php
@@ -54,15 +44,17 @@ use Zaxbux\BackblazeB2\Client;
5444

5545
$authCache = new AuthorizationCacheExample;
5646

57-
$client = new Client($accountId, $applicationKey, $authCache);
47+
$client = new Client(new Config($accountId, $applicationKey, [
48+
'authorizationCache' => $authCache,
49+
]));
5850

5951
```
6052

6153
### Sample Authorization Cache
6254
```php
6355
<?php
6456

65-
use Zaxbux\BackblazeB2\AuthorizationCacheInterface;
57+
use Zaxbux\BackblazeB2\Interfaces\AuthorizationCacheInterface;
6658

6759
class AuthorizationCacheExample implements AuthorizationCacheInterface {
6860
public function cache($key, $value) {
@@ -89,6 +81,10 @@ $ vendor/bin/phpunit
8981

9082
Feel free to contribute in any way by reporting an issue, making a suggestion, or submitting a pull request.
9183

92-
## License
84+
## Licence
85+
86+
[MIT][licence]
9387

94-
MIT
88+
[b2-docs]: https://www.backblaze.com/b2/docs/index.html
89+
[licence]: LICENCE.md
90+
[packagist]: https://packagist.org/packages/zaxbux/backblaze-b2-php

0 commit comments

Comments
 (0)