gammamatrix/playground-crm-api

Playground: 提供一个API,无需UI即可与Playground CRM(Laravel应用程序的客户关系管理系统)进行交互。

dev-develop / 73.x-dev 2024-08-16 08:01 UTC

This package is auto-updated.

Last update: 2024-09-17 20:29:58 UTC


README

Playground CI Workflow Test Coverage PHPStan Level 9

Playground: CRM API包。

文档

Swagger

此应用程序提供Swagger文档:[swagger.json](https://github.com/gammamatrix/playground-crm-api/blob/HEAD/swagger.json)。

  • 端点模型支持锁定、强制删除、恢复、版本控制等功能。
  • 索引端点支持高级查询过滤。

Swagger API文档使用npm构建。

  • npm仅用于生成文档,操作CMS API时不需要。

查看[package.json的要求](https://github.com/gammamatrix/playground-crm-api/blob/HEAD/package.json)。

安装npm。

npm install

构建文档以生成[swagger.json配置](https://github.com/gammamatrix/playground-crm-api/blob/HEAD/swagger.json)。

npm run docs

文档

  • 在Swagger Editor UI上预览[swagger.json](https://editor.swagger.io/?url=https://raw.githubusercontent.com/gammamatrix/playground-crm-api/develop/swagger.json)。
  • 在Redocly Editor UI上预览[swagger.json](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/gammamatrix/playground-crm-api/develop/swagger.json)。

安装

您可以通过composer安装此包。

composer require gammamatrix/playground-crm-api

配置

默认情况下,所有选项均被禁用。

查看已发布配置文件的内容:[config/playground-crm-api.php](https://github.com/gammamatrix/playground-crm-api/blob/HEAD/config/playground-crm-api.php)

您可以使用以下命令发布配置文件:

php artisan vendor:publish --provider=Playground\Crm\Api\ServiceProvider" --tag="playground-config"

Cloc

composer cloc
➜  playground-crm-api git:(develop) ✗ composer cloc
> cloc --exclude-dir=node_modules,output,vendor .
     316 text files.
     228 unique files.
      89 files ignored.

github.com/AlDanial/cloc v 1.98  T=0.33 s (688.1 files/s, 103018.7 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
JSON                             5              0              0          18356
PHP                            154           1179           1945           6795
YAML                            62              5              0           5495
XML                              3              0              7            215
Markdown                         3             37              0             85
INI                              1              3              0             12
-------------------------------------------------------------------------------
SUM:                           228           1224           1952          30958
-------------------------------------------------------------------------------

PHPStan

在config/、lang/、routes/、src/、tests/Feature/、tests/Unit/目录上进行9级测试。

  • config/
  • lang/
  • routes/
  • src/
  • tests/Feature/
  • tests/Unit/
composer analyse

编码规范

composer format

测试

composer test --parallel

变更日志

请参阅[CHANGELOG](https://github.com/gammamatrix/playground-crm-api/blob/HEAD/CHANGELOG.md),了解最近有哪些变更。

许可证

MIT许可证(MIT)。请参阅[许可证文件](https://github.com/gammamatrix/playground-crm-api/blob/HEAD/LICENSE.md)以获取更多信息。