These are chat archives for WP-API/node-wpapi

15th
Nov 2017
mmmarquez
@mmmarquez
Nov 15 2017 15:15
Is it possible to query Custom Post Types with this client? -- can't seem to find clear documentation if this! Thanks !
Maher Gallaoui
@mgallaoui_twitter
Nov 15 2017 16:56
yes @mmmarquez its already possible see this code snippet let wp = new WPAPI({ endpoint: "http://url/wp-json", username: "username", password: "password" }); wp.productsAPI = wp.registerRoute("wp/v2", "/products/");
wp .productsAPI() .create({} ) .then(function(response) { console.log("post", response, "post"); })
u will post your new items to /products/