Created
August 21, 2016 13:25
-
-
Save DZunke/0e759304a074d103bc62bed1d7e9ea80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once __DIR__ . '/vendor/autoload.php'; | |
require_once __DIR__ . '/vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php'; | |
$identity = new \DZunke\SlackBundle\Slack\Messaging\Identity(); | |
$identity->setUsername('CoffeeBrewer'); | |
$identity->setIconEmoji(':coffee:'); | |
$connection = new \DZunke\SlackBundle\Slack\Client\Connection(); | |
$connection->setEndpoint('https://slack.com/api'); | |
$connection->setToken('MY_TOKEN'); | |
$client = new \DZunke\SlackBundle\Slack\Client($connection); | |
$response = $client->send( | |
\DZunke\SlackBundle\Slack\Client\Actions::ACTION_POST_MESSAGE, | |
[ | |
'identity' => $identity, | |
'channel' => '#slack-testing', | |
'text' => 'Good Morning, please make sure u got a coffee before working!' | |
] | |
); | |
dump($response); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment