Closed rudrankriyam closed 2 years ago
With the current implementation, it feels confusing to use and get an array of albums from the items:
var recentlyPlayedAlbums: [Album] = [] let request = MusicHistoryRequest(for: .recentlyPlayed) let response = try await request.response() recentlyPlayedAlbums = response.items.compactMap { item in switch item { case .album(let album): return album default: return nil } }
It would be nice if you could directly fetch the items:
var recentlyPlayedAlbums: Albums? let request = MusicHistoryRequest(for: .recentlyPlayed) let response = try await request.response() recentlyPlayedAlbums = response.albums
With the current implementation, it feels confusing to use and get an array of albums from the items:
It would be nice if you could directly fetch the items: