Artikel Controller Docs
Get Article Discovery
The endpoint will be used to etrieving article recommendation data according to the mode baby or pregnancy
Method : GET
URL :{base_url}/article/article-discovery
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | mode | STRING | M | Value “baby” or “pregnancy” |
Get Article History
The endpoint will be used to get user list of viewed / liked articles
Method : GET
URL :{base_url}/article/article-history
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | activity | STRING | M | Value “view” or “like” |
2 | page | NUM | M | The page number which need to be displayed The page number which need to be displayed |
Get Article Overview
The endpoint will be used to get taxonomies
Method : GET
URL :{base_url} /article/article-overview
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | mode | STRING | M | Value “baby” or “pregnancy” |
2 | page | NUM | M | The page number which need to be displayed The page number which need to be displayed |
Get Article Overview Feature
The endpoint will be used to get list of featured articles by mode
Method : GET
URL :{base_url} /article/article-overview/featured
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | mode | STRING | M | Value “baby” or “pregnancy” |
2 | page | NUM | M | The page number which need to be displayed The page number which need to be displayed |
Sample Request Params :
Get Category
The endpoint will be used to get list sub category
Method : GET
URL :{base_url} /article/category/{categoryId}
categoryId
{base_url} /article/category/1
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | page | NUM | M | The page number which need to be displayed The page number which need to be displayed |
page = 1
Get Curated article
The endpoint will be used to get list article of curated by week
Method : GET
URL :{base_url} /article/curated-article
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | week | NUM | M | pregnancy's age in week |
Week = 4
Index
The endpoint will be used to bulk index all published article to elastic search
Method : GET
URL :{base_url} /article/index
Delete Index
The endpoint will be used to delete indexed article in elastic search
Method : DELETE
URL :{base_url} /article/index
Like / Unlike Article
The endpoint will be used to like or unlike article
Method : POST
URL :{base_url} /article/like
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | like | BOOLEAN | M | True if like or false if unlike |
2 | postId | NUM | M | Id of article |
{
"like": true,
"postId": 4
}
Read Article
The endpoint will be used to triger read article , to save counter read
Method : GET
URL :{base_url} / article/read/{postId}
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | postId | NUM | M | Id of article |
{base_url} / article/read/4
Read by slug
The endpoint will be used to triger read article by slug , to save counter read
Method : GET
URL :{base_url} /article/read/slug/{slug}
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | slug | STRING | M | slug of article |
{base_url} /article/read/slug/tips-untuk-ibu-di-minggu-ke-1
Read Article v2
The endpoint will be used to triger read article , to save counter read (api version 2)
Method : GET
URL :{base_url} / article/read/v2/{postId}
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | postId | NUM | M | Id of article |
{base_url} / article/read/v2/4
Get Recomended Article
The endpoint will be used to get recomended article by week and mode
Method : GET
URL :{base_url}/article/recomended-article
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | week | NUM | M | pregnancy's age in week |
2 | mode | STRING | M | Value “baby” or “pregnancy” |
{base_url}/article/recomended-article?week=1&mode=baby"
Get Related Article
The endpoint will be used to get list of articles related to specific article by id
Method : GET
URL :{base_url}/article/related-article/{postId}
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | postId | NUM | M | Id of article |
{base_url}/article/related-article/4
Get Related Article By Slug
The endpoint will be used to get list of articles related to specific article by slug
Method : GET
URL :{base_url}/article/related-article/slug/{slug}
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | slug | STRING | M | slug of article |
{base_url}/article/related-article/slug/tips-untuk-ibu-di-minggu-ke-1
Search By Term
The endpoint will be used to search (return list of articles related to) in all articles by term
Method : GET
URL :/article/search/{term}
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | term | STRING | M | term for searching purpose |
Example Path : | ||||
/article/search/hamil |
No | Field Name | Data Type | Field Status | Description |
---|---|---|---|---|
1 | page | NUM | M | The page number which need to be displayed The page number which need to be displayed |
page = 1
Modified at 2023-02-01 03:28:12