steverobbins/magento-slack
最新稳定版本:v1.0.0
Composer 安装命令:
composer require steverobbins/magento-slack
包简介
Magento integration with Slack.com
README 文档
README
*Note: This module doesn't do much on it's own. It's just an api wrapper for integrations you write. You can use it chat to your Slack channel when: an order is placed, and exception is logged, an account is created, etc.
Config
- In Slack: Create a bot under "Integrations" in the
- In Magento: Under System > Config > Services > Slack, enable the module and add your token
- Click Save
- Click Get Channels to collect your channels and their identifiers
API Usage
Review the methods in Slack's API.
Invoke with:
Mage::getModel('slack/api_<method>')
->setFooArg('bar')
-><action>();
For instance:
Chat "Hello World" to the #general Channel
$chat = Mage::getModel('slack/api_chat');
$chat->setChannel('general')
->setText('Hello World');
$chat->postMessage();
var_dump($chat->getData());
Notice you use the channel name, not it's identifier.
Upload a File
Mage::getModel('slack/api_files')
->setChannels(array('general', 'random'))
->setContent(file_get_contents($someFile))
->upload();
etc.
统计信息
- 总下载量: 489
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: CC-BY-3.0
- 更新时间: 2015-07-28