[API room] DM 리스트 가져오기 - stove-smooth/sgs-smooth GitHub Wiki
DM 리스트 가져오기
GET /room
HTTP Request
GET https://{HOST_URL}/room-service/room
Query Parameters
Header |
Type |
Description |
mandatory |
|
|
|
|
Header Parameters
Header |
Type |
Description |
mandatory |
Authorization |
string |
Bearer {token} |
required |
Content-Type |
string |
application/json |
required |
Response
HTTP 200
Property |
Type |
Description |
mandatory |
isSuccess |
boolean |
요청 성공 여부 |
required |
code |
integer |
응답에 대한 코드 |
required |
message |
string |
응답에 대한 메세지 |
required |
result |
object |
결과값 |
required |
result.rooms |
array |
DM 리스트 |
required |
result.rooms[i].roomId |
integer |
채팅방 ID |
required |
result.rooms[i].accountId |
integer |
유저 ID |
그룹 메세지의 경우 null |
result.rooms[i].title |
String |
채팅방 이름 |
required |
result.rooms[i].iconImage |
string |
프로필 이미지 |
없을 경우 null |
result.rooms[i].count |
integer |
그룹 인원 수 |
required, 1:1의 경우 count는 2 |
result.rooms[i].state |
string |
접속 정보 |
그룹 메세지의 경우 null |
result.rooms[i].group |
boolean |
그룹 메세지 여부 |
required |
Response Example
{
"isSuccess": true,
"code": 1000,
"message": "요청에 성공하였습니다.",
"result": {
"rooms": [
{
"roomId": 1,
"accountId": 2,
"title": "김희동",
"iconImage": "www.discord.cloudfront.com/images/users/profile/23/jf8ew3-u18w8-ue8128e.png",
"state": "online",
"count": 2,
"group": false
},
{
"roomId": 2,
"accountId": 3,
"title": "병각이",
"iconImage": null,
"state": "online",
"count": 2,
"group": false
},
{
"roomId": 3,
"accountId": null,
"title": "박병찬, 김두리, 김민지, 김희동",
"iconImage": null,
"state": null,
"count": 4,
"group": true
}
]
}
}
HTTP 400
Property |
Type |
Description |
mandatory |
isSuccess |
boolean |
요청 성공 여부 |
required |
code |
integer |
에러 코드 |
required |
message |
string |
에러 메세지 |
required |
{
"isSuccess": false,
"code": 1500,
"message": "서버 내부 에러입니다.",
}