symfony/microsoft-teams-notifier
Composer 安装命令:
composer require symfony/microsoft-teams-notifier
包简介
Symfony Microsoft Teams Notifier Bridge
README 文档
README
Provides Microsoft Teams integration through Incoming Webhook for Symfony Notifier.
DSN example
MICROSOFT_TEAMS_DSN=microsoftteams://default/PATH
where:
PATHhas the following format:webhookb2/{uuid}@{uuid}/IncomingWebhook/{id}/{uuid}
Adding text to a Message
With a Microsoft Teams, you can use the ChatMessage class::
use Symfony\Component\Notifier\Bridge\MicrosoftTeams\MicrosoftTeamsTransport; use Symfony\Component\Notifier\Message\ChatMessage; $chatMessage = (new ChatMessage('Contribute To Symfony'))->transport('microsoftteams'); $chatter->send($chatMessage);
Adding Interactions to a Message
With a Microsoft Teams Message, you can use the MicrosoftTeamsOptions class
to add MessageCard options.
use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Action\ActionCard; use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Action\HttpPostAction; use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Action\Input\DateInput; use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Action\Input\TextInput; use Symfony\Component\Notifier\Bridge\MicrosoftTeams\MicrosoftTeamsOptions; use Symfony\Component\Notifier\Bridge\MicrosoftTeams\MicrosoftTeamsTransport; use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Section\Field\Fact; use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Section\Section; use Symfony\Component\Notifier\Message\ChatMessage; $chatMessage = new ChatMessage(''); // Action elements $input = new TextInput(); $input->id('input_title'); $input->isMultiline(true)->maxLength(5)->title('In a few words, why would you like to participate?'); $inputDate = new DateInput(); $inputDate->title('Proposed date')->id('input_date'); // Create Microsoft Teams MessageCard $microsoftTeamsOptions = (new MicrosoftTeamsOptions()) ->title('Symfony Online Meeting') ->text('Symfony Online Meeting are the events where the best developers meet to share experiences...') ->summary('Summary') ->themeColor('#F4D35E') ->section((new Section()) ->title('Talk about Symfony 5.3 - would you like to join? Please give a shout!') ->fact((new Fact()) ->name('Presenter') ->value('Fabien Potencier') ) ->fact((new Fact()) ->name('Speaker') ->value('Patricia Smith') ) ->fact((new Fact()) ->name('Duration') ->value('90 min') ) ->fact((new Fact()) ->name('Date') ->value('TBA') ) ) ->action((new ActionCard()) ->name('ActionCard') ->input($input) ->input($inputDate) ->action((new HttpPostAction()) ->name('Add comment') ->target('http://target') ) ) ; // Add the custom options to the chat message and send the message $chatMessage->options($microsoftTeamsOptions); $chatter->send($chatMessage);
Sponsor
This package is looking for a backer.
Help Symfony by sponsoring its development!
Resources
symfony/microsoft-teams-notifier 适用场景与选型建议
symfony/microsoft-teams-notifier 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 982.72k 次下载、GitHub Stars 达 12, 最近一次更新时间为 2021 年 04 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「chat」 「notifier」 「microsoft-teams」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 symfony/microsoft-teams-notifier 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 symfony/microsoft-teams-notifier 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 symfony/microsoft-teams-notifier 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This simple PHP class allows you to easily generate Smartsupp.com JS chat code.
Client for the REST API plugin of the OpenFire Server
Symfony JustCall Notifier Bridge
Extensible library for building notifications and sending them via different delivery channels.
NO LIBRARIES socket per page bridge for your Laravel application.
统计信息
- 总下载量: 982.72k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 14
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-08