定制 dfau/toujou-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dfau/toujou-api

Composer 安装命令:

composer require dfau/toujou-api

包简介

TYPO3 REST API Framework

README 文档

README

REST API for TYPO3 CMS based on {json:api}

Useful german youtube video https://www.youtube.com/watch?v=WoOuNe_rzpM

Installation

Require and install the plugin

$ composer require dfau/toujou-api
$ vendor/bin/typo3cms extension:install toujou_api 

Configuration

To make the API work you have to do the following:

  • Check Sites Management for api entrypoint
  • Create a BE user with OAuth2 client_id and client_secrect (OAuth2 tab)
  • Add and configure API resources (see Resources.php)
  • Add and configure API routes (see Resources.php)

Security

The API will be secured to prevent unwarranted requests.

You can obtain an access token by sending a POST request to /_api/token with following parameters:

key value
grant_type client_credentials
client_id <CLIENT_ID>
client_secret <CLIENT_SECRET>

Get auth token via request (Example):

curl --location --request POST 'https://rms.dfau.dev/_api/token' \
    --form 'grant_type="client_credentials"' \
    --form 'client_id="12fc7d65-0177-48be-9c3c-e7d8b2a1"' \
    --form 'client_secret="131"'

On valid credentials the json response will contain an access token:

{
  "token_type": "Bearer",
  "expires_in": 86400,
  "access_token": "eyJ0eXAiOiJ..."
}

For all following requests you need to use this access token by adding following line to the request header

Authorization : Bearer <ACCESS_TOKEN>

Example requests:

curl --location --request GET 'https://rms.dfau.dev/_api/pages/' \
    --header 'Authorization: Bearer eyJ0eXAi....' \

Development

Install php dependencies using composer:

$ composer install

PHPUnit Unit tests

$ etc/scripts/runTests.sh

PHPUnit Functional tests

$ etc/scripts/runTests.sh -s functional

Codeception Acceptance tests

$ etc/scripts/runTests.sh -s acceptance

Easy-Coding-Standard

Check coding standard violations

$ etc/scripts/checkCodingStandards.sh

Fix coding standard violations automatically

$ etc/scripts/checkCodingStandards.sh --fix

Documentation

Make `dockrun_t3rd available in current terminal

source <(docker run --rm t3docs/render-documentation show-shell-commands)

Run dockrun_t3rd

dockrun_t3rd makehtml

Open documentation

open "Documentation-GENERATED-temp/Result/project/0.0.0/Index.html"

dfau/toujou-api 适用场景与选型建议

dfau/toujou-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2019 年 08 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 dfau/toujou-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dfau/toujou-api 我们能提供哪些服务?
定制开发 / 二次开发

基于 dfau/toujou-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 9k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 6
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2019-08-28