{
static func getAlbumsByArtist(artistId: Int, successCompletion: @escaping (AlbumsByArtist?) -> Void, errorCompletion: @escaping ErrorCompletionBlock) {
AlbumsAPI.getAlbums(artistId: artistId) { model, error in
DataProvider().responseHandler(model, error: error, successCompletion: successCompletion, errorCompletion: errorCompletion)
}
}
static func getAlbumDetails(albumId: Int, successCompletion: @escaping (Album?) -> Void, errorCompletion: @escaping ErrorCompletionBlock) {
AlbumsAPI.getAlbumDetails(albumId: albumId) { model, error in
DataProvider().responseHandler(model, error: error, successCompletion: successCompletion, errorCompletion: errorCompletion)
}
}
static func getSongsForAlbum(albumId: Int, successCompletion: @escaping (SongsInAlbum?) -> Void, errorCompletion: @escaping ErrorCompletionBlock) {
AlbumsAPI.getSongsForAlbum(albumId: albumId) { model, error in
DataProvider().responseHandler(model, error: error, successCompletion: successCompletion, errorCompletion: errorCompletion)
}
}
}
на dpaste.org залей
Обсуждают сегодня