node-wp
v0.0.2
Published
WordPress API Wrapper For Node.js
Downloads
4
Readme
node-wp
WordPress API Wrapper For Node.js
Installation
$ npm install --save node-wp
Usage
var
NodeWP = require('node-wp')
, wp = new NodeWP('YOUR_API_ENDPOINT');
wp
.posts({
page: 1,
per_page: 5
})
.then(function (posts) {
posts.forEach(function (post) {
console.log( post.slug );
});
})
.catch(function (err) {
console.log('ERROR!');
});
Methods availables
All methods parameters can be found on API documentation
Posts
wp.posts( [parameters] )
Pages
wp.pages( [parameters] )
Media
wp.media( [parameters] )
Comments
wp.comments( [parameters] )
Pages
wp.pages( [parameters] )
Taxonomies
wp.taxonomies( [parameters] )
Categories
wp.categories( [parameters] )
Tags
wp.tags( [parameters] )
Users
wp.users( [parameters] )
Author
- Email: [email protected]
- Twitter: @sdecamme
- Website: http://sebastiendecamme.fr
Copyright and license
Copyright 2014-2015 Sébastien Decamme. Released under MIT.