Skip to content

fapi-cz/fapi-client

Repository files navigation

build codecov Maintainability

fapi-cz/fapi-client

Library for accessing FAPI API.

Requirements

Library fapi-cz/fapi-client requires PHP 7.1 or higher and fapi-cz/http-client.

Installation

The best way to install fapi-cz/fapi-client is using Composer.

Run command composer require fapi-cz/fapi-client.

How to run tests

Run command vendor/bin/tester -C tests.

How to create client

$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.

Nette DI

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