Download the PHP package slacker775/backblaze-b2-api without Composer
On this page you can find all versions of the php package slacker775/backblaze-b2-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download slacker775/backblaze-b2-api
More information about slacker775/backblaze-b2-api
Files in slacker775/backblaze-b2-api
Package backblaze-b2-api
Short Description PHP Library for Backblaze B2 API
License MIT
Informations about the package backblaze-b2-api
Backblaze B2 API library for PHP
This library is designed to allow you to plug in your own PSR18 compliant HTTP client in order to utilize the Backblaze B2 API. As originally created, this was created to provide the backbone for a flysystem adapter, thus not all API calls are yet completed.
Usage
<?php
use Backblaze\B2\ApiClient;
$client = new ApiClient($accountId, $apiKey);
foreach($client->listFilenames() as $item) {
printf("File: %s\n", $item->getFileName());
}
Client Constructor
$client = new ApiClient(private string $applicationKeyId,
private string $applicationKey, ClientInterface $httpClient = null,
RequestFactoryInterface $requestFactory = null,
StreamFactoryInterface $streamFactory = null
)
The only required values are an application key id (or master ID) and an application key. You can pass in your own PSR18 HTTP Client as well as your own request and stream factories. This allows you to add plugins such as connection logging, etc in your process without bogging down this library with all kinds of additional baggage. This also prevents this library from being tied to a specific client implementation that then creates conflicts with your own project that might use a different version leading to dependancy nightmares.
If you use the symfony/http-client as your implementation, you can pass the same object as the $httpClient, $requestFactory and $streamFactory.
All versions of backblaze-b2-api with dependencies
psr/http-client-implementation Version *
psr/http-factory Version ^1.0
psr/http-factory-implementation Version *
php-http/discovery Version ^1.14
symfony/serializer Version ^4.0|^5.0|^6.0
symfony/property-access Version ^4.0|^5.0|^6.0