library afip-public-api
Simple Afip public API library
msantang/afip-public-api
Simple Afip public API library
- Friday, June 2, 2017
- by msantang78
- Repository
- 0 Watchers
- 0 Stars
- 6 Installations
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 20 % Grown
Afip Public API Client
Small lib to query Afip (Argentina) public api for persons data., (*1)
Quick Start
Installation, (*2)
$ composer require msantang/afip-public-api
Using, (*3)
<?php
use Msantang\AfipPublicApi\Exceptions\Exception;
use Msantang\AfipPublicApi\Exceptions\NotFoundException;
require 'vendor/autoload.php';
$httpClient = new \GuzzleHttp\Client();
$var = new Msantang\AfipPublicApi\Client($httpClient);
try {
$r = $var->persona("20222222229");
print_r($r);
} catch (NotFoundException $e) {
echo 'Persona no encontrada: '.$e->getMessage();
} catch (Exception $e) {
echo 'Error: '.$e->getMessage();
}
Features
- PSR-4 autoloading compliant structure
- Unit-Testing with PHPUnit
TODO
- Finish documentation
- More testing
- Add more api methods