fousky / idoklad
Implement iDoklad API v2
Installs: 293
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 2
Open Issues: 0
pkg:composer/fousky/idoklad
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- doctrine/collections: ^2.0
- guzzlehttp/guzzle: ^6.0|^7.0
- psr/http-message: ^1.0|^2.0
- symfony/expression-language: ^6.0|^7.0
- symfony/filesystem: ^6.0|^7.0
- symfony/options-resolver: ^6.0|^7.0
- symfony/validator: ^6.0|^7.0
Requires (Dev)
- php-parallel-lint/php-parallel-lint: ^1.3
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.0
Suggests
- doctrine/orm: Needs for useful doctrine traits
- symfony/filesystem: Needs for AccessTokenFileStorage - save API token to the file.
This package is auto-updated.
Last update: 2025-12-26 20:34:02 UTC
README
PHP 8+ library for calling iDoklad API (v2). Compatible with Symfony 6.4+ and PHP 8.1+. Supports both Guzzle 6 and 7.
Install with Composer
composer require fousky/idoklad
Basic usage
use Fousky\Component\iDoklad\Functions as Func; use Fousky\Component\iDoklad\iDoklad; use Fousky\Component\iDoklad\iDokladFactory; /** * Create iDoklad client with specific configuration. * * @var \Fousky\Component\iDoklad\iDoklad $idoklad */ $idoklad = iDokladFactory::create([ 'client_id' => '##TODO:INSERT CLIENT ID##', 'client_secret' => '##TODO:INSERT CLIENT SECRET##', ]); /** * Execute function (iDokladFunctionInterface), * this will call iDoklad API and returns model object (iDokladModelInterface). * * @var \Fousky\Component\iDoklad\Model\Contacts\ContactCollectionModel $responseModel */ $responseModel = $idoklad->execute( new Func\Contacts\GetContacts() ); /** * Here you have response data from iDoklad API in model class * @see GetContacts::getModelClass */ var_dump($responseModel);
CI code quality check
Try to run composer ci where you can find this commands:
composer validate --no-check-allcomposer install --no-progress --no-interaction --no-suggest --no-scriptsphp vendor/bin/phpstan analyze ./ -c phpstan.neon --level=7parallel-lint -j 10 --exclude vendor ./