public async Task <RecommendationsViewModel> GetRecommendationsAsync(IEnumerable <string> preferedMusic, int energyPercent) { (IEnumerable <string> artistsIds, IEnumerable <string> genresIds) = GetArtistsAndGenresIds(preferedMusic); RecommendationsResponse recommendationsResponse = await _spotifyService.GetRecommendationsAsync(artistsIds, genresIds, energyPercent); IEnumerable <RecommendationViewModel> recommendations = recommendationsResponse.Tracks .Select(CreateRecommendationViewModel); return(new RecommendationsViewModel(PageName, recommendations)); }