Currently only way to query custom content types is with .root method.
/**
* Generate a query against an arbitrary path on the current endpoint. This is useful for
* requesting resources at custom WP-API endpoints, such as WooCommerce's `/products`.
*
* @method root
* @param {String} [relativePath] An endpoint-relative path to which to bind the request
* @param {Boolean} [collection] Whether to return a CollectionRequest or a vanilla WPRequest
* @return {CollectionRequest|WPRequest} A request object
*/
It'd be great to be able to define your own custom content types so one would be able to use those just like .posts and .pages . I have some ideas how to achieve this, will try to do a pull request soon.
Currently only way to query custom content types is with .root method.
It'd be great to be able to define your own custom content types so one would be able to use those just like .posts and .pages . I have some ideas how to achieve this, will try to do a pull request soon.