Blog API endpoints
GET /blog #
Get a collection of all blog posts.
Resource URL
http://cdouglas.xyz/api/blog
Parameters
Name | Required? | Description | Default value |
---|---|---|---|
page | no | Specifies the page to retrieve for paginated results. If a page number is given that exceeds the range of pages, an empty list will be returned in the data. | 1 |
per_page | no | Specifies the maximum number of posts to return per page of paginated results. Actual number of posts returned may be less on the last page. Values larger than 100 will default to 100. | 10 |
Response object
{
"_links": {
"prev": <previous page URL>,
"next": <next page URL>,
"self": <this page URL>
},
"_meta": {
"page": result_page_number,
"per_page": posts_per_response,
"total_items": total_posts_in_query,
"total_pages": total_pages_in_query
},
"items": [post objects]
}
GET /blog/<simple-title> #
Get a Post object with body in ready-to-display HTML.
Resource URL
http://cdouglas.xyz/api/blog/simple_title
Parameters
None
Response object
{
"author": author_name,
"body": post_body_HTML,
"simple_title": simplified_post_title,
"summary": post_summary,
"tags": [],
"timestamp": timestamp_post_utc,
"title": full_post_title,
"url": absolute_url
}