I managed to do this by reading the module itself.
First you start the client:
var wp = wordpress.createClient({ "url": 'http://yourwordpressURL', "username": 'user', "password": 'pwd' });
than adding a message, for example, just make the following call:
wp.newPost({ title: 'Your title', status: 'publish', //'publish, draft...', content: '<strong>This is the content</strong>', author: 3, // author id terms: {'category': [category_id]} }, function() { console.log(arguments); } });
All documentation for wordpress is at http://codex.wordpress.org/XML-RPC_WordPress_API/Posts
Hope this helps.
source share