msantang / afip-public-api
v0.1.0
2017-06-01 22:20 UTC
Requires
- php: >=5.4
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- phpunit/phpunit: ~5.7
This package is auto-updated.
Last update: 2024-08-29 04:58:40 UTC
README
一个小型库,用于查询Afip(阿根廷)公共API以获取个人信息。
快速开始
安装
$ composer require msantang/afip-public-api
使用
<?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();
}
特性
- PSR-4自动加载兼容结构
- 使用PHPUnit进行单元测试
待办事项
- 完成文档
- 进行更多测试
- 添加更多API方法