manish-pareek / gsuite-addon-php
为gsuite插件卡片服务的替代方案
dev-master
2024-09-05 09:51 UTC
Requires
- php: ^7.0|^8.0
Requires (Dev)
- phpunit/phpunit: ^6|^7|^8|^9
This package is auto-updated.
Last update: 2024-09-05 09:59:37 UTC
README
使用这个库,您将快速开始,并专注于开发业务逻辑,而不是创建JSON作为响应。这与谷歌插件应用脚本具有相同的命名约定。
安装
您可以通过composer安装此包
composer require manish-pareek/gsuite-addon-php
使用方法
use ManishPareek\Gsuite\Addon\Card; use ManishPareek\Gsuite\Addon\Image; use ManishPareek\Gsuite\Addon\Navigation; use ManishPareek\Gsuite\Addon\ResponseAction; use ManishPareek\Gsuite\Addon\ResponseBuilder; use ManishPareek\Gsuite\Addon\Section; use ManishPareek\Gsuite\Addon\Widget; $imageWidget = (new Widget())->setImage( (new Image())->setImageUrl("https://storage.googleapis.com/gweb-uniblog-publish-prod/images/logo_Google_FullColor_3x_830x271px.max-2800x2800.png") ); $widgetSection = (new Section())->addWidget($imageWidget); $homeCard = (new Card())->addSection($widgetSection); $navigation = (new Navigation())->setPushCard($homeCard); $responseAction = (new ResponseAction())->addNavigation($navigation); $responseBuilder = (new ResponseBuilder())->setAction($responseAction); return $responseBuilder->send();
变更日志
请参阅 变更日志 了解最近更改的内容。
贡献
请参阅 贡献指南 了解详细信息。
安全性
如果您发现任何与安全性相关的问题,请通过电子邮件 pareek.manish558@gmail.com 联系,而不是使用问题跟踪器。
致谢
许可证
MIT许可证(MIT)。请参阅 许可证文件 了解更多信息。