otis22/vetmanager-token

使用 token 认证访问 Vetmanager Rest API 的项目

0.2.2 2021-02-22 18:30 UTC

This package is auto-updated.

Last update: 2024-08-31 00:26:40 UTC


README

GitHub CI Coverage Status

vetmanager-token

Vetmanager - 兽医行业的 CRM,提供 REST API。vetmanager-token 是用于在 Vetmanager API 中处理 token 认证的库。

Vetmanager REST API 文档

Vetmanager REST API 在 Postman 中的使用

如何使用

use function Otis22\VetmanagerToken\credentials;
use function Otis22\VetmanagerToken\token;

$credentials = credentials('login', 'password', 'app_name');
$domainName = 'myclinic'; // first part from programm url address
echo token($credentials, $domainName)->asString();

贡献

运行所有测试

make all

或连接到终端

make exec

默认 PHP 版本是 8.0。使用 PHP_VERSION= 来指定自定义版本。项目仅支持 8.0 和 8.1 版本的 PHP。

make all PHP_VERSION=8.1
# run both 
make all PHP_VERSION=8.1 && make all

对于集成测试,将 .env.example 复制到 .env 并填写您的值

所有命令

# security check
make security
# composer install
make install
# composer install with --no-dev
make install-no-dev
# check code style
make style
# run static analyze tools
make static-analyze
# run unit tests
make unit
#  check coverage
make coverage
# check integration, .env required
make integration