라이브

- 메뉴판 UI 추가
This commit is contained in:
Yu Sung
2024-03-08 16:58:00 +09:00
parent aa4171b095
commit b6411c3ccb
13 changed files with 381 additions and 123 deletions

View File

@@ -36,6 +36,7 @@ enum LiveApi {
case getDonationMessageList(roomId: Int)
case deleteDonationMessage(roomId: Int, messageUUID: String)
case getUserProfile(roomId: Int, userId: Int)
case getAllMenuPreset(creatorId: Int)
}
extension LiveApi: TargetType {
@@ -125,12 +126,15 @@ extension LiveApi: TargetType {
case .getUserProfile(let roomId, let userId):
return "/live/room/\(roomId)/profile/\(userId)"
case .getAllMenuPreset:
return "/live/room/menu/all"
}
}
var method: Moya.Method {
switch self {
case .roomList, .recentVisitRoomUsers, .getReservations, .getReservation, .getRoomDetail, .getTags, .getRecentRoomInfo, .getRoomInfo, .donationStatus, .donationTotal, .getDonationMessageList, .getUserProfile:
case .roomList, .recentVisitRoomUsers, .getReservations, .getReservation, .getRoomDetail, .getTags, .getRecentRoomInfo, .getRoomInfo, .donationStatus, .donationTotal, .getDonationMessageList, .getUserProfile, .getAllMenuPreset:
return .get
case .makeReservation, .enterRoom, .createRoom, .quitRoom, .donation, .refundDonation, .kickOut:
@@ -226,6 +230,9 @@ extension LiveApi: TargetType {
case .deleteDonationMessage(let roomId, let messageUUID):
return .requestJSONEncodable(DeleteLiveRoomDonationMessage(roomId: roomId, messageUUID: messageUUID))
case .getAllMenuPreset(let creatorId):
return .requestParameters(parameters: ["creatorId" : creatorId], encoding: URLEncoding.queryString)
}
}