Library for accessing FAPI API.
Library fapi-cz/fapi-client requires PHP 7.1 or higher and fapi-cz/http-client.
The best way to install fapi-cz/fapi-client is using Composer.
Run command composer require fapi-cz/fapi-client
.
Run command vendor/bin/tester -C tests
.
$clientFactory = new \Fapi\FapiClientFapiClientFactory('https://api.fapi.cz', new \Fapi\HttpClient\GuzzleHttpClient());
$fapiClient = $clientFactory->createFapiClient('Username', 'password');
You can also use \Fapi\HttpClient\GuzzleHttpClient
instead of \Fapi\HttpClient\CurlHttpClient
.
extensions:
httpClient: Fapi\HttpClient\Bridges\NetteDI\HttpClientExtension
fapiClient: Fapi\FapiClient\DI\FapiClientExtension
httpClient:
type: 'guzzle' #default curl
logging: true #default false
bar: true #default false
fapiClient:
username: fapi
password: fapi