1. Go to this page and download the library: Download quickhelper/quicktrello 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/ */
quickhelper / quicktrello example snippets
use QuickTrello\Facades\QuickTrello;
// Get all boards
$boards = QuickTrello::getBoards();
// Get a specific board
$board = QuickTrello::getBoard('board_id');
// Get board members
$members = QuickTrello::getBoardMembers('board_id');
// Get lists for a board
$lists = QuickTrello::getLists('board_id');
// Create a new list
$list = QuickTrello::createList('board_id', 'List Name', [
'pos' => 'top' // Optional position ('top', 'bottom', or a position value)
]);
// Update a list
$list = QuickTrello::updateList('list_id', [
'name' => 'New List Name',
'pos' => 'bottom'
]);
// Archive a list
$list = QuickTrello::archiveList('list_id', true); // Archive
$list = QuickTrello::archiveList('list_id', false); // Unarchive
// Get cards for a list
$cards = QuickTrello::getCards('list_id');
// Create a card
$card = QuickTrello::createCard('list_id', 'Card title', [
'desc' => 'Card description',
'due' => '2025-03-01',
'pos' => 'top'
]);
// Update a card
$card = QuickTrello::updateCard('card_id', [
'name' => 'Updated Card Title',
'desc' => 'Updated description'
]);
// Move a card to another list
$card = QuickTrello::moveCard('card_id', 'new_list_id');
// Add a comment to a card
$comment = QuickTrello::addComment('card_id', 'This is a comment');
// Add a label to a card
$label = QuickTrello::addLabel('card_id', 'label_id');
// Remove a label from a card
$result = QuickTrello::removeLabel('card_id', 'label_id');
// Add a due date to a card
$card = QuickTrello::addDueDate('card_id', '2025-03-01T12:00:00Z');
// Get all board members
$members = QuickTrello::getBoardMembers('board_id');
// Get all organization members
$members = QuickTrello::getOrganizationMembers('org_id');
// Assign a member to a card
$result = QuickTrello::assignMemberToCard('card_id', 'member_id');
// Remove a member from a card
$result = QuickTrello::removeMemberFromCard('card_id', 'member_id');
// Get members assigned to a card
$members = QuickTrello::getCardMembers('card_id');
// Add a checklist to a card
$checklist = QuickTrello::addChecklist('card_id', 'Checklist Name');
// Add an item to a checklist
$item = QuickTrello::addChecklistItem('checklist_id', 'Checklist Item');
// Create a webhook
$webhook = QuickTrello::createWebhook(
'https://your-app.com/api/trello/webhooks',
'model_id', // board_id, card_id, etc.
'Description of webhook'
);
// Get all webhooks
$webhooks = QuickTrello::getWebhooks();
// Delete a webhook
$result = QuickTrello::deleteWebhook('webhook_id');
// In your EventServiceProvider
Event::listen('quicktrello.webhook_received', function ($payload) {
// Handle all webhook events
});
// Listen for specific event types
Event::listen('quicktrello.createCard', function ($payload) {
// Handle card creation events
});
Event::listen('quicktrello.updateCard', function ($payload) {
// Handle card update events
});
Event::listen('quicktrello.addMemberToCard', function ($payload) {
// Handle when a member is assigned to a card
});
Event::listen('quicktrello.createList', function ($payload) {
// Handle list creation events
});