Download the PHP package kreyu/nbp-web-api without Composer
On this page you can find all versions of the php package kreyu/nbp-web-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nbp-web-api
NBP Web API Client
Simple and fluent interface to retrieve data from NBP Web API.
This library structure is strongly inspired by knplabs/github-api package.
Installation
This package is decoupled from any HTTP client thanks to the HTTPlug.
Requires packages that provide http-client-implementation and psr/http-factory-implementation.
For more information visit HTTPlug for library users.
Usage
Changing content type
If you wish to retrieve responses in XML format rather than JSON, you can change it in the client:
Providing HTTP client and factories
By default, the HTTP client builder uses HTTP client and factories provided by the discovery.
If you have to provide specific PSR-18 compliant client or any PSR-17 factory, you can pass them to the HTTP client builder:
Caching
To use caching mechanism, provide any PSR-6 compliant item pool to the HTTP client builder:
Using HTTPlug plugins
You can provide any HTTPlug plugin to the HTTP client builder:
All versions of nbp-web-api with dependencies
psr/http-message Version ^1.0
psr/cache Version ^1.0 || ^2.0 || ^3.0
psr/http-client-implementation Version ^1.0
psr/http-factory-implementation Version ^1.0
php-http/httplug Version ^2.0
php-http/discovery Version ^1.11
php-http/client-common Version ^2.2
php-http/cache-plugin Version ^1.7
webmozart/assert Version ^1.0