opensrs-api-method

Add OpenSRS API methods as public static functions in OpenSRS.php.

6|1|Updated Jun 8, 2017
One-click install
npx skills add https://github.com/myadmin-plugins/opensrs-domains --skill opensrs-api-method
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opensrs-api-method
Source: https://github.com/myadmin-plugins/opensrs-domains/tree/main/.claude/skills/opensrs-api-method
Command: npx skills add https://github.com/myadmin-plugins/opensrs-domains --skill opensrs-api-method

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables developers to extend OpenSRS integration by introducing new public static API wrapper methods into OpenSRS.php, following established conventions.

Core Features & Use Cases

  • Creates static API wrappers that call either self::request(...) (JSON path) or self::xmlRequest(...) (XML path) based on the OpenSRS action.
  • Logs requests with request_log() and myadmin_log(), and returns the raw API response or false on error.
  • Supports common transfer or domain actions by following existing method patterns such as lookupGetDomain, transCancel, etc. Use case: when adding a new wrapper for a domain operation like lock or transfer.

Quick Start

Identify the OpenSRS API action from bin scripts and implement a new public static method in src/OpenSRS.php using the appropriate request path with proper logging and a false-on-error return.

Frequently Asked Questions about opensrs-api-method

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

FAQPage Schema
How do I add new OpenSRS API methods to a PHP integration?

To add new OpenSRS API methods, implement public static functions inside OpenSRS.php that use self::request() for JSON or self::xmlRequest() for XML calls, logging with request_log() and myadmin_log() while returning the API response or false on error.

What is the correct way to structure OpenSRS domain operations in PHP?

OpenSRS domain operations are structured as public static methods within OpenSRS.php, following existing patterns like lookupGetDomain or transCancel by analyzing bin scripts to identify the correct API action names and request paths.

Does OpenSRS API integration support both XML and JSON request paths?

Yes, OpenSRS integration supports both XML and JSON request paths, routing actions through self::request() for JSON processing or self::xmlRequest() for XML processing depending on the specific OpenSRS API action being called.

How do I find the available OpenSRS API actions before writing a wrapper method?

You find available OpenSRS API actions by analyzing existing bin scripts, which contain the function names needed to implement new public static wrapper methods in src/OpenSRS.php for domain operations and transfers.

Why does my OpenSRS API wrapper return false instead of a response?

An OpenSRS API wrapper returns false on error, which occurs when the static method fails to successfully execute the self::request() or self::xmlRequest() call, with failure details logged via request_log() and myadmin_log().

Can I extend OpenSRS functionality for domain transfers using static methods?

Yes, you can extend OpenSRS functionality for domain transfers by adding public static methods that follow established patterns like transCancel, routing transfer actions through the appropriate JSON or XML request backend with proper logging.