0.5.3 • Published 11 years ago

wordpress-client v0.5.3

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

Stories in Ready Dependency status Dev Dependency Status Master status Dev status Build Status Code Climate

WordPress XML-RPC client.

resources:

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