steverobbins / magento-slack Goto Github PK
View Code? Open in Web Editor NEWMagento wrapper for Slack API
Magento wrapper for Slack API
Hi,
I have encounter an error when posting through php script running externally.
Following is working when running from cli, as "php slack.php"
<?php
require_once 'app/Mage.php';
Mage::app();
$chat = Mage::getModel('slack/api_chat');
$chat->setChannel('baselinker');
$chat->setText('OK!')->postMessage();
However running same through "curl -X GET url_to_same_file_slack.php" give following error:
Debug:
[body] => Array
(
[ok] =>
[error] => invalid_arg_name
)
Exception
Stack trace:
#0 /public_html/app/code/community/Steverobbins/Slack/Model/Api/Abstract.php(117): Mage::throwException('invalid_arg_nam...')
#1 /public_html/app/code/community/Steverobbins/Slack/Model/Api/Chat.php(37): Steverobbins_Slack_Model_Api_Abstract->__call('postMessage', Array)
#2 /public_html/app/code/community/Steverobbins/Slack/Model/Api/Chat.php(37): Steverobbins_Slack_Model_Api_Abstract->postMessage()
#3 /public_html/slack.php(7): Steverobbins_Slack_Model_Api_Chat->postMessage()
#4 {main}
thrown in <b>/public_html/app/Mage.php</b> on line <b>595</b><br />
Hi man, you have a great job here. Congrats!
One doubt. Can I use your API to make a frontend live chat for Magento 1.9? How would it work? Is there another git projects that I could see an example?
Thanks and have a nice week.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.