abenity / abenity-php
Abenity API 的 PHP 客户端,文档见 https://abenity.com/developers/api
v2.2.1
2024-01-05 17:24 UTC
Requires
- php: ^5.3 || ^7.0 || ^8.0
- ext-openssl: *
- phpseclib/phpseclib: ~2.0
Requires (Dev)
- phpunit/phpunit: ^9
README
一个用于使用 Abenity API 的 PHP 库。
您可以在官方文档中找到完整的 API 文档。
要求
此库适用于 PHP 版本 7 和 8,并需要 OpenSSL 模块
安装
使用 Composer
abenity/abenity-php
包在 Packagist 上可用。
在 composer.json
中按以下方式包含它
-
在 composer.json 中将 abenity/abenity-php 添加为依赖项。
composer require abenity/abenity-php:^2
-
现在
Abenity
将自动加载到您的项目中。require 'vendor/autoload.php'; $abenity = new Abenity\ApiClient('my_api_key','my_api_username','my_api_password');
手动
-
下载最新版本。
-
将其提取到项目根目录下的 "abenity-php" 文件夹中。
-
像这样将
Abenity
包含到您的项目中require 'abenity-php/lib/Abenity.php'; $abenity = new Abenity\ApiClient('my_api_key','my_api_username','my_api_password');
用法
查看示例文件夹
贡献
使用 PHPUnit 从项目根目录运行测试,如下所示
[abenity-php]# phpunit tests