Froody
view release on metacpan or search on metacpan
lib/Froody/API/Reflection.pm view on Meta::CPAN
};
my $ERROR_INFO = q{
<errortype code="mycode">
Internal structure of your error type goes here (including XML)
</errortype>
};
return <<"XML";
<spec>
<methods>
<method name="froody.reflection.getMethodInfo">
<description>Returns information for a given froody API
method. As long as there is a method matching the given
method_name, returns description and usage of that method in
xml.
</description>
<response>
$METHOD_INFO
</response>
<arguments>
<argument name="method_name" optional="0">The name of the method to fetch information for.</argument>
</arguments>
<errors>
<error code="froody.error.notfound.method" message="Method not found">
The requested method was not found.
</error>
</errors>
</method>
<method name="froody.reflection.getMethods">
<description>Returns a list of available froody API methods.</description>
<response>
<methods>
<method>froody.reflection.getMethods</method>
<method>froody.reflection.getMethodInfo</method>
<method>bar.baz.blargle</method>
<method>heartofgold.towel.location</method>
</methods>
</response>
</method>
<method name="froody.reflection.getErrorTypes">
<description>Returns a list of all available froody error types for this repository.</description>
<response>
<errortypes>
<errortype>froody.error</errortype>
<errortype>froody.error.blog</errortype>
</errortypes>
</response>
</method>
<method name="froody.reflection.getErrorTypeInfo">
<description>Request information about an Error Type</description>
<arguments>
<argument name="code" optional="0">The code of the error type whose information is being requested.</argument>
</arguments>
<response>
$ERROR_INFO
</response>
<errors>
<error code="froody.error.notfound.errortype" message="Error Type not Found"/>
</errors>
</method>
<method name="froody.reflection.getSpecification">
<description>Request the full public specification for a froody endpoint.</description>
<response>
<spec>
<methods>
$METHOD_INFO
$METHOD_INFO
</methods>
<errortypes>
$ERROR_INFO
$ERROR_INFO
</errortypes>
</spec>
</response>
</method>
</methods>
<errortypes>
<errortype code="perl.methodcall.param">
<error name="foo">Problem</error>
<error name="bar">Problem</error>
</errortype>
</errortypes>
</spec>
XML
}
1;
( run in 0.696 second using v1.01-cache-2.11-cpan-39bf76dae61 )