Proposal:GenericAPIRegistryFramework
From Movable Type
Contents |
Abstract
Provide a standardized way for registering SOAP methods, XML-RPC methods and JSON-RPC methods via the registry. This would generally make it a lot easier for developers to register new methods without having to worry about the overhead of authentication or anything like that.
Problem Statements
- It is not intuitive on how to add new web services interfaces.
- Movable Type does not follow a standard pattern for implementing "methods". Logically RPC calls should mimic the same pattern established by the `cms` application.
- There is too much overhead for handling authentication and so forth - developers have to write too much code.
- Documentation becomes needlessly complex because there is no clean interface for XML-based APIs.
Use Cases
- Developer wants to expose new calls for accessing their plugin via a standard web services interface.
- Developer wants to create new JSON methods.
- MT Core Development team wants to easily add new API methods quickly and easily.
Example config.yaml
key: ExamplePlugin
name: Example Plugin
applications:
xmlrpc:
wp.page: '$XMLRPCServer::XMLRPCServer::App::wp.page'
my.method: '$Example::Example::Plugin::my.method'
my.other.method:
requires_auth: 0
handler: '$Example::Example::Plugin::my.method'