feat(chat-room) 채팅방 API

- 채팅방 입장 API 연동
- 채팅 쿼터가 없을 때 표시할 UI 추가
This commit is contained in:
Yu Sung
2025-09-04 04:20:45 +09:00
parent 96cabbc6a7
commit 2576c851ee
9 changed files with 353 additions and 47 deletions

View File

@@ -14,6 +14,8 @@ enum TalkApi {
case enterChatRoom(roomId: Int, characterImageId: Int?)
case sendMessage(roomId: Int, request: SendChatMessageRequest)
case getChatRoomMessages(roomId: Int, cursor: Int?, limit: Int)
case getChatQuotaStatus
}
extension TalkApi: TargetType {
@@ -35,6 +37,9 @@ extension TalkApi: TargetType {
case .getChatRoomMessages(let roomId, _, _):
return "/api/chat/room/\(roomId)/messages"
case .getChatQuotaStatus:
return "/api/chat/quota/me"
}
}
@@ -54,6 +59,9 @@ extension TalkApi: TargetType {
case .getChatRoomMessages:
return .get
case .getChatQuotaStatus:
return .get
}
}
@@ -91,6 +99,9 @@ extension TalkApi: TargetType {
parameters: parameters,
encoding: URLEncoding.queryString
)
case .getChatQuotaStatus:
return .requestPlain
}
}