fousky / idoklad
Implement iDoklad API v2
dev-master / 0.2.x-dev
2019-12-20 15:32 UTC
Requires
- php: >=7.0
- ext-curl: *
- ext-json: *
- doctrine/annotations: ^1
- doctrine/cache: ^1
- doctrine/collections: ^1
- guzzlehttp/guzzle: ^6
- psr/http-message: ^1
- symfony/filesystem: ~2|~3|~4
- symfony/options-resolver: ~2|~3|~4
- symfony/validator: ~2|~3|~4
Requires (Dev)
- jakub-onderka/php-parallel-lint: 0.9.2
- phpstan/phpstan: ^0.9.0@dev
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-02-21 04:02:39 UTC
README
PHP7 library for calling iDoklad API (v2). Library is not stable yet.
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-all
composer install --no-progress --no-interaction --no-suggest --no-scripts
php vendor/bin/phpstan analyze ./ -c phpstan.neon --level=7
parallel-lint -j 10 --exclude vendor ./