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" // ํ์ }
-