To XML-RPC or not to XML-RPC, that’s the question
-
Hi forum,
I’m working on something I was planning for a long time. I’m creating a full screen Flash theme for WordPress, combined with an easy to use ActionScript library to get the right kind of data out of WordPress. In my quest to find the best way to get data out of WordPress and into Flash, without re-inventing the wheel, I’m now examining the XML-RPC connector.
I’m running through all supported methods in the API list (by calling system.listMethods) to see what I can get from them. They’re also in xmlrpc.php, I’m using WP version 2.8.5.
There are three findings that strike me as odd, and I would very much like an educated opinion on them. I have the feeling I’m on a very wrong path here.
- Firstly, all of the methods need a user/password combination, even the ones I would consider to be “read only”. I just want to read the pages, categories, posts and comments, although maybe comments could be added later. To workaround this restriction I added a subscriber user to WordPress. I couldn’t care less if someone checks the posts for a subscriber role’s user/password.
- Secondly, even with a subscriber account, most of the methods ask for current_user_can(‘edit_posts’), something a subscriber can’t do of course. Even wp.getPages, wp.getCategories and blogger.getPost. Why is this? Is the XML-RPC connector only meant to be used for “write only” access, not “read or write” access?
- And finally, I was checking out a method called wp.getPageList, only to find out that the corresponding class method “wp_getPageList” does not exist! Try it out yourself! Is the XML-RPC a work-in-progress thing? Or am I so cross-eyed that I’m looking at the wrong code?
Or maybe I’m looking at the XML-RPC connector for the wrong kind of use all together, barking up the wrong tree so to speak?
Is there a better way to get raw, read-only content out of WordPress to use in a non-browser client like Flash?
I’d be much obliged for a little nudge in the right direction,
Eric-Paul
- The topic ‘To XML-RPC or not to XML-RPC, that’s the question’ is closed to new replies.