letrunghieu / wordpress-xmlrpc-client

A PHP XML-RPC client for Wordpress websites
MIT License
117 stars 43 forks source link

Extending the API #5

Closed lracicot closed 10 years ago

lracicot commented 10 years ago

In wordpress, it is possible to extends the API by adding available methods. There is also some plugins to do it. Example: https://wordpress.org/plugins/extended-xml-rpc-api/

It would be interesting if could also extends this client. A very simple way I saw could be to change the visibility of the _sendRequest() method to protected. A more complicated (but cleaner) way could be to separate in two classes what I call "the frontend" of the client (the method we can call) and the "API connector" (all the request and curl stuff).

If the feature is accepted I may send a pull request whenever I have the time.

letrunghieu commented 10 years ago

Thank you @lracicot :)

I'd like to keep methods in one class like it be now. However we can create a public method to call XML-RPC remote method by passing the method name aside the method parameters.

letrunghieu commented 10 years ago

I have merged #8. Closed.