Created
June 24, 2019 18:45
-
-
Save Arrlindii/9a102d1d5fb0db834f529d636f5da019 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
| networkService.request(.login(username: username, password: password)) | |
| .flatMap { token in | |
| networkService.request(.playlists(token)) | |
| }.flatMap { playlists in | |
| let playlist = playlists.first | |
| networkService.request(.songs(for: playlist.id)) | |
| }.sink(receiveCompletion: { _ in | |
| UIApplication.shared.isNetworkActivityIndicatorVisible = false | |
| }, receiveValue: { songs in | |
| self.configure(with: songs) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment