定制 dlowhorn/php-trello 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dlowhorn/php-trello

Composer 安装命令:

composer require dlowhorn/php-trello

包简介

PHP-based Trello API Wrapper, based on mattzuba/php-trello

关键字:

README 文档

README

Home page: https://github.com/dlowhorn/php-trello

This wrapper is a slightly updated version of Matt Zuba's php-trello package, hosted for years on bitbucket, but disappeared after Bitbucket dropped support for Mercurial.

php-trello is a PHP-based wrapper for the Trello API. Its functionality is very similar to the Trello-made client.js library. It also supports OAuth authorization.

This is a basic Trello PHP wrapper that is used very similar to the Trello-made client.js library. The method calls are the same (ie: Trello->post() or Trello->boards->get()). See https://trello.com/docs/gettingstarted/clientjs.html for detailed information.

Some differences - you cannot specify callbacks for success or error. If they're requested I may add them in, but it's not really my style to pass callbacks like that around PHP when I can simply return the data instead.

Trello::authorize here does OAuth authentication, so you must pass your Secret Key to the constructor or set it after instantiation before calling the authorize method. Some parameters are the same as client.js (name, scope, expiration) and there is one extra (redirect_uri) for the OAuth callback.

Go to https://trello.com/1/appKey/generate to get your API and OAuth keys

Example Usage

Basic Usage

Read a public board (Trello)

:::php
    <?php
    $key = 'yourkey';
    $trello = new \Trello\Trello($key);
    var_dump($trello->boards->get('4d5ea62fd76aa1136000000c'));

Pre-existing key/token combo and read your boards

:::php
    <?php
    $key = 'yourkey';
    $token = 'yourjavascripttoken';
    $trello = new \Trello\Trello($key, null, $token);
    var_dump($trello->members->get('my/boards')));

OAuth Usage

Authorize and get your boards

:::php
    <?php
    $key = 'yourkey';
    $secret = 'yoursecret';
    $trello = new \Trello\Trello($key, $secret);
    $trello->authorize(array(
        'expiration' => '1hour',
        'scope' => array(
            'read' => true,
        ),
        'name' => 'My Test App'
    ));
    var_dump($trello->members->get('my/boards'));

Pre-existing OAuth authorization and get your boards

:::php
    <?php
    $key = 'yourkey';
    $secret = 'yoursecret';
    $oauth_token = 'youroauthtoken';
    $oauth_secret = 'youroauthsecret';
    $trello = new \Trello\Trello($key, $secret, $oauth_token, $oauth_secret);
    var_dump($trello->members->get('my/boards'));

dlowhorn/php-trello 适用场景与选型建议

dlowhorn/php-trello 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 353 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 11 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「api」 「trello」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 dlowhorn/php-trello 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dlowhorn/php-trello 我们能提供哪些服务?
定制开发 / 二次开发

基于 dlowhorn/php-trello 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 353
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MPL-2.0-no-copyleft-exception
  • 更新时间: 2020-11-20