SPRING_PROFILES_ACTIVE=dev ./gradlew clean bootRun # DEV
- News 생성
-
/admin/api/news
(POST){ "title" : "NEWS TITLE", // 필수 "content" : "NEWS CONTENT", // 필수 "categoryId" : 1, // 필수 "topicIds" : [1, 2], "tagIds" : [1], "link" : "https://snack-link.com" }
-
- News 리스트 조회
-
/admin/api/news/{page}
(GET) - response 형식은 다음 이슈를 참조
-
- 단일 News 조회
-
/api/news/{id}
(GET)
-
- 조건에 맞는 News 리스트 조회
-
/api/news
(GET)- 필수 parameter: startDateTime, endDateTime
- 날짜 값이 없거나 부적절할 시 예외 발생
- 날짜 값 조건: startDateTime은 월요일, 두 날짜의 차는 일주일 이하, 두 날짜는 같은 달
- 옵션 parameter: categoryId, topicIds, tagIds
- 필수 parameter: startDateTime, endDateTime
- 요청 예)
{ http://{host}:{port}/api/news ?startDateTime=2019-07-01T00:00 &endDateTime=2019-08-31T00:00 &categoryId=1 &topicIds=1,2 &tagIds=1 }
-
- 참고: startDateTime 당일 기준의 가까운 월요일, endDateTime은 당일이 디폴트 값 입니다. (필수로 변경될수 있습니다.)
- 전체 Category 리스트 조회
-
/api/category
(GET)
-
- Topic 생성
-
/api/topic
(POST){ "name" : "쿠팡", // 필수 "type" : "CORP" // 입력 권장 (기본값 NONE) }
-
- Topic 리스트 조회
-
/api/topic/{type}
(GET)
/api/topic/{type}?sort={ordering}
(GET) - {type}:
corp
,person
,field
... - {ordering}:
name
(기본값),id
.
-
- Topic 수정
-
/api/topic
(PUT){ "id" : 4, // 필수 "name" : "딥러닝", // 필수 "type" : "FIELD" // 필수 }
-
- Tag 생성
-
/api/tag
(POST){ "title" : "WEEKLY" // 필수 }
-
- Tag 리스트 조회
-
/api/tag
(GET)
-
- Tag 수정
-
/api/tag
(PUT){ "id" : 3, // 필수 "title" : "RECOMMEND" // 필수 }
-