diff --git a/Projects/App/Sources/Application/AppComponent+Playlist.swift b/Projects/App/Sources/Application/AppComponent+Playlist.swift index 10c52b256..cf39453fb 100644 --- a/Projects/App/Sources/Application/AppComponent+Playlist.swift +++ b/Projects/App/Sources/Application/AppComponent+Playlist.swift @@ -80,9 +80,9 @@ public extension AppComponent { } } - var fetchWmPlaylistDetailUseCase: any FetchWmPlaylistDetailUseCase { + var fetchWMPlaylistDetailUseCase: any FetchWMPlaylistDetailUseCase { shared { - FetchWmPlaylistDetailUseCaseImpl(playlistRepository: playlistRepository) + FetchWMPlaylistDetailUseCaseImpl(playlistRepository: playlistRepository) } } diff --git a/Projects/Domains/PlaylistDomain/Interface/DataSource/RemotePlaylistDataSource.swift b/Projects/Domains/PlaylistDomain/Interface/DataSource/RemotePlaylistDataSource.swift index 86b7d46bc..b4130c423 100644 --- a/Projects/Domains/PlaylistDomain/Interface/DataSource/RemotePlaylistDataSource.swift +++ b/Projects/Domains/PlaylistDomain/Interface/DataSource/RemotePlaylistDataSource.swift @@ -6,7 +6,7 @@ import SongsDomainInterface public protocol RemotePlaylistDataSource { func fetchRecommendPlaylist() -> Single<[RecommendPlaylistEntity]> func fetchPlaylistDetail(id: String, type: PlaylistType) -> Single - func fetchWmPlaylistDetail(id: String) -> Single + func fetchWMPlaylistDetail(id: String) -> Single func updateTitleAndPrivate(key: String, title: String?, isPrivate: Bool?) -> Completable func createPlaylist(title: String) -> Single func fetchPlaylistSongs(key: String) -> Single<[SongEntity]> diff --git a/Projects/Domains/PlaylistDomain/Interface/Entity/WmPlaylistDetailEntity.swift b/Projects/Domains/PlaylistDomain/Interface/Entity/WMPlaylistDetailEntity.swift similarity index 89% rename from Projects/Domains/PlaylistDomain/Interface/Entity/WmPlaylistDetailEntity.swift rename to Projects/Domains/PlaylistDomain/Interface/Entity/WMPlaylistDetailEntity.swift index 7deabaaef..e435b490a 100644 --- a/Projects/Domains/PlaylistDomain/Interface/Entity/WmPlaylistDetailEntity.swift +++ b/Projects/Domains/PlaylistDomain/Interface/Entity/WMPlaylistDetailEntity.swift @@ -1,7 +1,7 @@ import Foundation import SongsDomainInterface -public struct WmPlaylistDetailEntity: Equatable { +public struct WMPlaylistDetailEntity: Equatable { public init( key: String, title: String, diff --git a/Projects/Domains/PlaylistDomain/Interface/Repository/PlaylistRepository.swift b/Projects/Domains/PlaylistDomain/Interface/Repository/PlaylistRepository.swift index 4c73b5446..c8d0e9eea 100644 --- a/Projects/Domains/PlaylistDomain/Interface/Repository/PlaylistRepository.swift +++ b/Projects/Domains/PlaylistDomain/Interface/Repository/PlaylistRepository.swift @@ -6,7 +6,7 @@ import SongsDomainInterface public protocol PlaylistRepository { func fetchRecommendPlaylist() -> Single<[RecommendPlaylistEntity]> func fetchPlaylistDetail(id: String, type: PlaylistType) -> Single - func fetchWmPlaylistDetail(id: String) -> Single + func fetchWMPlaylistDetail(id: String) -> Single func updateTitleAndPrivate(key: String, title: String?, isPrivate: Bool?) -> Completable func createPlaylist(title: String) -> Single func fetchPlaylistSongs(key: String) -> Single<[SongEntity]> diff --git a/Projects/Domains/PlaylistDomain/Interface/UseCase/FetchWMPlaylistDetailUseCase.swift b/Projects/Domains/PlaylistDomain/Interface/UseCase/FetchWMPlaylistDetailUseCase.swift new file mode 100644 index 000000000..4f3a3ad50 --- /dev/null +++ b/Projects/Domains/PlaylistDomain/Interface/UseCase/FetchWMPlaylistDetailUseCase.swift @@ -0,0 +1,6 @@ +import Foundation +import RxSwift + +public protocol FetchWMPlaylistDetailUseCase { + func execute(id: String) -> Single +} diff --git a/Projects/Domains/PlaylistDomain/Interface/UseCase/FetchWmPlaylistDetailUseCase.swift b/Projects/Domains/PlaylistDomain/Interface/UseCase/FetchWmPlaylistDetailUseCase.swift deleted file mode 100644 index bc9dfad58..000000000 --- a/Projects/Domains/PlaylistDomain/Interface/UseCase/FetchWmPlaylistDetailUseCase.swift +++ /dev/null @@ -1,6 +0,0 @@ -import Foundation -import RxSwift - -public protocol FetchWmPlaylistDetailUseCase { - func execute(id: String) -> Single -} diff --git a/Projects/Domains/PlaylistDomain/Sources/API/PlaylistAPI.swift b/Projects/Domains/PlaylistDomain/Sources/API/PlaylistAPI.swift index f00ea811f..9262992a1 100644 --- a/Projects/Domains/PlaylistDomain/Sources/API/PlaylistAPI.swift +++ b/Projects/Domains/PlaylistDomain/Sources/API/PlaylistAPI.swift @@ -8,7 +8,7 @@ import PlaylistDomainInterface public enum PlaylistAPI { case fetchPlaylistDetail(id: String, type: PlaylistType) // 플리 상세 불러오기 - case fetchWmPlaylistDetail(id: String) // 왁뮤 플리 상세 불러오기 + case fetchWMPlaylistDetail(id: String) // 왁뮤 플리 상세 불러오기 case updateTitleAndPrivate(key: String, title: String?, isPrivate: Bool?) // title and private 업데이트 case createPlaylist(title: String) // 플리 생성 case fetchPlaylistSongs(key: String) // 전체 재생 시 곡 데이터만 가져오기 @@ -36,7 +36,7 @@ extension PlaylistAPI: WMAPI { case let .fetchPlaylistDetail(id: id, type: type): return "/\(id)" - case let .fetchWmPlaylistDetail(id: id): + case let .fetchWMPlaylistDetail(id: id): return "/recommend/\(id)" case let .updateTitleAndPrivate(key: key, _, _): @@ -64,7 +64,7 @@ extension PlaylistAPI: WMAPI { public var method: Moya.Method { switch self { - case .fetchRecommendPlaylist, .fetchPlaylistDetail, .fetchWmPlaylistDetail, .fetchPlaylistSongs, + case .fetchRecommendPlaylist, .fetchPlaylistDetail, .fetchWMPlaylistDetail, .fetchPlaylistSongs, .checkSubscription, .requestPlaylistOwnerID: return .get @@ -85,7 +85,7 @@ extension PlaylistAPI: WMAPI { public var task: Moya.Task { switch self { - case .fetchRecommendPlaylist, .fetchPlaylistDetail, .fetchWmPlaylistDetail, .fetchPlaylistSongs, + case .fetchRecommendPlaylist, .fetchPlaylistDetail, .fetchWMPlaylistDetail, .fetchPlaylistSongs, .subscribePlaylist, .checkSubscription, .requestPlaylistOwnerID: return .requestPlain @@ -125,7 +125,7 @@ extension PlaylistAPI: WMAPI { public var jwtTokenType: JwtTokenType { switch self { - case .fetchRecommendPlaylist, .fetchWmPlaylistDetail: + case .fetchRecommendPlaylist, .fetchWMPlaylistDetail: return .none case let .fetchPlaylistDetail(_, type): diff --git a/Projects/Domains/PlaylistDomain/Sources/DataSource/RemotePlaylistDataSourceImpl.swift b/Projects/Domains/PlaylistDomain/Sources/DataSource/RemotePlaylistDataSourceImpl.swift index a96c06dc0..b53b551a4 100644 --- a/Projects/Domains/PlaylistDomain/Sources/DataSource/RemotePlaylistDataSourceImpl.swift +++ b/Projects/Domains/PlaylistDomain/Sources/DataSource/RemotePlaylistDataSourceImpl.swift @@ -22,9 +22,9 @@ public final class RemotePlaylistDataSourceImpl: BaseRemoteDataSource Single { - request(.fetchWmPlaylistDetail(id: id)) - .map(WmPlaylistDetailResponseDTO.self) + public func fetchWMPlaylistDetail(id: String) -> Single { + request(.fetchWMPlaylistDetail(id: id)) + .map(WMPlaylistDetailResponseDTO.self) .map { $0.toDomain() } } diff --git a/Projects/Domains/PlaylistDomain/Sources/Repository/PlaylistRepositoryImpl.swift b/Projects/Domains/PlaylistDomain/Sources/Repository/PlaylistRepositoryImpl.swift index 04a6418e8..fd21dbf66 100644 --- a/Projects/Domains/PlaylistDomain/Sources/Repository/PlaylistRepositoryImpl.swift +++ b/Projects/Domains/PlaylistDomain/Sources/Repository/PlaylistRepositoryImpl.swift @@ -21,8 +21,8 @@ public final class PlaylistRepositoryImpl: PlaylistRepository { remotePlaylistDataSource.fetchPlaylistDetail(id: id, type: type) } - public func fetchWmPlaylistDetail(id: String) -> Single { - remotePlaylistDataSource.fetchWmPlaylistDetail(id: id) + public func fetchWMPlaylistDetail(id: String) -> Single { + remotePlaylistDataSource.fetchWMPlaylistDetail(id: id) } public func updateTitleAndPrivate(key: String, title: String?, isPrivate: Bool?) -> Completable { diff --git a/Projects/Domains/PlaylistDomain/Sources/ResponseDTO/WmPlaylistDetailResponseDTO.swift b/Projects/Domains/PlaylistDomain/Sources/ResponseDTO/WmPlaylistDetailResponseDTO.swift index b5631a1a3..8a81ac91b 100644 --- a/Projects/Domains/PlaylistDomain/Sources/ResponseDTO/WmPlaylistDetailResponseDTO.swift +++ b/Projects/Domains/PlaylistDomain/Sources/ResponseDTO/WmPlaylistDetailResponseDTO.swift @@ -3,7 +3,7 @@ import PlaylistDomainInterface import SongsDomain import SongsDomainInterface -public struct WmPlaylistDetailResponseDTO: Decodable { +public struct WMPlaylistDetailResponseDTO: Decodable { public let key: String? public let title: String public let songs: [SingleSongResponseDTO]? @@ -19,9 +19,9 @@ public struct WmPlaylistDetailResponseDTO: Decodable { } } -public extension WmPlaylistDetailResponseDTO { - func toDomain() -> WmPlaylistDetailEntity { - WmPlaylistDetailEntity( +public extension WMPlaylistDetailResponseDTO { + func toDomain() -> WMPlaylistDetailEntity { + WMPlaylistDetailEntity( key: key ?? "", title: title, songs: (songs ?? []).map { $0.toDomain() }, diff --git a/Projects/Domains/PlaylistDomain/Sources/UseCase/FetchWmPlaylistDetailUseCaseImpl.swift b/Projects/Domains/PlaylistDomain/Sources/UseCase/FetchWMPlaylistDetailUseCaseImpl.swift similarity index 60% rename from Projects/Domains/PlaylistDomain/Sources/UseCase/FetchWmPlaylistDetailUseCaseImpl.swift rename to Projects/Domains/PlaylistDomain/Sources/UseCase/FetchWMPlaylistDetailUseCaseImpl.swift index 7c1eb818c..419decf16 100644 --- a/Projects/Domains/PlaylistDomain/Sources/UseCase/FetchWmPlaylistDetailUseCaseImpl.swift +++ b/Projects/Domains/PlaylistDomain/Sources/UseCase/FetchWMPlaylistDetailUseCaseImpl.swift @@ -2,7 +2,7 @@ import Foundation import PlaylistDomainInterface import RxSwift -public struct FetchWmPlaylistDetailUseCaseImpl: FetchWmPlaylistDetailUseCase { +public struct FetchWMPlaylistDetailUseCaseImpl: FetchWMPlaylistDetailUseCase { private let playlistRepository: any PlaylistRepository public init( @@ -11,7 +11,7 @@ public struct FetchWmPlaylistDetailUseCaseImpl: FetchWmPlaylistDetailUseCase { self.playlistRepository = playlistRepository } - public func execute(id: String) -> Single { - playlistRepository.fetchWmPlaylistDetail(id: id) + public func execute(id: String) -> Single { + playlistRepository.fetchWMPlaylistDetail(id: id) } } diff --git a/Projects/Features/PlaylistFeature/Interface/PlaylistDetailNavigator.swift b/Projects/Features/PlaylistFeature/Interface/PlaylistDetailNavigator.swift index 098e9506d..6e50ad01e 100644 --- a/Projects/Features/PlaylistFeature/Interface/PlaylistDetailNavigator.swift +++ b/Projects/Features/PlaylistFeature/Interface/PlaylistDetailNavigator.swift @@ -4,13 +4,13 @@ import UIKit public protocol PlaylistDetailNavigator { var playlistDetailFactory: any PlaylistDetailFactory { get } - func navigateWmPlaylistDetail(key: String) + func navigateWMPlaylistDetail(key: String) func navigatePlaylistDetail(key: String) } public extension PlaylistDetailNavigator where Self: UIViewController { - func navigateWmPlaylistDetail(key: String) { + func navigateWMPlaylistDetail(key: String) { let dest = playlistDetailFactory.makeWmView(key: key) self.navigationController?.pushViewController(dest, animated: true) diff --git a/Projects/Features/PlaylistFeature/Sources/Components/WakmusicPlaylistDetailComponent.swift b/Projects/Features/PlaylistFeature/Sources/Components/WakmusicPlaylistDetailComponent.swift index 9b95c8e62..96ef8d552 100644 --- a/Projects/Features/PlaylistFeature/Sources/Components/WakmusicPlaylistDetailComponent.swift +++ b/Projects/Features/PlaylistFeature/Sources/Components/WakmusicPlaylistDetailComponent.swift @@ -8,7 +8,7 @@ import SignInFeatureInterface import UIKit public protocol WakmusicPlaylistDetailDependency: Dependency { - var fetchWmPlaylistDetailUseCase: any FetchWmPlaylistDetailUseCase { get } + var fetchWMPlaylistDetailUseCase: any FetchWMPlaylistDetailUseCase { get } var containSongsFactory: any ContainSongsFactory { get } var textPopUpFactory: any TextPopUpFactory { get } var songDetailPresenter: any SongDetailPresentable { get } @@ -21,7 +21,7 @@ public final class WakmusicPlaylistDetailComponent: Component Observable { return .concat([ .just(.updateLoadingState(true)), - fetchWmPlaylistDetailUseCase.execute(id: key) + fetchWMPlaylistDetailUseCase.execute(id: key) .asObservable() .flatMap { data -> Observable in return .concat([ diff --git a/Projects/Features/SearchFeature/Sources/Before/ViewControllers/BeforeSearchContentViewController.swift b/Projects/Features/SearchFeature/Sources/Before/ViewControllers/BeforeSearchContentViewController.swift index 9302e93f2..bb6a04fde 100644 --- a/Projects/Features/SearchFeature/Sources/Before/ViewControllers/BeforeSearchContentViewController.swift +++ b/Projects/Features/SearchFeature/Sources/Before/ViewControllers/BeforeSearchContentViewController.swift @@ -321,7 +321,7 @@ extension BeforeSearchContentViewController: UICollectionViewDelegate { case let .recommend(model: model): let log = CommonAnalyticsLog.clickPlaylistItem(location: .search, key: model.key) LogManager.analytics(log) - navigateWmPlaylistDetail(key: model.key) + navigateWMPlaylistDetail(key: model.key) #warning("추후 업데이트 시 사용") // case let .popularList(model: model):