Template Api
Last Updated: 2023-10-28 04:05:45
/category/list
The first call is without any variables and returned a list defaulting to the first page, 10 records and in ascending order. For example, { api /api/blog/category/list as categories }
/category/list/{ page:[ digits ] }
The first variable represents which page of categories to retrieve. It has a restriction and is defined as a numeric value. For example, { api /api/blog/category/list/1 as categories }
/category/list/{ page:[ digits ] }/{ rows:[ digits ] }
The second variable represents the number of records a collection will contain. It too has a restriction and is defined with a numeric value. For example, { api /api/blog/category/list1/10 as categories }
Changing the number of records returned also affects the number of pages. For example, if you have 20 categories and retrieve page 2 with 10 rows but then decide to set rows to 20 records. The second page will be empty.
/category/list/{ page:[ digits ] }/{ rows:[ digits ] }/{ sort:[ asc|desc ] }
The last variable represents what sort order the categories are returned in. It has a restriction and is defined as either asc or desc. For example, { api /api/blog/category/list/1/desc as categories }
Note: Maple syntax is not dynamic meaning you will not be able to use a variable to represent an inline variable.
/tag/list
For example, { api /api/blog/tag/list as tags }
/tag/list/{ page: [ digits ] }
For example, { api /api/blog/tag/list/1 as tags }
/tag/list/{ page: [ digits ]}/{ rows: [ digits ] }
For example, { api /api/blog/tag/list/1/10 as tags }
/tag/list/{ page: [ digits ] }/{ rows: [ digits ] }/{ sort: [ asc|desc ] }
For example, { api /api/blog/tag/list/1/10/desc as tags }
Retrieve a list of the most popular blog posts on your website. The inline variable represents now large
the list will be, defaulting to 5. It has a restriction and is defined as a numeric value.
/article/popular
For example, { api /api/blog/article/popular as popular }
/article/popular/{ rows:[ digits ] }
For example, { api /api/blog/article/popular/5 as popular }
Retrieve a list of the newest blog posts on your website. The inline variable represents now large the list will be, defaulting to 5. It has a restriction and is defined as a numeric value.
/article/latest
For example, { api /api/blog/article/latest as latest }
/article/latest/{ rows: [ digits ] }
For example, { api /api/blog/article/latest/5 as latest }