refactor: consolidate Home API calls from 6 to 1 via discover/index
The discover/index endpoint already returns all editorial content (new_releases, press_awards, most_streamed, qobuzissims, album_of_the_week) in a single response. Previously we made 5 separate get_featured_albums calls plus 1 discover call. - Add missing containers to Rust DiscoverContainers struct - Add missing containers to TypeScript DiscoverContainers interface - Replace fetchFeaturedAlbums x5 + fetchDiscoverData with single fetchAllDiscoverData that extracts all sections from one API call - Add discoverAlbumToCardData() converter for DiscoverAlbum -> AlbumCardData - Genre filtering now handled by discover/index genre_ids parameter
This commit is contained in:
1 parent
af36b08af1
commit
1aa23dae9b
3 files changed
+98
-140
No files matched your search
@@ -365,6 +365,10 @@ pub struct DiscoverContainers {
|
||||
pub ideal_discography: Option<DiscoverContainer<DiscoverAlbum>>,
|
||||
pub playlists_tags: Option<DiscoverContainer<PlaylistTag>>,
|
||||
pub new_releases: Option<DiscoverContainer<DiscoverAlbum>>,
|
||||
pub qobuzissims: Option<DiscoverContainer<DiscoverAlbum>>,
|
||||
pub most_streamed: Option<DiscoverContainer<DiscoverAlbum>>,
|
||||
pub press_awards: Option<DiscoverContainer<DiscoverAlbum>>,
|
||||
pub album_of_the_week: Option<DiscoverContainer<DiscoverAlbum>>,
|
||||
}
|
||||
|
||||
/// Generic discover container
|
||||
|
||||
Reference in new issue
Block a user