Skip to content

Commit

Permalink
🚚 :: Wm prefix를 가이드 라인에 맞게 WM로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yongbeomkwak committed Aug 21, 2024
1 parent 4f70195 commit 55670ef
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions Projects/App/Sources/Application/AppComponent+Playlist.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ public extension AppComponent {
}
}

var fetchWmPlaylistDetailUseCase: any FetchWmPlaylistDetailUseCase {
var fetchWMPlaylistDetailUseCase: any FetchWMPlaylistDetailUseCase {
shared {
FetchWmPlaylistDetailUseCaseImpl(playlistRepository: playlistRepository)
FetchWMPlaylistDetailUseCaseImpl(playlistRepository: playlistRepository)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import SongsDomainInterface
public protocol RemotePlaylistDataSource {
func fetchRecommendPlaylist() -> Single<[RecommendPlaylistEntity]>
func fetchPlaylistDetail(id: String, type: PlaylistType) -> Single<PlaylistDetailEntity>
func fetchWmPlaylistDetail(id: String) -> Single<WmPlaylistDetailEntity>
func fetchWMPlaylistDetail(id: String) -> Single<WMPlaylistDetailEntity>
func updateTitleAndPrivate(key: String, title: String?, isPrivate: Bool?) -> Completable
func createPlaylist(title: String) -> Single<PlaylistBaseEntity>
func fetchPlaylistSongs(key: String) -> Single<[SongEntity]>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import SongsDomainInterface

public struct WmPlaylistDetailEntity: Equatable {
public struct WMPlaylistDetailEntity: Equatable {
public init(
key: String,
title: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import SongsDomainInterface
public protocol PlaylistRepository {
func fetchRecommendPlaylist() -> Single<[RecommendPlaylistEntity]>
func fetchPlaylistDetail(id: String, type: PlaylistType) -> Single<PlaylistDetailEntity>
func fetchWmPlaylistDetail(id: String) -> Single<WmPlaylistDetailEntity>
func fetchWMPlaylistDetail(id: String) -> Single<WMPlaylistDetailEntity>
func updateTitleAndPrivate(key: String, title: String?, isPrivate: Bool?) -> Completable
func createPlaylist(title: String) -> Single<PlaylistBaseEntity>
func fetchPlaylistSongs(key: String) -> Single<[SongEntity]>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Foundation
import RxSwift

public protocol FetchWMPlaylistDetailUseCase {
func execute(id: String) -> Single<WMPlaylistDetailEntity>
}

This file was deleted.

10 changes: 5 additions & 5 deletions Projects/Domains/PlaylistDomain/Sources/API/PlaylistAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) // 전체 재생 시 곡 데이터만 가져오기
Expand Down Expand Up @@ -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, _, _):
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public final class RemotePlaylistDataSourceImpl: BaseRemoteDataSource<PlaylistAP
.map { $0.toDomain() }
}

public func fetchWmPlaylistDetail(id: String) -> Single<WmPlaylistDetailEntity> {
request(.fetchWmPlaylistDetail(id: id))
.map(WmPlaylistDetailResponseDTO.self)
public func fetchWMPlaylistDetail(id: String) -> Single<WMPlaylistDetailEntity> {
request(.fetchWMPlaylistDetail(id: id))
.map(WMPlaylistDetailResponseDTO.self)
.map { $0.toDomain() }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public final class PlaylistRepositoryImpl: PlaylistRepository {
remotePlaylistDataSource.fetchPlaylistDetail(id: id, type: type)
}

public func fetchWmPlaylistDetail(id: String) -> Single<WmPlaylistDetailEntity> {
remotePlaylistDataSource.fetchWmPlaylistDetail(id: id)
public func fetchWMPlaylistDetail(id: String) -> Single<WMPlaylistDetailEntity> {
remotePlaylistDataSource.fetchWMPlaylistDetail(id: id)
}

public func updateTitleAndPrivate(key: String, title: String?, isPrivate: Bool?) -> Completable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]?
Expand All @@ -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() },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -11,7 +11,7 @@ public struct FetchWmPlaylistDetailUseCaseImpl: FetchWmPlaylistDetailUseCase {
self.playlistRepository = playlistRepository
}

public func execute(id: String) -> Single<WmPlaylistDetailEntity> {
playlistRepository.fetchWmPlaylistDetail(id: id)
public func execute(id: String) -> Single<WMPlaylistDetailEntity> {
playlistRepository.fetchWMPlaylistDetail(id: id)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -21,7 +21,7 @@ public final class WakmusicPlaylistDetailComponent: Component<WakmusicPlaylistDe
return WakmusicPlaylistDetailViewController(
reactor: WakmusicPlaylistDetailReactor(
key: key,
fetchWmPlaylistDetailUseCase: dependency.fetchWmPlaylistDetailUseCase
fetchWMPlaylistDetailUseCase: dependency.fetchWMPlaylistDetailUseCase
),
containSongsFactory: dependency.containSongsFactory,
textPopUpFactory: dependency.textPopUpFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ final class WakmusicPlaylistDetailReactor: Reactor {
}

var initialState: State
private let fetchWmPlaylistDetailUseCase: any FetchWmPlaylistDetailUseCase
private let fetchWMPlaylistDetailUseCase: any FetchWMPlaylistDetailUseCase

init(
key: String,
fetchWmPlaylistDetailUseCase: any FetchWmPlaylistDetailUseCase
fetchWMPlaylistDetailUseCase: any FetchWMPlaylistDetailUseCase

) {
self.key = key
self.fetchWmPlaylistDetailUseCase = fetchWmPlaylistDetailUseCase
self.fetchWMPlaylistDetailUseCase = fetchWMPlaylistDetailUseCase

self.initialState = State(
header: PlaylistDetailHeaderModel(
Expand Down Expand Up @@ -121,7 +121,7 @@ private extension WakmusicPlaylistDetailReactor {
func updateDataSource() -> Observable<Mutation> {
return .concat([
.just(.updateLoadingState(true)),
fetchWmPlaylistDetailUseCase.execute(id: key)
fetchWMPlaylistDetailUseCase.execute(id: key)
.asObservable()
.flatMap { data -> Observable<Mutation> in
return .concat([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 55670ef

Please sign in to comment.