-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1202 from wakmusic/1109-replace-wakmusic-playlist…
…-button-header 🔀 :: (#1109) 왁뮤 추천 플리 헤더 버튼을 전체 재생으로 통일
- Loading branch information
Showing
15 changed files
with
160 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
Projects/Domains/PlaylistDomain/Interface/Entity/WmPlaylistDetailEntity.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Foundation | ||
import SongsDomainInterface | ||
|
||
public struct WmPlaylistDetailEntity: Equatable { | ||
public init( | ||
key: String, | ||
title: String, | ||
songs: [SongEntity], | ||
image: String, | ||
playlistURL: String | ||
) { | ||
self.key = key | ||
self.title = title | ||
self.songs = songs | ||
self.image = image | ||
self.playlistURL = playlistURL | ||
} | ||
|
||
public let key, title, image, playlistURL: String | ||
public var songs: [SongEntity] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
Projects/Domains/PlaylistDomain/Interface/UseCase/FetchWmPlaylistDetailUseCase.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
Projects/Domains/PlaylistDomain/Sources/ResponseDTO/WmPlaylistDetailResponseDTO.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import Foundation | ||
import PlaylistDomainInterface | ||
import SongsDomain | ||
import SongsDomainInterface | ||
|
||
public struct WmPlaylistDetailResponseDTO: Decodable { | ||
public let key: String? | ||
public let title: String | ||
public let songs: [SingleSongResponseDTO]? | ||
public let imageURL: String | ||
public let playlistURL: String | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case key | ||
case title | ||
case songs | ||
case imageURL = "imageUrl" | ||
case playlistURL = "playlistUrl" | ||
} | ||
} | ||
|
||
public extension WmPlaylistDetailResponseDTO { | ||
func toDomain() -> WmPlaylistDetailEntity { | ||
WmPlaylistDetailEntity( | ||
key: key ?? "", | ||
title: title, | ||
songs: (songs ?? []).map { $0.toDomain() }, | ||
image: imageURL, | ||
playlistURL: playlistURL | ||
) | ||
} | ||
} |
8 changes: 0 additions & 8 deletions
8
Projects/Domains/PlaylistDomain/Sources/UseCase/FetchPlaylistDetailUseCaseImpl.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
Projects/Domains/PlaylistDomain/Sources/UseCase/FetchWmPlaylistDetailUseCaseImpl.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Foundation | ||
import PlaylistDomainInterface | ||
import RxSwift | ||
|
||
public struct FetchWmPlaylistDetailUseCaseImpl: FetchWmPlaylistDetailUseCase { | ||
private let playlistRepository: any PlaylistRepository | ||
|
||
public init( | ||
playlistRepository: PlaylistRepository | ||
) { | ||
self.playlistRepository = playlistRepository | ||
} | ||
|
||
public func execute(id: String) -> Single<WmPlaylistDetailEntity> { | ||
playlistRepository.fetchWmPlaylistDetail(id: id) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.