承接 komujohn/google-chat-notifier 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

komujohn/google-chat-notifier

最新稳定版本:v5.2.4

Composer 安装命令:

composer require komujohn/google-chat-notifier

包简介

Symfony Google Chat Notifier Bridge

README 文档

README

Provides Google Chat integration for Symfony Notifier. Allowing the thread key to be setup at the notification

DSN example

GOOGLE_CHAT_DSN=googlechat://ACCESS_KEY:ACCESS_TOKEN@default/SPACE?thread_key=THREAD_KEY

where:

  • ACCESS_KEY is your Google Chat access key
  • ACCESS_TOKEN is your Google Chat access token
  • SPACE is the Google Chat space
  • THREAD_KEY is the Google Chat message thread to group messages into a single thread (optional)

Code Example

<?php
namespace App\Service;

use Symfony\Component\Notifier\Bridge\GoogleChat\ThreadNotification;
use Symfony\Component\Notifier\Notification\Notification;
use Symfony\Component\Notifier\NotifierInterface;
use Symfony\Component\Notifier\Recipient\NoRecipient;


class NotificationHelper {

    private NotifierInterface $notifier;

    public function __construct( NotifierInterface $notifier ) {
        $this->notifier    = $notifier;
    }
    public function sendNotification($subject,$message,$thread_key='general5'){
        $notification = (new ThreadNotification())
            ->subject($subject)
            ->content($message)
            ->thread($thread_key)
            ->importance(Notification::IMPORTANCE_HIGH);

        $this->notifier->send($notification, new NoRecipient());
    }

}

Resources

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固