Get Page of Posts

This will retrieve a set number of posts of a given type. The number of posts returned is determined in the "config.php" file with the PAGE_SIZE variable.

The endpoint for this one is "get/page/{post_type}/{page_number}"

Example:

let postType = '...'
let pageNum = 0
fetch(`www.mysite.com/api/get/page/${postType}/${pageNum}`)
.then((blob) => {
return blob.json()
})
.then((data) => {
console.log(data.content)
})