rooftop
node api client for Rooftop CMS
Note: This project is in early development, and versioning is a little different. Read this for more details.
Installation
npm i rooftop-client -S
Note: This project only supports Node 6+
Usage
const Rooftop = const api = Rooftop // get all postsapiposts // get all case studies (custom field example)apicaseStudies // get the first 5 postsapiposts // get only posts with content matching the search query// see http://v2.wp-api.org/reference/posts/ for possible paramsapiposts
Testing
To run the tests locally, you'll need to add a test/.env
with your name and token values:
cp test/.env.sample test/.env
name
is derived from your Rooftop url. Assuming your URL is https://myproject.rooftop.io then myproject is your name valuetoken
can be found https://[myproject].rooftopcms.io/wp-admin/admin.php?page=rooftop-overview
License & Contributing
- Details on the license can be found here
- Details on running tests and contributing can be found here