innovaat/topdesk-api
Composer 安装命令:
composer require innovaat/topdesk-api
包简介
A PHP implementation for the TOPdesk API
README 文档
README
A PHP wrapper for the TOPdesk API.
Installation
composer require innovaat/topdesk-api
Guide
Our TOPdesk API implementation contains the following features:
- Simple login using application passwords (recommended) or tokens (legacy).
- Automatic retry functionionality that retries requests when connection errors or status codes >= 500 occur. We have experienced various instabilities with the TOPdesk API, and hopefully this minimizes these shortcomings.
- Direct function calls for much used api endpoints (
createIncident($params),getIncidentById($id),getListOfIncidents(),escalateIncidentById($id),deescalateIncidentById($id),getListOfDepartments(),createDepartment($params),getListOfBranches(),createBranch($params)among others). - Easy syntax for all other endpoints using
$api->request($method, $uri, $json = [], $query = []).
// Create a new API instance, endpoint should end on "/tas/". $api = new \Innovaat\Topdesk\Api('https://partnerships.topdesk.net/tas/');
Call either useLogin or useApplicationPassword depending on your authentication choice:
// RECOMMENDED $api->useApplicationPassword('yourusername', 'ipsal-a7aid-6ybuq-ucjwg-axt4i');
// LEGACY LOGIN WITH TOKEN $api->useLogin('yourusername', 'yourpassword', function($token) { // Callback function that receives a single parameter `$token` for you to persist. // It should return the persisted token as well. if($token) { file_put_contents('token.txt', $token); } return file_exists('token.txt') ? file_get_contents('token.txt') : null; });
Now your API should be ready to use:
$incidents = $api->getListOfIncidents([ 'start' => 0, 'page_size' => 10 ]); foreach($incidents as $incident) { var_dump($incident['number']); }
Many requests have been implemented as direct functions of the API. However, not all of them have been implemented.
For manual API requests, use the request() function:
$api->request('GET', 'api/incidents/call_types', [ // Optional array to be sent as JSON body (for POST/PUT requests). ], [ // Optional (search) query parameters, see API documentation for supported values. ], [ // Optional parameters for the Guzzle request itself. // @see http://docs.guzzlephp.org/en/stable/request-options.html ])
Documentation
innovaat/topdesk-api 适用场景与选型建议
innovaat/topdesk-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 34.13k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2019 年 10 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「topdesk」 「innovaat」 「itil」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 innovaat/topdesk-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 innovaat/topdesk-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 innovaat/topdesk-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The TestMonitor TOPdesk client.
A PSR-7 compatible library for making CRUD API endpoints
A Laravel Service Provider for the TOPdesk API
A lightweight plain-PHP framework for database-backed CRUD APIs.
Modern, strongly-typed, PSR-compliant PHP client for the WeFact v2 API.
PHP SDK for the Enconvert file conversion API
统计信息
- 总下载量: 34.13k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-10-03