crontis / trello-php
PHP 的 Trello API 封装器
dev-master
2020-04-30 18:25 UTC
Requires
- guzzlehttp/guzzle: ^6.5
This package is auto-updated.
Last update: 2024-09-29 05:36:18 UTC
README
使用 Guzzle 简单封装 PHP 的 Trello API 请求。此包目前不包含许多请求,但提供了一个构建的基础。
示例
获取 "Doing" 列表中指定板上的卡片。
<?php require_once __DIR__ . '/vendor/autoload.php'; $client = new \TrelloPhpApi\Client('[your api key]', 'your api token'); $lists = $client->send(new \TrelloPhpApi\Requests\Boards\GetListsOnABoard('id of board, can be seen in board url')); $doingList = []; foreach ($lists as $list) { if ($list['name'] === 'Doing') { $doingList = $list; break; } } $cards = $client->send(new \TrelloPhpApi\Requests\Lists\GetCardsInAList($doingList['id']));