API Specification - polynomeer/preptide GitHub Wiki
๐ API ๋ช
์ธ์ (RESTful)
๐ ์ธ์ฆ
POST /api/auth/login
- ์์ฒญ:
{ email, oauthProviderToken }
- ์๋ต:
{ accessToken, refreshToken, userInfo }
๐ ์ง๋ฌธ
GET /api/questions/daily
- ์ค๋ช
: ์ค๋์ ์ง๋ฌธ ์กฐํ
- ์๋ต:
{ id, content, tags, difficulty }
GET /api/questions/{id}
- ์ค๋ช
: ํน์ ์ง๋ฌธ ์์ธ ์กฐํ
- ์๋ต:
{ id, content, tags, difficulty, source }
๐ ๋ต๋ณ
POST /api/answers
- ์์ฒญ:
{ questionId, content }
- ์๋ต:
{ answerId, createdAt }
GET /api/answers/{id}
- ์๋ต:
{ content, createdAt, aiFeedback, followUps[] }
๐ AI ํผ๋๋ฐฑ
GET /api/answers/{id}/feedback
- ์ค๋ช
: AI ํผ๋๋ฐฑ ๋จ๊ฑด ์กฐํ
- ์๋ต:
{ logicalScore, structureScore, detailScore, comment }
๐ ๊ผฌ๋ฆฌ์ง๋ฌธ
GET /api/answers/{id}/followups
- ์๋ต:
[ { step, questionText } ]
๐ ์ปค๋ฎค๋ํฐ
GET /api/community/answers
- ์ค๋ช
: ๊ณต๊ฐ ๋ต๋ณ ๋ชฉ๋ก ์กฐํ (ํ์ ํผ๋)
- ์ฟผ๋ฆฌ:
?tag=Java&sort=recent
- ์๋ต: ๋ฆฌ์คํธ ํํ
POST /api/answers/{id}/like
- ์ค๋ช
: ์ข์์ ๋ฑ๋ก
- ์๋ต:
{ success: true }
POST /api/answers/{id}/comments
- ์์ฒญ:
{ content }
- ์๋ต:
{ commentId, createdAt }
POST /api/answers/{id}/remix
- ์์ฒญ:
{ content }
- ์๋ต:
{ remixId }
๐ ์ํผ ์ฝํ
์ธ
GET /api/shorts
- ์ค๋ช
: ์ํผ ์ฝํ
์ธ ์กฐํ
- ์๋ต:
[ { id, title, url, tags[] } ]
๐ ๋ถ๋งํฌ
POST /api/bookmarks
- ์์ฒญ:
{ questionId }
- ์๋ต:
{ success: true }
GET /api/bookmarks
- ์๋ต:
[ { questionId, content, tags } ]