kayako-api-function

Add a procedural Kayako API function to src/api.php with validation and try/catch blocks.

5|Updated Jul 10, 2017
One-click install
npx skills add https://github.com/myadmin-plugins/kayako-support --skill kayako-api-function
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kayako-api-function
Source: https://github.com/myadmin-plugins/kayako-support/tree/main/.claude/skills/kayako-api-function
Command: npx skills add https://github.com/myadmin-plugins/kayako-support --skill kayako-api-function

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It enables developers to safely extend a MyAdmin Kayako integration by adding a new procedural API function in src/api.php, enforcing validation-first input checks, isolated per-operation try/catch blocks, and consistent status reporting.

Core Features & Use Cases

  • Adds a new procedural API function to src/api.php following the project's validation-first, try/catch-per-operation pattern.
  • Initializes Kayako SOAP config, wraps each Kayako call in its own try/catch, returns status/status_text arrays.
  • Use when user says 'add API function', 'new ticket operation', 'create endpoint in api.php', or 'add support function'.
  • Do NOT use for modifying src/Plugin.php hook registration or for class-based API work.

Quick Start

Define the function in src/api.php with a PHPDoc block and implement the described validation, ownership checks, SOAP init, and per-operation try/catch blocks.

Frequently Asked Questions about kayako-api-function

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new procedural Kayako API function in PHP with proper error handling?

To add a Kayako API function, define it in src/api.php using validation-first input checks, wrap each SOAP call in its own try/catch block, and return a standardized status/status_text array for consistent error reporting.

What is the validation-first pattern for Kayako SOAP API integration?

The validation-first pattern requires checking inputs before executing operations, initializing Kayako SOAP config, isolating each API call in a per-operation try/catch, and returning a standardized status array to ensure safe ownership verification.

How do I standardize error reporting for ticket operations in a Kayako integration?

Standardize error reporting by returning a consistent status/status_text array from every procedural function, ensuring that create, view, and reply ticket operations handle exceptions uniformly through isolated try/catch blocks.

Can I use this approach to modify class-based API logic or hook registrations in Plugin.php?

No, this approach applies exclusively to procedural functions in src/api.php. You should not use it for modifying src/Plugin.php hook registration or for implementing class-based API work.

When do I need per-operation try/catch blocks for Kayako API calls?

You need per-operation try/catch blocks when adding ticket-related API enhancements like creating, viewing, or replying to tickets, ensuring safe ownership checks and isolating SOAP failures without disrupting the entire request.

Why does my Kayako API function fail to return a consistent status response?

Your Kayako API function likely lacks the standardized status/status_text array return format or is missing per-operation try/catch blocks, which are required to preserve safe ownership checks and consistent error reporting.