Skip to content

Commit 89c406b

Browse files
author
Théo Vidal
committed
Added search and random article
1 parent 64ef5b0 commit 89c406b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

resources/BlogPost.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ Get all the posts. Returns a list of [blog post objects](#blog-post-object) with
2929

3030
### Optional URL parameters
3131

32-
| Name | Type | Description |
33-
| -------- | ------ | ---------------------------------------- |
34-
| category | string | post's category |
35-
| type | string | post's type (article / tutorial / flash) |
32+
| Name | Type | Description |
33+
| ---------- | ------ | ------------------------------------------------------ |
34+
| category | string | post's category |
35+
| type | string | post's type (article / tutorial / flash) |
36+
| search | string | search for articles (text inside title or description) |
3637

3738
This endpoint uses [pagination](../topics/Pagination.md).
3839

@@ -42,6 +43,12 @@ This endpoint uses [pagination](../topics/Pagination.md).
4243

4344
Get the last published post. Returns a [blog post object](#blog-post-object).
4445

46+
## Get random post
47+
48+
`GET /blog-posts/random`
49+
50+
Get a random post among all our collection. Returns a [blog post object](#blog-post-object).
51+
4552
## Create post
4653

4754
`POST /blog-posts`

0 commit comments

Comments
 (0)