定制 deltasystems/teamwork-desk 二次开发

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

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

deltasystems/teamwork-desk

Composer 安装命令:

composer require deltasystems/teamwork-desk

包简介

A PHP Wrapper for the Teamwork Desk API

README 文档

README

I wrote this completely out of necessity. As of writing this there are no other PHP wrappers for this API, Zapier doesn't support it, and no one that I can find is talking about it. We wanted to switch to Teamwork Desk from Zendesk because of the great integrations with Teamwork Projects, and some of the useful features Teamwork Desk offers are not available in Zendesk.

As for the API, I found some API-looking calls when I watch the network usage in Teamwork Desk, and I assumed the authentication would be the same as Teamwork Projects. After some testing, I found that the API exists and the offical Teamwork Desk documentation can be found here. Feel free to suggest changes and additions.

Getting Started:

Define two constants, TEAMWORK_DESK_DOMAIN and TEAMWORK_DESK_KEY with your Teamwork Desk domain and your API key.

<?php
define('TEAMWORK_DESK_DOMAIN',   'something.teamwork.com');
define('TEAMWORK_DESK_KEY',      'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');

Next, there are some classes you can use:

$alert          = new Teamwork\Desk\Alert();
$customer       = new Teamwork\Desk\Customer();
$inbox          = new Teamwork\Desk\Inbox();
$plan           = new Teamwork\Desk\Plan();
$setting        = new Teamwork\Desk\Setting();
$ticket         = new Teamwork\Desk\Ticket();
$ticketPriority = new Teamwork\Desk\TicketPriority();
$ticketSource   = new Teamwork\Desk\TicketSource();
$ticketStatus   = new Teamwork\Desk\TicketStatus();
$ticketType     = new Teamwork\Desk\TicketType();
$user           = new Teamwork\Desk\User();

From there, there are some common methods:

$ticket->getAll(['sortBy' => 'id']);
$ticket->get(12345);
$user->getByName('Stuart');

Also, you can access properties of the objects like this:

echo $ticket->subject;
$ticketNumber = $ticket->id;

You can create an object like this:

$inbox  = new Teamwork\Desk\Inbox();
$ticket = new Teamwork\Desk\Ticket();
$ticket->customerEmail = 'user@example.com';
$ticket->subject       = 'Server on fire!';
$ticket->message       = 'The server is actually on fire!';
$ticket->priority      = 'High';
$ticket->inboxId       = $inbox->getByName('Server Stuff');
$ticket->create();

统计信息

  • 总下载量: 1.64k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 15
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 15
  • Watchers: 12
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-09-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固