miralsoft / docbee-api
docbee的PHP API函数。
dev-main
2024-07-19 14:11 UTC
Requires
- php: >=8.0.0
This package is auto-updated.
Last update: 2024-09-19 14:31:51 UTC
README
本项目用于使用PHP的docbee API。
如何使用
您可以通过以下composer文件中的行下载包:
"require": {
"php": ">=8.0.0",<br>
"miralsoft/docbee-api": ">=v1"
}
配置
要使用API,您必须使用docbee所需的选项创建一个配置对象。
use miralsoft\docbee\api\Config;
// Generate conig with token
$config = new Config(APITOKEN);
将APITOKEN替换为您自己的docbee令牌。
示例
这里有一个使用docbee API的简单示例。
require_once '../vendor/autoload.php';
use miralsoft\docbee\api\Config;
use miralsoft\docbee\api\Customer;
// Generate conig with token
$config = new Config(APITOKEN);
// Generate the customer object
$customer = new Customer($config);
$result = $customer->get(); // Get all customers
更多示例,您可以查看test-scripts。