1. Go to this page and download the library: Download mremi/flowdock library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mremi / flowdock example snippets
use Mremi\Flowdock\Api\Push\ChatMessage;
use Mremi\Flowdock\Api\Push\Push;
$message = ChatMessage::create()
->setContent('This message has been sent with mremi/flowdock PHP library')
->setExternalUserName('mremi')
->addTag('#hello-world');
$push = new Push('your_flow_api_token');
if (!$push->sendChatMessage($message, array('connect_timeout' => 1, 'timeout' => 1))) {
// handle errors...
$message->getResponseErrors();
}
use Mremi\Flowdock\Api\Push\Push;
use Mremi\Flowdock\Api\Push\TeamInboxMessage;
$message = TeamInboxMessage::create()
->setSource('source')
->setFromAddress('[email protected]')
->setSubject('subject')
->setContent('This message has been sent with mremi/flowdock PHP library');
$push = new Push('your_flow_api_token');
if (!$push->sendTeamInboxMessage($message, array('connect_timeout' => 1, 'timeout' => 1))) {
// handle errors...
$message->getResponseErrors();
}
bash
$ php composer.phar update mremi/flowdock
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.