voryx/slack-wamp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

voryx/slack-wamp

最新稳定版本:0.3.0

Composer 安装命令:

composer require voryx/slack-wamp

包简介

Slack to WAMP Publishing Bridge

README 文档

README

SlackWamp is a WAMP v2 (Web Application Messaging Protocol) bridge that exposes the entire Slack API (Web API and Real Time Messaging API) as WAMP topics and RPC calls.

SlackWamp is written in PHP and uses the Thruway WAMP client, but can work with any of the available WAMP routers.

Install with Composer

$ composer require "voryx/slack-wamp":"dev-master"

PHP SlackWamp Bridge Usage

<?php
require_once __DIR__ . "/vendor/autoload.php";

$token    = 'your_slack_token';
$botToken = 'your_slack_token_with_rtm:stream';
$wamp = new \Rx\Thruway\Client('wss://localhost:9090', 'realm1');

(new \SlackWamp\APIBridge($wamp, $token))->subscribe();
(new \SlackWamp\RealTimeBridge($wamp, $botToken))->subscribe();

Subscribing to messages

You'll be able to subscribe to any Slack RTM Event from any WAMP client, with the same topic name.

The response includes the entire Slack event message.

Making an RPC call

This bridge maps all of Slack's Web API Methods to WAMP RPCs.

For example, you if wanted to change your presence, the Web API call's name is users.setPresence. The WAMP RPC uses the same name except that it's all lower case and the arguments are passed through argsKW.

ie:

$wamp->call("users.setpresence", [], ["presence" => "away"])->subscribe(function ($res) {
    print_r($res[0]);
});
    

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固