Get All Posts
This is an endpoint that retrieves an array of all posts of a specific type. The actual endpoint is: "get/posts/{post_type}". There is no limit to the number of posts returned.
Example:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let postType = '...' | |
| fetch(`www.mysite.com/api/get/posts/${postType}`) | |
| .then((blob) => { | |
| return blob.json() | |
| }) | |
| .then((data) => { | |
| console.log(data.content) | |
| }) |