2017 © Pedro Peláez
 

library phpflow

PHP Library for Flowdock API usage

image

flim/phpflow

PHP Library for Flowdock API usage

  • Saturday, September 20, 2014
  • by flim
  • Repository
  • 1 Watchers
  • 5 Stars
  • 199 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 3 Versions
  • 30 % Grown

The README.md

PHPFlow

PHP Library for Flowdock API use, (*1)

Installation

Install composer in the project, (*2)

curl -sS https://getcomposer.org/installer | php
php composer.phar install

Then insert composer autoload requirement line in your project, (*3)

require_once __DIR__ . '/vendor/autoload.php';

Usage

Push message

Write message to CHAT

PHPFlow::pushToChat("flow_token", "Hello world!", "PHPFlow");

Write message to TEAM INBOX

PHPFlow::pushToTeamInbox("flow_token", "the_source", "email", "the_subject", "the_content", array("tags" => "#important, hardwork, @everyone"));

Users

Get all users

$results = PHPFlow::getUsers("user_api_token");
if (false !== $results) {
    print_r(json_decode($results));
}

Get flow users

$results = PHPFlow::getFlowUsers("user_api_token", "company", "flow");
if (false !== $results) {
    print_r(json_decode($results));
}

Get a user

$results = PHPFlow::getUser("user_api_token", "user_id");
if (false !== $results) {
    print_r(json_decode($results));
}

Flows

Get all flows

$results = PHPFlow::getAllFlows("user_api_token");
if (false !== $results) {
    print_r(json_decode($results));
}

Streaming

Stream message from a flow

PHPFlow::streamFlow("user_api_token", "company", "flow", 'callback');

// Must return strlen($data)
function callback($ch, $data)
{
    print_r($data);
    return strlen($data);
}

Stream message from flows

PHPFlow::streamFlows("user_api_token", array("company/flow", "company/flow2"), 'callback');

// Must return strlen($data)
function callback($ch, $data)
{
    print_r($data);
    return strlen($data);
}

The Versions

20/09 2014

dev-master

9999999-dev http://github.com/flim/phpflow

PHP Library for Flowdock API usage

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api php flowdock

20/09 2014

v1.0

1.0.0.0 http://github.com/flim/phpflow

PHP Library for Flowdock API usage

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api php flowdock

20/08 2013

1.0.1

1.0.1.0 http://github.com/flim/phpflow

PHP Library for Flowdock API usage

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api php flowdock