wordpress-client

0.5.3 • Public • Published

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

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

Readme

Keywords

Package Sidebar

Install

npm i wordpress-client

Weekly Downloads

0

Version

0.5.3

License

none

Last publish

Collaborators

  • andy.potanin
  • hunterman