feat(chat-room) 채팅방 API
- 채팅방 입장 API 연동 - 채팅 쿼터가 없을 때 표시할 UI 추가
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user