cyberfusion / oxxa-api-client
Oxxa API 的 PHP 客户端
v2.11.0
2024-09-20 09:29 UTC
Requires
- php: >=8.1
- ext-dom: *
- ext-libxml: *
- ext-simplexml: *
- guzzlehttp/guzzle: ^7.0
- illuminate/http: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
- symfony/css-selector: ^6.0
- symfony/dom-crawler: ^6.0
Requires (Dev)
- laravel/pint: ^1.7
- phpstan/phpstan: ^1.2
- phpunit/phpunit: ^10.0
- dev-master
- v2.11.0
- v2.10.0
- v2.9.0
- v2.8.1
- v2.8.0
- v2.7.0
- v2.6.2
- v2.6.1
- v2.6.0
- v2.5.1
- v2.5.0
- v2.4.1
- v2.4.0
- v2.3.0
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.2
- v2.0.1
- v2.0.0
- v1.0.0
- dev-feature/2.11.0
- dev-feature/add-epp-code-limit-status-code
- dev-feature/add-helpdesk-code
- dev-feature/tasks
- dev-renovate/phpunit-phpunit-11.x
- dev-feature/status-codes
This package is auto-updated.
Last update: 2024-09-20 09:30:08 UTC
README
PHP 客户端用于 Oxxa API.
支持
此客户端由 Cyberfusion 编写。已开源供社区使用。如有任何问题,请在 GitHub 上创建一个问题或发送电子邮件至 support@cyberfusion.nl。
此客户端不受 Oxxa 支持。
要求
此客户端需要 PHP 8.1 或更高版本以及默认 PHP 模块。
安装
此客户端可以用于任何 PHP 项目和任何框架。
使用 Composer 安装客户端
composer require cyberfusion/oxxa-api-client
用法
入门
// Initialize the API $oxxa = new Oxxa($username, $password); // Perform calls to an endpoint $available = $oxxa ->domain() ->check('cyberfusion.nl');
测试模式
要测试您的实现,请使用测试模式。所有请求都告诉 Oxxa API 该请求是测试。
启用
$oxxa->enableTestMode();
禁用
$oxxa->disableTestMode();
模拟服务器
当使用模拟服务器进行测试时,您可以使用以下方法修改 API 的基本 URL:
$oxxa->setBaseUri('https://:8080');
这将返回 Oxxa 实例,因此您可以与其他方法一起使用它。
异常
在发生错误的情况下,客户端使用 OxxaException
作为基类抛出异常。所有异常都有一个特定的代码。这些可以在 OxxaException
类中找到。
测试
单元测试在 tests
目录中可用。运行
composer test
要生成 build/report
目录中的代码覆盖率报告,运行
composer test-coverage
贡献
一些基本端点已实现,但仍有很多未实现。请随时贡献!请参阅 贡献指南。
安全
如果您发现任何与安全相关的问题,请通过电子邮件 support@cyberfusion.nl 联系,而不是使用问题跟踪器。
许可
此客户端是开源软件,根据 MIT 许可证 许可。