ayctor/sireneapi
Composer 安装命令:
composer require ayctor/sireneapi
包简介
Small PHP client library for Sirene API
README 文档
README
It is a small php client library to use the Sirene API.
See official documentation for availables methods.
Installation
composer require ayctor/sireneapi
Usage
V1
Doc will come
V3
use SireneApi\SireneApi; $api = new SireneApi; // Get all companies $companies = $api->companies()->all(); // Get company by SIREN number $company = $api->companies()->getBySiren('552081317'); // Get companies by other fields $companies = SirenApi::companies()->getBy('code_postal', 77100); // Get companies by other fields $companies = $api->companies()->getBy([ 'code_postal' => 77100, ]); // Get all estabslishments $establishments = $api->establishments()->all(); // Get establishments by SIREN number $establishments = $api->establishments()->getBySiren('552081317'); // Get establishment by SIRET number $establishment = $api->establishments()->getBySiret('55208131785027'); // Get establishments by other fields $establishments = $api->establishments()->getBy('code_postal', 77100); // Get establishments by other fields $establishments = SirenApi::establishments()->getBy([ 'code_postal' => 77100, ]);
Errors
getBySiret()
It will throw an exception if you use this function to retrieve companies
getBy()
It will throw an exception if you use this function with the first param as a string and no second param.
License
统计信息
- 总下载量: 820
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-09