blomstra/trello-php
最新稳定版本:0.1.0
Composer 安装命令:
composer require blomstra/trello-php
包简介
PHP Trello API Wrapper (+missing models) from https://github.com/sanovskiy/Trello-API-PHP-Wrapper
README 文档
README
A PHP wrapper for the Trello API
This repo contains a fix to use this library with php7.2+
Installation
$ composer require blomstra/trello-php
Usage
Instantiate the client
$client = new \Trello\Client($api_key);
Get the authroization url to redrect the user to
$url = $client->getAuthorizationUrl('some app name', 'http://myapp.com/returnurl')); header("Location: {$url}");
Set the access token
$client->setAccessToken($returned_token);
Get organizations
$member_obj = new \Trello\Models\Member($client); $member_obj->setId('userid'); $orgs = $member_obj->getOrganizations();
Get a board
$board = $client->getBoard($board_id);
Another way to get a board (or any object)
$board = new \Trello\Models\Board($client); $board->setId($board_id); $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'; $card->save();
Create a new card (or any object)
$card = new \Trello\Models\Card($client); $card->name = 'some card name'; $card->desc = 'some card desc'; $card->idList = $list_id; $card->save();
统计信息
- 总下载量: 637
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-09