search
Homephp教程php手册Kayako REST API使用详解三

Kayako REST API使用详解三

Jun 06, 2016 pm 08:08 PM
apirestmainuseexplainDetailed explanation

前2节中主要讲解Kayako REST API 的理论知识和自定义请求方法。 本节主要讲解Kayako PHP API 类,也叫Kayako PHP SDK。 要求环境 Kayako 要使用Kayako REST API,首先你需要安装Kayako 并启用REST API。登录到管理控制面板,在右侧的“选项”菜单,选择REST

前2节中主要讲解Kayako REST API 的理论知识和自定义请求方法。

本节主要讲解Kayako PHP API 类,也叫Kayako PHP SDK。

Kayako PHP API Library & SDK 中文

要求环境

Kayako
要使用Kayako REST API,首先你需要安装Kayako 并启用REST API。登录到管理控制面板,在右侧的“选项”菜单,选择REST API,然后设置。接下来,设置启用API接口,点击“更新”按钮,确认更改。详情见Kayako REST API使用详解一

PHP
PHP API SDK需要版本5.3.0或更高版本的PHP环境,PHP支持的功能:libXML, cURL, hash, fileinfo 和 date/time。

Kayako PHP API Library
可下载的最新版本地址:http://forge.kayako.com/projects/kayako-php-api-library

Kayako API 初始化

要设置Kayako PHP API客户端,首先你需要加载文件kyIncludes.php。然后您必须初始化客户端API网址,API密钥和API密钥。请看下面的代码片段:

//include all necessary classes and helper methods
require_once("kyIncludes.php");
 
//initialize the client
kyConfig::set(new kyConfig("", "", ""));

或者

// Kayako API 配置
define(‘BASE_URL’, ‘’);
define(‘API_KEY’, ‘’);
define(‘SECRET_KEY’, ‘’);

// Include Library
require_once("KayakoAPISDK/kyIncludes.php");

// Kayako API 初始化
kyConfig::set(new kyConfig(BASE_URL, API_KEY, SECRET_KEY));

注意:请改变 , 的值为您所安装的Kayako REST API信息。

Kayako PHP API 类层次结构图

Kayako Class Graph Kayako PHP API 类层次结构图

SDK的关键概念是对象。对象有以下类型:

  • CustomFieldDefinition
  • Department
  • Staff
  • StaffGroup
  • Ticket
  • TicketAttachment
  • TicketCustomFieldGroup
  • TicketNote
  • TicketPost
  • TicketPriority
  • TicketStatus
  • TicketTimeTrack
  • TicketType
  • User
  • UserGroup
  • UserOrganization

(...)
Read the rest of Kayako REST API使用详解三 (290 words)


© lixiphp for LixiPHP, 2013. | Permalink | No comment | Add to del.icio.us
Post tags: API, Kayako, PHP, REST API, SDK, 对象, 类层次结构图

Feed enhanced by Better Feed from Ozh

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools