node-wp

    0.0.2 • Public • Published

    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

    Copyright and license

    Copyright 2014-2015 Sébastien Decamme. Released under MIT.

    Install

    npm i node-wp

    DownloadsWeekly Downloads

    2

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • sdecamme