PHP Trello API Wrapper

0.1.1 2014-03-03 22:18 UTC

This package is not auto-updated.

Last update: 2024-04-15 02:06:30 UTC


A PHP wrapper for the Trello API

This is still under heavy development and is not recommended for production use. Many methods are missing as this is just scaffolding for now.


Instantiate the client

$client = new \Trello\Client($api_key);

Get the authroization url to redrect the user to

$url = $client->getAuthorizationUrl('some app name', ''));
header("Location: {$url}");

Set the access token


Get organizations

$member_obj = new \Trello\Model\Member($client);
$orgs = $member_obj->getOrganizations();

Get a board

$board = $client->getBoard($board_id);

Another way to get a board (or any object)

$board = new \Trello\Model\Board($client);
$board = $board->get();

Get all cards for a board

$cards = $board->getCards();

Get a specific card for this board

$card = $board->getCard($card_id);

Update the card

$card->name = 'some new name';

Create a new card (or any object)

$card = new \Trello\Model\Card($client);
$card->name = 'some card name';
$card->desc = 'some card desc';
$card->idList = $list_id;