2017 © Pedro Peláez
 

library php-trello-api

Trello API v1 client

image

takatost/php-trello-api

Trello API v1 client

  • Tuesday, July 31, 2018
  • by takatost
  • Repository
  • 1 Watchers
  • 0 Stars
  • 277 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 72 Forks
  • 0 Open issues
  • 6 Versions
  • 454 % Grown

The README.md

PHP Trello API v1 client

Build Status Code Coverage Code Quality Packagist, (*1)

A simple Object Oriented wrapper for the Trello API, written in PHP5., (*2)

Uses Trello API v1. The object API is very similar to the RESTful API., (*3)

Features

  • Follows PSR-0 conventions and coding standards: autoload friendly
  • Light and fast thanks to lazy loading of API classes
  • Extensively tested

Requirements

Installation

The recommended way is using composer:, (*4)

$ composer require cdaguerre/php-trello-api:@dev

However, php-trello-api follows the PSR-0 naming conventions, which means you can easily integrate php-trello-api class loading in your own autoloader., (*5)

Basic usage

use Trello\Client;

$client = new Client();
$client->authenticate('api_key', 'token', Client::AUTH_URL_CLIENT_ID);

$boards = $client->api('member')->boards()->all();

The $client object gives you access to the entire Trello API., (*6)

Advanced usage with the Trello manager

This package includes a simple model layer above the API with a nice chainable API allowing following manipulation of Trello objects:, (*7)

use Trello\Client;
use Trello\Manager;

$client = new Client();
$client->authenticate('api_key', 'token', Client::AUTH_URL_CLIENT_ID);

$manager = new Manager($client);

$card = $manager->getCard('547440ad3f8b882bc11f0497');

$card
    ->setName('Test card')
    ->setDescription('Test description')
    ->save();

Dispatching Trello events to your app

The service uses the Symfony EventDispatcher component to dispatch events occuring on incoming webhooks., (*8)

Take a look at the Events class constants for names and associated event classes., (*9)

use Trello\Client;
use Trello\Service;
use Trello\Events;

$client = new Client();
$client->authenticate('api_key', 'token', Client::AUTH_URL_CLIENT_ID);

$service = new Service($client);

// Bind a callable to a given event...
$service->addListener(Events::BOARD_UPDATE, function ($event) {
    $board = $event->getBoard();

    // do something
});

// Check if the current request was made by a Trello webhook
// This will dispatch any Trello event to listeners defined above
$service->handleWebhook();

Documentation

Contributing

Feel free to make any comments, file issues or make pull requests., (*10)

License

php-trello-api is licensed under the MIT License - see the LICENSE file for details, (*11)

Credits

  • Largely inspired by the excellent php-github-api developed by the guys at KnpLabs
  • Thanks to Trello for the API and documentation.

The Versions

31/07 2018

dev-master

9999999-dev https://github.com/takatost/php-trello-api

Trello API v1 client

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Wang

trello

31/07 2018

0.9.5

0.9.5.0 https://github.com/takatost/php-trello-api

Trello API v1 client

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Wang

trello

03/01 2018

0.9.4

0.9.4.0 https://github.com/takatost/php-trello-api

Trello API v1 client

  Sources   Download

MIT

The Requires

 

The Development Requires

by John Wang

trello

16/06 2015

0.9.3

0.9.3.0 https://github.com/cdaguerre/php-trello-api

Trello API v1 client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Daguerre

trello

04/06 2015

0.9.2

0.9.2.0 https://github.com/cdaguerre/php-trello-api

Trello API v1 client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Daguerre

trello

16/12 2014

0.9.1

0.9.1.0 https://github.com/cdaguerre/php-trello-api

Trello API v1 client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Daguerre

trello