-
Notifications
You must be signed in to change notification settings - Fork 1
Search API Specification
BangDori edited this page Oct 30, 2024
·
6 revisions
κΈ°λ₯ | λ©μλ | URI | λΉκ³ |
---|---|---|---|
νΌλ κ²μ | GET | /v2/feeds?target=&page=&size= | β |
μ¬μ©μ κ²μ | GET | /v2/users?target=&page=&size= | β |
interface Request {
uri: '/v2/feeds?target=&page=&size=';
method: 'GET';
query: {
target: string; // κ²μ ν€μλ
page: string; // νμ΄μ§
size: string; // κ°μ
};
body: {};
}
interface Response {
code: '2000';
data: {
feed: {
contents: Feed[];
currentPageNumber: number; // νμ¬ νμ΄μ§
pageSize: number; // νμ΄μ§ ν¬κΈ°
numberOfElements: number; // μ€μ λ°μ΄ν°μ μ
hasNextPage: boolean; // λ€μ μ‘΄μ¬νλμ§
};
};
}
interface Feed {
id: number;
user: {
id: number;
profileImage: string;
username: string;
};
content: string;
images: Image[];
likeCount: number;
commentCount: number;
isLiked: boolean;
isBookmarked: boolean;
createdAt: string;
updatedAt: string;
}
interface Request {
uri: '/v2/users?target=&page=&size=';
method: 'GET';
query: {
target: string; // κ²μ ν€μλ (2μ μ ν)
page: string; // νμ΄μ§
size: string; // κ°μ
};
body: {};
}
interface Response {
code: '2000';
data: {
user: {
contents: User[];
currentPageNumber: number; // νμ¬ νμ΄μ§
pageSize: number; // νμ΄μ§ ν¬κΈ°
numberOfElements: number; // μ€μ λ°μ΄ν°μ μ
hasNextPage: boolean; // λ€μ μ‘΄μ¬νλμ§
};
};
}
interface User {
id: number;
profileImage: string;
username: string;
}