2017 © Pedro Peláez
 

library slack-wamp

Slack to WAMP Publishing Bridge

image

voryx/slack-wamp

Slack to WAMP Publishing Bridge

  • Thursday, November 16, 2017
  • by davidwdan
  • Repository
  • 3 Watchers
  • 5 Stars
  • 30 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

SlackWamp

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., (*1)

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

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., (*3)

The response includes the entire Slack event message., (*4)

Making an RPC call

This bridge maps all of Slack's Web API Methods to WAMP RPCs., (*5)

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., (*6)

ie:, (*7)


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

The Versions

16/11 2017

dev-master

9999999-dev

Slack to WAMP Publishing Bridge

  Sources   Download

MIT

The Requires

 

by Matt Bonneau
by David Dan

http proxy slack wamp publish websockets pubsub wamp2

16/11 2017

0.3.0

0.3.0.0

Slack to WAMP Publishing Bridge

  Sources   Download

MIT

The Requires

 

by Matt Bonneau
by David Dan

http proxy slack wamp publish websockets pubsub wamp2

04/10 2017

0.2.0

0.2.0.0

Slack to WAMP Publishing Bridge

  Sources   Download

MIT

The Requires

 

by Matt Bonneau
by David Dan

http proxy slack wamp publish websockets pubsub wamp2

11/04 2016

0.1.1

0.1.1.0

Slack to WAMP Publishing Proxy

  Sources   Download

MIT

The Requires

 

by Matt Bonneau
by David Dan

http proxy slack wamp publish websockets pubsub wamp2

11/04 2016

0.1.0

0.1.0.0

Slack to WAMP Publishing Proxy

  Sources   Download

MIT

The Requires

 

by Matt Bonneau
by David Dan

http proxy slack wamp publish websockets pubsub wamp2