-
Notifications
You must be signed in to change notification settings - Fork 1
Feed API Specification
BangDori edited this page Apr 19, 2024
·
32 revisions
๊ธฐ๋ฅ | ๋ฉ์๋ | URI | ๋น๊ณ |
---|---|---|---|
ํผ๋ ๋ชฉ๋ก ์กฐํ | GET | /feeds | โ |
ํผ๋ ์์ฑ | POST | /feeds | โ |
ํผ๋ ์์ธ | GET | /feeds/{feed_id} | โ |
ํผ๋ ์์ | PUT | /feeds/{feed_id} | โ |
ํผ๋ ์ญ์ | DELETE | /feeds/{feed_id} | โ |
ํผ๋ ์ ๊ณ | POST | /feeds/{feed_id}/reports | โ |
interface Request {
uri: "/feeds?page=";
method: "GET";
query: {
page: string; // default = 1
};
body: {};
}
interface Response {
code: "2000";
data: {
feeds: Feed[]; // 0๏ธโฃ Feed
currentPageNumber: number; // ํ์ฌ ํ์ด์ง์ ์
pageSize: number; // ํ์ด์ง ํฌ๊ธฐ
numberOfElements: number; // ์ค์ ๋ฐ์ดํฐ์ ์
hasNext: boolean; // ๋ค์ ์กด์ฌํ๋์ง
};
}
interface Request {
uri: "/feeds";
method: "POST";
body: {
title: string;
content: string;
images: string[];
scope: "public" | "friend" | "private";
};
}
interface Response {
code: "2000";
data: {};
}
interface Request {
uri: "/feeds/feed_id";
method: "GET";
body: {};
}
interface Response {
code: "2000";
data: {
feed: Feed; // 0๏ธโฃ Feed
};
}
interface Request {
uri: "/feeds/{feed_id}";
method: "PUT";
body: {
title: string;
content: string;
images: string[];
scope: "public" | "friend" | "private";
};
}
interface Response {
code: "2000";
data: {};
}
interface Request {
uri: "/feeds/{feed_id}";
method: "DELETE";
body: {};
}
interface Response {
code: "2000";
data: {};
}
interface Request {
uri: "/feeds/{feed_id}/reports";
method: "POST";
body: {
category: string;
content: string;
isBlind: boolean;
};
}
interface Response {
code: "2000";
data: {};
}