Contents API
Likes
POST
/content/likes
Content Likes
Path Parameters
Name
Type
Description
idUser**
String
User Id
Headers
Name
Type
Description
cookie**
accessToken
{
"likes" : [
{
"id" : PK,
"content_type" : "movie",
"content_category" : "동기부여",
"content_name" : "성공적인 삶",
"content_image": "https://allforyou.s3.amazonaws.com...",
"like": 12
}, ...
],
"message" : "successfully click like"
}
Data Type(Select 1) Category(Select 2) Individual Page
GET
/contents/:categoryname/:typename/:sort
첫번째 필터링(해당 타입), 두번째 필터링(해당 카테고리) 이 완료된 콘텐츠를 최신 순, 좋아요 순으로 조회하는 페이지
Query Parameters
Name
Type
Description
type*
String
type name(movie, book, video, music)
category*
String
category name(도전, 멘토, 동기부여 등 총 7개)
{
"content_type": "book",
"content_category" : "동기부여",
"contentInfo": {
"id": PK,
"content_name" : "성공적인 삶"
"content_image": "https://allforyou.s3.amazonaws.com...",
"content_creator": "JsonKim",
"content_explanation": "성공은 멀리 있지 않다..."
"like" : 12
"createdAt": "2021-12-21T10:55:30.000Z",
"updatedAt": "2021-12-21T10:55:30.000Z",
"user_id": 1
},
"message" : "successfully viewed the data type (date) individual page"
}
Data Type Individual Page
GET
/contents/:typename
해당 타입(책,영화,음악,동영상 중 택 1) 콘텐츠만 조회하는 페이지
Query Parameters
Name
Type
Description
type*
String
type name(movie, book, video, music)
{
"content_type": "book",
"contentInfo": {
"id": PK,
"content_category" : "동기부여",
"content_name" : "성공적인 삶"
"content_image": "https://allforyou.s3.amazonaws.com...",
"content_creator": "JsonKim",
"content_explanation": "성공은 멀리 있지 않다..."
"like" : 12
"createdAt": "2021-12-21T10:55:30.000Z",
"updatedAt": "2021-12-21T10:55:30.000Z",
"user_id": 1
},
"message" : "successfully viewed the data type individual page"
}
Category Individual Page
GET
/contents/categoryname
해당 카테고리 콘텐츠만 조회하는 페이지
Query Parameters
Name
Type
Description
category*
String
category name(도전, 멘토, 동기부여 등 총 7개)
{
"content_category" : "우울 극복",
"contentInfo": {
"id": PK,
"content_type": "book",
"content_name" : "결국 당신은 이길 것이다"
"content_image": "https://allforyou.s3.amazonaws.com...",
"content_creator": "ParkCoding",
"content_explanation": "인생을 송두리째 바꾼 가장 특별한 경험..."
"like" : 20
"createdAt": "2021-12-20T05:55:30.000Z",
"updatedAt": "2021-12-20T05:55:30.000Z",
"user_id": 1
},
"message" : "successfully viewed the category individual page"
}
Content Detail Page
GET
/contents/:contentsId
해당 콘텐츠의 상세 페이지
Path Parameters
Name
Type
Description
idContent**
String
Content Id
{
"contentInfo": {
"id": PK,
"content_type": "book",
"content_category" : "우울 극복",
"content_name" : "결국 당신은 이길 것이다"
"content_image": "https://allforyou.s3.amazonaws.com...",
"content_creator": "ParkCoding",
"content_explanation": "인생을 송두리째 바꾼 가장 특별한 경험..."
"like" : 20
"createdAt": "2021-12-20T05:55:30.000Z",
"updatedAt": "2021-12-20T05:55:30.000Z",
"user_id": 1
},
"message" : "successfully viewed the details page"
}
Content Show All
GET
/contents
콘텐츠 메인 페이지
{
{
"data" : [
{
"id" : PK,
"content_type" : "movie",
"content_category" : "동기부여",
"content_name" : "성공적인 삶",
"content_image": "https://allforyou.s3.amazonaws.com...",
"like" : 12
},
{
"id" : PK,
"content_type" : "book",
"content_category" : "우울 극복",
"content_name" : "결국 당신은 이길 것이다",
"content_image": "https://allforyou.s3.amazonaws.com...",
"like" : 20
},...
],
"message" : "successfully contents show all"
}
Last updated