abenity/abenity-php

Abenity API 的 PHP 客户端,文档见 https://abenity.com/developers/api

v2.2.1 2024-01-05 17:24 UTC

This package is auto-updated.

Last update: 2024-08-28 17:10:46 UTC


README

一个用于使用 Abenity API 的 PHP 库。

您可以在官方文档中找到完整的 API 文档。

要求

此库适用于 PHP 版本 7 和 8,并需要 OpenSSL 模块

安装

使用 Composer

abenity/abenity-php 包在 Packagist 上可用。

composer.json 中按以下方式包含它

  1. 在 composer.json 中将 abenity/abenity-php 添加为依赖项。

    composer require abenity/abenity-php:^2
    
  2. 现在 Abenity 将自动加载到您的项目中。

    require 'vendor/autoload.php';
    
    $abenity = new Abenity\ApiClient('my_api_key','my_api_username','my_api_password');
    

手动

  1. 下载最新版本。

  2. 将其提取到项目根目录下的 "abenity-php" 文件夹中。

  3. 像这样将 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