-
Notifications
You must be signed in to change notification settings - Fork 1
Comment API Specification
BangDori edited this page May 8, 2024
·
3 revisions
๊ธฐ๋ฅ | ๋ฉ์๋ | URI | ๋น๊ณ |
---|---|---|---|
๋๊ธ ์กฐํ | GET | /feeds/{feed_id}/comments | โ |
๋๊ธ ์์ฑ | POST | /feeds/{feed_id}/comments | โ |
๋๊ธ ๊ฐ์ ์กฐํ | GET | /feeds/{feed_id}/comments/count | โ |
interface Request {
uri: "/feeds/{feed_id}/comments?page={}&count={}";
method: "GET";
query: {
page: string; // default = 1
count: string; // default = 10
}
body {}
}
interface Response {
code: "2000";
data: {
comments: Comment[]; // 0๏ธโฃ Comment
currentPageNumber: number; // ํ์ฌ ํ์ด์ง์ ์
pageSize: number; // ํ์ด์ง ํฌ๊ธฐ
numberOfElements: number; // ์ค์ ๋ฐ์ดํฐ์ ์
hasNext: boolean; // ๋ค์ ์กด์ฌํ๋์ง
};
}
interface Request {
uri: "/feeds/{feed_id}/comments";
method: "POST";
body: {
content: string;
};
}
interface Response {
code: "2000";
data: {};
}
interface Request {
uri: "/feeds/{feed_id}/comments/count";
method: "GET";
body: {};
}
interface Response {
code: "2000";
data: {
totalCount: number;
};
}