Skip to content

Commit

Permalink
✨ :: 최신음악 화면 추가 7t
Browse files Browse the repository at this point in the history
  • Loading branch information
KangTaeHoon committed Nov 16, 2023
1 parent 855666f commit b15d406
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 151 deletions.
6 changes: 0 additions & 6 deletions Projects/App/Sources/Application/AppComponent+Songs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ public extension AppComponent {
}
}

var fetchNewSongUseCase: any FetchNewSongUseCase {
shared {
FetchNewSongUseCaseImpl(songsRepository: songsRepository)
}
}

var fetchNewSongsUseCase: any FetchNewSongsUseCase {
shared {
FetchNewSongsUseCaseImpl(songsRepository: songsRepository)
Expand Down
1 change: 0 additions & 1 deletion Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,6 @@ extension AppComponent: Registration {
localTable["songsRepository-any SongsRepository"] = { self.songsRepository as Any }
localTable["fetchSearchSongUseCase-any FetchSearchSongUseCase"] = { self.fetchSearchSongUseCase as Any }
localTable["fetchLyricsUseCase-any FetchLyricsUseCase"] = { self.fetchLyricsUseCase as Any }
localTable["fetchNewSongUseCase-any FetchNewSongUseCase"] = { self.fetchNewSongUseCase as Any }
localTable["fetchNewSongsUseCase-any FetchNewSongsUseCase"] = { self.fetchNewSongsUseCase as Any }
localTable["signInComponent-SignInComponent"] = { self.signInComponent as Any }
localTable["storageComponent-StorageComponent"] = { self.storageComponent as Any }
Expand Down
5 changes: 1 addition & 4 deletions Projects/Services/APIKit/Sources/API/SongsAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Foundation

public enum SongsAPI {
case fetchSearchSong(type: SearchType, keyword: String)
case fetchNewSong(type: NewSongGroupType)
case fetchLyrics(id: String)
case fetchNewSongs(type: NewSongGroupType, page: Int, limit: Int)
}
Expand All @@ -28,8 +27,6 @@ extension SongsAPI: WMAPI {
switch self {
case .fetchSearchSong:
return "/search"
case let .fetchNewSong(type):
return "/new/\(type.apiKey)"
case .fetchLyrics(id: let id):
return "/lyrics/\(id)"
case let .fetchNewSongs(type, _, _):
Expand All @@ -50,7 +47,7 @@ extension SongsAPI: WMAPI {
"keyword": keyword
], encoding: URLEncoding.queryString)

case .fetchLyrics, .fetchNewSong:
case .fetchLyrics:
return .requestPlain

case let .fetchNewSongs(_, page, limit):
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ public struct SongsRepositoryImpl: SongsRepository {
remoteSongsDataSource.fetchLyrics(id: id)
}

public func fetchNewSong(type: NewSongGroupType) -> Single<[NewSongEntity]> {
remoteSongsDataSource.fetchNewSong(type: type)
}

public func fetchNewSongs(type: NewSongGroupType, page: Int, limit: Int) -> Single<[NewSongsEntity]> {
remoteSongsDataSource.fetchNewSongs(type: type, page: page, limit: limit)
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ import Foundation
public protocol SongsRepository {
func fetchSearchSong(type: SearchType, keyword: String) -> Single<[SongEntity]>
func fetchLyrics(id: String) -> Single<[LyricsEntity]>
func fetchNewSong(type: NewSongGroupType) -> Single<[NewSongEntity]>
func fetchNewSongs(type: NewSongGroupType, page: Int, limit: Int) -> Single<[NewSongsEntity]>
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Foundation

public protocol RemoteSongsDataSource {
func fetchSearchSong(type: SearchType,keyword: String) -> Single<[SongEntity]>
func fetchNewSong(type: NewSongGroupType) -> Single<[NewSongEntity]>
func fetchLyrics(id: String) -> Single<[LyricsEntity]>
func fetchNewSongs(type: NewSongGroupType, page: Int, limit: Int) -> Single<[NewSongsEntity]>
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ public final class RemoteSongsDataSourceImpl: BaseRemoteDataSource<SongsAPI>, Re
.map{$0.map{$0.toDomain()}}
}

public func fetchNewSong(type: NewSongGroupType) -> Single<[NewSongEntity]> {
request(.fetchNewSong(type: type))
.map([NewSongResponseDTO].self)
.map{$0.map{$0.toDomain()}}
}

public func fetchLyrics(id: String) -> Single<[LyricsEntity]> {
request(.fetchLyrics(id: id))
.map([LyricsResponseDTO].self)
Expand Down

0 comments on commit b15d406

Please sign in to comment.