wordpress-client
v0.5.3
Published
WordPress XML-RPC client.
Downloads
4
Readme
WordPress XML-RPC client.
resources:
- "https://usabilitydynamics.com/technical/project-yaml/"
- "https://github.com/scottgonzalez/grunt-wordpress"
- "https://www.npmjs.org/package/grunt-wordpress-deploy"
- "https://www.npmjs.org/package/wp-util"
- "https://www.npmjs.org/package/wordpress-rpc"
Features
- Automated batching of RPC calls.
Methods
Instance methods resemble WordPress functions used in PHP development.
- client.insertPost()
- client.uploadFile()
Usage
// Load module and create an instance.
var client = require( 'wordpress-client' ).create({
url: 'http://my-site.com/xmlrpc.php',
username: 'admin',
password: 'secret-password'
});
// Uplaod File
client.uploadFile({
'name': 'my_file.jpg',
'bits': require( 'fs' ).readFileSync( './path/to/file.jpeg' )
});
Notes
- All callbacks are called in context of client's instance.
- Authenticated vs non-authenticated calls are automatically selected based on type of endpoint.
- BlogID is automatically selected based on url