|
10 | 10 |
|
11 | 11 | namespace SpotifyAPI.Web |
12 | 12 | { |
| 13 | + // ReSharper disable once InconsistentNaming |
13 | 14 | public sealed class SpotifyWebAPI : IDisposable |
14 | 15 | { |
15 | 16 | [Obsolete("This Property will be removed soon. Please use SpotifyWebBuilder.APIBase")] |
@@ -461,6 +462,82 @@ public async Task<CategoryPlaylist> GetCategoryPlaylistsAsync(string categoryId, |
461 | 462 | return await DownloadDataAsync<CategoryPlaylist>(_builder.GetCategoryPlaylists(categoryId, country, limit, offset)); |
462 | 463 | } |
463 | 464 |
|
| 465 | + /// <summary> |
| 466 | + /// Create a playlist-style listening experience based on seed artists, tracks and genres. |
| 467 | + /// </summary> |
| 468 | + /// <param name="artistSeed">A comma separated list of Spotify IDs for seed artists. |
| 469 | + /// Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. |
| 470 | + /// </param> |
| 471 | + /// <param name="genreSeed">A comma separated list of any genres in the set of available genre seeds. |
| 472 | + /// Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. |
| 473 | + /// </param> |
| 474 | + /// <param name="trackSeed">A comma separated list of Spotify IDs for a seed track. |
| 475 | + /// Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. |
| 476 | + /// </param> |
| 477 | + /// <param name="target">Tracks with the attribute values nearest to the target values will be preferred.</param> |
| 478 | + /// <param name="min">For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided</param> |
| 479 | + /// <param name="max">For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided</param> |
| 480 | + /// <param name="limit">The target size of the list of recommended tracks. Default: 20. Minimum: 1. Maximum: 100. |
| 481 | + /// For seeds with unusually small pools or when highly restrictive filtering is applied, it may be impossible to generate the requested number of recommended tracks. |
| 482 | + /// </param> |
| 483 | + /// <param name="market">An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking. |
| 484 | + /// Because min_*, max_* and target_* are applied to pools before relinking, the generated results may not precisely match the filters applied.</param> |
| 485 | + /// <returns></returns> |
| 486 | + /// <remarks>AUTH NEEDED</remarks> |
| 487 | + public Recommendations GetRecommendations(List<string> artistSeed = null, List<string> genreSeed = null, List<string> trackSeed = null, |
| 488 | + TuneableTrack target = null, TuneableTrack min = null, TuneableTrack max = null, int limit = 20, string market = "") |
| 489 | + { |
| 490 | + return DownloadData<Recommendations>(_builder.GetRecommendations(artistSeed, genreSeed, trackSeed, target, min, max, limit, market)); |
| 491 | + } |
| 492 | + |
| 493 | + /// <summary> |
| 494 | + /// Create a playlist-style listening experience based on seed artists, tracks and genres asynchronously. |
| 495 | + /// </summary> |
| 496 | + /// <param name="artistSeed">A comma separated list of Spotify IDs for seed artists. |
| 497 | + /// Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. |
| 498 | + /// </param> |
| 499 | + /// <param name="genreSeed">A comma separated list of any genres in the set of available genre seeds. |
| 500 | + /// Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. |
| 501 | + /// </param> |
| 502 | + /// <param name="trackSeed">A comma separated list of Spotify IDs for a seed track. |
| 503 | + /// Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. |
| 504 | + /// </param> |
| 505 | + /// <param name="target">Tracks with the attribute values nearest to the target values will be preferred.</param> |
| 506 | + /// <param name="min">For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided</param> |
| 507 | + /// <param name="max">For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided</param> |
| 508 | + /// <param name="limit">The target size of the list of recommended tracks. Default: 20. Minimum: 1. Maximum: 100. |
| 509 | + /// For seeds with unusually small pools or when highly restrictive filtering is applied, it may be impossible to generate the requested number of recommended tracks. |
| 510 | + /// </param> |
| 511 | + /// <param name="market">An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking. |
| 512 | + /// Because min_*, max_* and target_* are applied to pools before relinking, the generated results may not precisely match the filters applied.</param> |
| 513 | + /// <returns></returns> |
| 514 | + /// <remarks>AUTH NEEDED</remarks> |
| 515 | + public async Task<Recommendations> GetRecommendationsAsync(List<string> artistSeed = null, List<string> genreSeed = null, List<string> trackSeed = null, |
| 516 | + TuneableTrack target = null, TuneableTrack min = null, TuneableTrack max = null, int limit = 20, string market = "") |
| 517 | + { |
| 518 | + return await DownloadDataAsync<Recommendations>(_builder.GetRecommendations(artistSeed, genreSeed, trackSeed, target, min, max, limit, market)); |
| 519 | + } |
| 520 | + |
| 521 | + /// <summary> |
| 522 | + /// Retrieve a list of available genres seed parameter values for recommendations. |
| 523 | + /// </summary> |
| 524 | + /// <returns></returns> |
| 525 | + /// <remarks>AUTH NEEDED</remarks> |
| 526 | + public RecommendationSeedGenres GetRecommendationSeedsGenres() |
| 527 | + { |
| 528 | + return DownloadData<RecommendationSeedGenres>(_builder.GetRecommendationSeedsGenres()); |
| 529 | + } |
| 530 | + |
| 531 | + /// <summary> |
| 532 | + /// Retrieve a list of available genres seed parameter values for recommendations asynchronously. |
| 533 | + /// </summary> |
| 534 | + /// <returns></returns> |
| 535 | + /// <remarks>AUTH NEEDED</remarks> |
| 536 | + public async Task<RecommendationSeedGenres> GetRecommendationSeedsGenresAsync() |
| 537 | + { |
| 538 | + return await DownloadDataAsync<RecommendationSeedGenres>(_builder.GetRecommendationSeedsGenres()); |
| 539 | + } |
| 540 | + |
464 | 541 | #endregion Browse |
465 | 542 |
|
466 | 543 | #region Follow |
|
0 commit comments