Created
April 16, 2020 23:48
-
-
Save DenisBronx/4115ae0973d6f3ec20c279e5439afc48 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
object FPRepositoryFactory { | |
fun makeAlbumRepository(): AlbumRepository { | |
return AlbumRepositoryImpl( | |
AlbumApiServiceImpl(), | |
makeAlbumDataMapper() | |
) | |
} | |
private fun makeAlbumDataMapper(): (NetworkAlbum) -> Album = { albumDto -> | |
mapAlbumDto(albumDto) { listItemDto -> | |
mapNullInputList(listItemDto) { songDto -> | |
mapSongDto(songDto) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment