Skip to content

Latest commit

 

History

History
27 lines (24 loc) · 418 Bytes

README.md

File metadata and controls

27 lines (24 loc) · 418 Bytes

WP Request

Javascript library for querying the WordPress REST API v2.

Examples

var wordpress = new WPRequest({
  url : 'http://localhost'
});

wordpress.query({
  method   : 'GET',
  post_type: 'post'
}, function(error, response) {
  ...
});

wordpress.query({
  method   : 'GET',
  post_type: 'post',
  filter   : {
    type : 'id',
    value: 100
  }
}, function(error, response) {
  ...
});