Implemenation of communication with ADOL API endpoints
This package is auto-updated.
Last update: 2020-09-26 01:43:20 UTC
The development is under AsisTeam s.r.o.. Feel free to use and contribute.
composer require asisteam/adol
This package communicates with following ADOL APIs:
- Watchdog (to be used for assigning watchdog items (insolvencies and estates) to watchdog and checking changes made on these items.)
- Property (to be used for retrieving detail information about property entities (lands/buildings/building units/persons))
Note: In order to communicate with ADOL APIs you must have your own private
token string. This
token is provided by ADOL.
For every provided API a separate client class is created (please see
In order to create the client, you must instantiate it by passing at least a valid
token string to it's constructor.
Or you can replace the default GuzzleHttp client with your custom http client that implements ClientInterface.
If using GuzzleHttp client you can also pass a third optional constructor parameter, that is a request options array that will be appended to every request made by the http client.
By using this options array, you can set client timeouts etc. for all client calls. Please see available Guzzle options at http://docs.guzzlephp.org/en/stable/request-options.html.
When doing a call two exceptions can be thrown.
RequestExceptionis being thrown if request is invalid. The request will not be performed.
ResponseExceptionis thrown whenever request has been sent and response from ADOL server contains invalid status or misses some data.
Code quality assurance:
Unit and Integration tests:
Note: As you are charged for all request performed to real API, integration tests are skipped by default. In order to run integration tests edit
and fill your private
token and delete
Environment::skip line in setUp() method.
You can configure clients as Nette Framework DI services and you will be able to use following services:
extensions: adol: AsisTeam\ADOL\Bridges\Nette\DI\AdolExtension adol: token: "your dedicated adol token" options: [ timeout: 20 ]