From b2884debcd13a451de799af1f12f3caa6f3b5986 Mon Sep 17 00:00:00 2001 From: Jonas Dellinger Date: Thu, 28 May 2020 16:30:17 +0200 Subject: [PATCH] Started with Documentation #451 --- .vscode/csharp.code-snippets | 16 +++ .../Clients/Interfaces/IAlbumsClient.cs | 45 ++++++ .../Clients/Interfaces/IArtistsClient.cs | 56 ++++++++ .../Clients/Interfaces/IBrowseClient.cs | 102 ++++++++++++++ .../Clients/Interfaces/IEpisodesClient.cs | 25 ++++ .../Clients/Interfaces/IFollowClient.cs | 83 +++++++++++ .../Clients/Interfaces/ILibraryClient.cs | 130 ++++++++++++++++++ SpotifyAPI.Web/Models/Request/AlbumRequest.cs | 4 + .../Models/Request/AlbumTracksRequest.cs | 14 ++ .../Models/Request/AlbumsRequest.cs | 13 ++ .../Models/Request/ArtistsAlbumsRequest.cs | 21 +++ .../Models/Request/ArtistsRequest.cs | 8 ++ .../Models/Request/ArtistsTopTracksRequest.cs | 8 ++ .../Models/Request/CategoriesRequest.cs | 24 ++++ .../Request/CategoryPlaylistsRequest.cs | 13 ++ .../Models/Request/CategoryRequest.cs | 13 ++ .../Models/Request/EpisodeRequest.cs | 9 ++ .../Models/Request/EpisodesRequest.cs | 17 +++ .../Request/FeaturedPlaylistsRequest.cs | 32 +++++ .../Request/FollowCheckCurrentUserRequest.cs | 19 +++ .../Request/FollowCheckPlaylistRequest.cs | 14 ++ .../Request/FollowGetCurrentUserRequest.cs | 16 +++ .../Models/Request/FollowPlaylistRequest.cs | 6 + .../Models/Request/FollowRequest.cs | 19 +++ .../Models/Request/LibraryAlbumsRequest.cs | 14 ++ .../Request/LibraryCheckAlbumsRequest.cs | 11 +- .../Request/LibraryCheckShowsRequest.cs | 8 ++ .../Request/LibraryCheckTracksRequest.cs | 10 ++ .../Request/LibraryRemoveAlbumsRequest.cs | 11 ++ .../Request/LibraryRemoveShowsRequest.cs | 10 ++ .../Request/LibraryRemoveTracksRequest.cs | 12 ++ .../Request/LibrarySaveAlbumsRequest.cs | 12 ++ .../Models/Request/LibrarySaveShowsRequest.cs | 8 ++ .../Request/LibrarySaveTracksRequest.cs | 12 ++ .../Models/Request/LibraryShowsRequest.cs | 12 +- .../Models/Request/LibraryTracksRequest.cs | 14 ++ .../Models/Request/NewReleasesRequest.cs | 15 ++ .../Models/Request/RecommendationsRequest.cs | 58 +++++++- .../Models/Request/UnfollowRequest.cs | 19 +++ 39 files changed, 927 insertions(+), 6 deletions(-) diff --git a/.vscode/csharp.code-snippets b/.vscode/csharp.code-snippets index 7eeb64f1..fa48d127 100644 --- a/.vscode/csharp.code-snippets +++ b/.vscode/csharp.code-snippets @@ -31,5 +31,21 @@ "}" ], "description": "Creates a new request" + }, + "reqcomment": { + "scope": "csharp", + "prefix": "reqcomment", + "body": "The request-model which contains required and optional parameters.", + "description": "Creates a new request comment for XAML" + }, + "remark": { + "scope": "csharp", + "prefix": "remark", + "body": [ + "", + "/// $1", + "/// " + ], + "description": "Creates a new request comment for XAML" } } diff --git a/SpotifyAPI.Web/Clients/Interfaces/IAlbumsClient.cs b/SpotifyAPI.Web/Clients/Interfaces/IAlbumsClient.cs index 7946535c..b8c9d9a8 100644 --- a/SpotifyAPI.Web/Clients/Interfaces/IAlbumsClient.cs +++ b/SpotifyAPI.Web/Clients/Interfaces/IAlbumsClient.cs @@ -4,15 +4,60 @@ namespace SpotifyAPI.Web { public interface IAlbumsClient { + /// + /// Get Spotify catalog information for multiple albums identified by their Spotify IDs. + /// + /// The request-model which contains required and optional parameters + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-multiple-albums + /// + /// Task GetSeveral(AlbumsRequest request); + /// + /// Get Spotify catalog information for a single album. + /// + /// The Spotify ID of the album. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-album + /// + /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")] Task Get(string albumId); + /// + /// Get Spotify catalog information for a single album. + /// + /// The Spotify ID of the album. + /// The request-model which contains required and optional parameters + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-album + /// + /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")] Task Get(string albumId, AlbumRequest request); + /// + /// Get Spotify catalog information about an album’s tracks. + /// Optional parameters can be used to limit the number of tracks returned. + /// + /// The Spotify ID of the album. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-albums-tracks + /// + /// Task> GetTracks(string albumId); + + /// + /// Get Spotify catalog information about an album’s tracks. + /// Optional parameters can be used to limit the number of tracks returned. + /// + /// The Spotify ID of the album. + /// The request-model which contains required and optional parameters + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-albums-tracks + /// + /// Task> GetTracks(string albumId, AlbumTracksRequest request); } } diff --git a/SpotifyAPI.Web/Clients/Interfaces/IArtistsClient.cs b/SpotifyAPI.Web/Clients/Interfaces/IArtistsClient.cs index 423eede6..53032cb7 100644 --- a/SpotifyAPI.Web/Clients/Interfaces/IArtistsClient.cs +++ b/SpotifyAPI.Web/Clients/Interfaces/IArtistsClient.cs @@ -4,16 +4,72 @@ namespace SpotifyAPI.Web { public interface IArtistsClient { + /// + /// Get Spotify catalog information for several artists based on their Spotify IDs. + /// + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-multiple-artists + /// + /// The request-model which contains required and optional parameters + /// Task GetSeveral(ArtistsRequest request); + /// + /// Get Spotify catalog information for a single artist identified by their unique Spotify ID. + /// + /// The Spotify ID of the artist. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artist + /// + /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")] Task Get(string artistId); + /// + /// Get Spotify catalog information about an artist’s albums. + /// Optional parameters can be specified in the query string to filter and sort the response. + /// + /// The Spotify ID for the artist. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artists-albums + /// + /// Task> GetAlbums(string artistId); + + /// + /// Get Spotify catalog information about an artist’s albums. + /// Optional parameters can be specified in the query string to filter and sort the response. + /// + /// The Spotify ID for the artist. + /// The request-model which contains required and optional parameters + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artists-albums + /// + /// Task> GetAlbums(string artistId, ArtistsAlbumsRequest request); + + /// + /// Get Spotify catalog information about an artist’s top tracks by country. + /// + /// The Spotify ID for the artist + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artists-top-tracks + /// + /// Task GetTopTracks(string artistId, ArtistsTopTracksRequest request); + + /// + /// Get Spotify catalog information about artists similar to a given artist. + /// Similarity is based on analysis of the Spotify community’s listening history. + /// + /// The Spotify ID for the artist + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artists-related-artists + /// + /// Task GetRelatedArtists(string artistId); } } diff --git a/SpotifyAPI.Web/Clients/Interfaces/IBrowseClient.cs b/SpotifyAPI.Web/Clients/Interfaces/IBrowseClient.cs index 521d6f26..955437c7 100644 --- a/SpotifyAPI.Web/Clients/Interfaces/IBrowseClient.cs +++ b/SpotifyAPI.Web/Clients/Interfaces/IBrowseClient.cs @@ -4,22 +4,124 @@ namespace SpotifyAPI.Web { public interface IBrowseClient { + /// + /// Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab). + /// + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-categories + /// + /// Task GetCategories(); + + /// + /// Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab). + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-categories + /// + /// Task GetCategories(CategoriesRequest request); + /// + /// Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab). + /// + /// The Spotify category ID for the category. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-a-category + /// + /// Task GetCategory(string categoryId); + + /// + /// Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab). + /// + /// The Spotify category ID for the category. + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-a-category + /// + /// Task GetCategory(string categoryId, CategoryRequest request); + /// + /// Get a list of Spotify playlists tagged with a particular category. + /// + /// The Spotify category ID for the category. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-a-categories-playlists + /// + /// Task GetCategoryPlaylists(string categoryId); + + /// + /// Get a list of Spotify playlists tagged with a particular category. + /// + /// The Spotify category ID for the category. + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-a-categories-playlists + /// + /// Task GetCategoryPlaylists(string categoryId, CategoriesPlaylistsRequest request); + /// + /// Recommendations are generated based on the available information for a given seed entity and matched against + /// similar artists and tracks. If there is sufficient information about the provided seeds, + /// a list of tracks will be returned together with pool size details. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-recommendations + /// + /// Task GetRecommendations(RecommendationsRequest request); + + /// + /// Retrieve a list of available genres seed parameter values for recommendations. + /// + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-recommendation-genres + /// + /// Task GetRecommendationGenres(); + /// + /// Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab). + /// + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-new-releases + /// + /// Task GetNewReleases(); + + /// + /// Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab). + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-new-releases + /// + /// Task GetNewReleases(NewReleasesRequest request); + /// + /// Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s ‘Browse’ tab). + /// + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-featured-playlists + /// + /// Task GetFeaturedPlaylists(); + + /// + /// Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s ‘Browse’ tab). + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-featured-playlists + /// + /// Task GetFeaturedPlaylists(FeaturedPlaylistsRequest request); } } diff --git a/SpotifyAPI.Web/Clients/Interfaces/IEpisodesClient.cs b/SpotifyAPI.Web/Clients/Interfaces/IEpisodesClient.cs index b7acb70a..0d720ed3 100644 --- a/SpotifyAPI.Web/Clients/Interfaces/IEpisodesClient.cs +++ b/SpotifyAPI.Web/Clients/Interfaces/IEpisodesClient.cs @@ -4,12 +4,37 @@ namespace SpotifyAPI.Web { public interface IEpisodesClient { + /// + /// Get Spotify catalog information for a single episode identified by its unique Spotify ID. + /// + /// The Spotify ID for the episode. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-episode + /// + /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")] Task Get(string episodeId); + /// + /// Get Spotify catalog information for a single episode identified by its unique Spotify ID. + /// + /// The Spotify ID for the episode. + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-episode + /// + /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")] Task Get(string episodeId, EpisodeRequest request); + /// + /// Get Spotify catalog information for several episodes based on their Spotify IDs. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-multiple-episodes + /// + /// Task GetSeveral(EpisodesRequest request); } } diff --git a/SpotifyAPI.Web/Clients/Interfaces/IFollowClient.cs b/SpotifyAPI.Web/Clients/Interfaces/IFollowClient.cs index a4cccbdc..8a80764f 100644 --- a/SpotifyAPI.Web/Clients/Interfaces/IFollowClient.cs +++ b/SpotifyAPI.Web/Clients/Interfaces/IFollowClient.cs @@ -5,20 +5,103 @@ namespace SpotifyAPI.Web { public interface IFollowClient { + /// + /// Check to see if the current user is following one or more artists or other Spotify users. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-check-current-user-follows + /// + /// Task> CheckCurrentUser(FollowCheckCurrentUserRequest request); + /// + /// Check to see if one or more Spotify users are following a specified playlist. + /// + /// The Spotify ID of the playlist. + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-check-if-user-follows-playlist + /// + /// Task> CheckPlaylist(string playlistId, FollowCheckPlaylistRequest request); + /// + /// Add the current user as a follower of one or more artists or other Spotify users. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-follow-artists-users + /// + /// Task Follow(FollowRequest request); + /// + /// Add the current user as a follower of a playlist. + /// + /// + /// The Spotify ID of the playlist. + /// Any playlist can be followed, regardless of its public/private status, + /// as long as you know its playlist ID. + /// + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-follow-playlist + /// + /// Task FollowPlaylist(string playlistId); + + /// + /// Add the current user as a follower of a playlist. + /// + /// + /// The Spotify ID of the playlist. + /// Any playlist can be followed, regardless of its public/private status, + /// as long as you know its playlist ID. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-follow-playlist + /// + /// Task FollowPlaylist(string playlistId, FollowPlaylistRequest request); + /// + /// Get the current user’s followed artists. + /// + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-followed + /// + /// Task OfCurrentUser(); + + /// + /// Get the current user’s followed artists. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-followed + /// + /// Task OfCurrentUser(FollowOfCurrentUserRequest request); + /// + /// Remove the current user as a follower of one or more artists or other Spotify users. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-unfollow-artists-users + /// + /// Task Unfollow(UnfollowRequest request); + /// + /// Remove the current user as a follower of a playlist. + /// + /// The Spotify ID of the playlist that is to be no longer followed. + /// + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-unfollow-playlist + /// Task UnfollowPlaylist(string playlistId); } } diff --git a/SpotifyAPI.Web/Clients/Interfaces/ILibraryClient.cs b/SpotifyAPI.Web/Clients/Interfaces/ILibraryClient.cs index ee4a4811..9ca871ee 100644 --- a/SpotifyAPI.Web/Clients/Interfaces/ILibraryClient.cs +++ b/SpotifyAPI.Web/Clients/Interfaces/ILibraryClient.cs @@ -5,23 +5,153 @@ namespace SpotifyAPI.Web { public interface ILibraryClient { + /// + /// Remove one or more albums from the current user’s ‘Your Music’ library. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-remove-albums-user + /// + /// Task RemoveAlbums(LibraryRemoveAlbumsRequest request); + + /// + /// Remove one or more tracks from the current user’s ‘Your Music’ library. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-remove-tracks-user + /// + /// Task RemoveTracks(LibraryRemoveTracksRequest request); + + /// + /// Delete one or more shows from current Spotify user’s library. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-remove-shows-user + /// + /// Task RemoveShows(LibraryRemoveShowsRequest request); + /// + /// Save one or more tracks to the current user’s ‘Your Music’ library. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-save-tracks-user + /// + /// Task SaveTracks(LibrarySaveTracksRequest request); + + /// + /// Save one or more albums to the current user’s ‘Your Music’ library. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-save-albums-user + /// + /// Task SaveAlbums(LibrarySaveAlbumsRequest request); + + /// + /// Save one or more shows to current Spotify user’s library. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-save-shows-user + /// + /// Task SaveShows(LibrarySaveShowsRequest request); + /// + /// Check if one or more tracks is already saved in the current Spotify user’s ‘Your Music’ library. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-check-users-saved-tracks + /// + /// Task> CheckTracks(LibraryCheckTracksRequest request); + + /// + /// Check if one or more albums is already saved in the current Spotify user’s ‘Your Music’ library. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-check-users-saved-albums + /// + /// Task> CheckAlbums(LibraryCheckAlbumsRequest request); + + /// + /// Check if one or more shows is already saved in the current Spotify user’s library. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-check-users-saved-shows + /// + /// Task> CheckShows(LibraryCheckShowsRequest request); + /// + /// Get a list of the songs saved in the current Spotify user’s ‘Your Music’ library. + /// + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-tracks + /// + /// Task> GetTracks(); + + /// + /// Get a list of the songs saved in the current Spotify user’s ‘Your Music’ library. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-tracks + /// + /// Task> GetTracks(LibraryTracksRequest request); + + /// + /// Get a list of the albums saved in the current Spotify user’s ‘Your Music’ library. + /// + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-albums + /// + /// Task> GetAlbums(); + + /// + /// Get a list of the albums saved in the current Spotify user’s ‘Your Music’ library. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-albums + /// + /// Task> GetAlbums(LibraryAlbumsRequest request); + + /// + /// Get a list of shows saved in the current Spotify user’s library. + /// Optional parameters can be used to limit the number of shows returned. + /// + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-shows + /// + /// Task> GetShows(); + + /// + /// Get a list of shows saved in the current Spotify user’s library. + /// Optional parameters can be used to limit the number of shows returned. + /// + /// The request-model which contains required and optional parameters. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-shows + /// + /// Task> GetShows(LibraryShowsRequest request); } } diff --git a/SpotifyAPI.Web/Models/Request/AlbumRequest.cs b/SpotifyAPI.Web/Models/Request/AlbumRequest.cs index 0154d447..db30953c 100644 --- a/SpotifyAPI.Web/Models/Request/AlbumRequest.cs +++ b/SpotifyAPI.Web/Models/Request/AlbumRequest.cs @@ -2,6 +2,10 @@ namespace SpotifyAPI.Web { public class AlbumRequest : RequestParams { + /// + /// The market you’d like to request. Synonym for country. + /// + /// [QueryParam("market")] public string? Market { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/AlbumTracksRequest.cs b/SpotifyAPI.Web/Models/Request/AlbumTracksRequest.cs index 6e3d443a..00a165ee 100644 --- a/SpotifyAPI.Web/Models/Request/AlbumTracksRequest.cs +++ b/SpotifyAPI.Web/Models/Request/AlbumTracksRequest.cs @@ -2,12 +2,26 @@ namespace SpotifyAPI.Web { public class AlbumTracksRequest : RequestParams { + /// + /// An ISO 3166-1 alpha-2 country code or the string from_token. + /// Provide this parameter if you want to apply Track Relinking. + /// + /// [QueryParam("market")] public string? Market { get; set; } + /// + /// The maximum number of tracks to return. Default: 20. Minimum: 1. Maximum: 50. + /// + /// [QueryParam("limit")] public int? Limit { get; set; } + /// + /// The index of the first track to return. Default: 0 (the first object). + /// Use with limit to get the next set of tracks. + /// + /// [QueryParam("offset")] public int? Offset { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/AlbumsRequest.cs b/SpotifyAPI.Web/Models/Request/AlbumsRequest.cs index f36f5403..e858893d 100644 --- a/SpotifyAPI.Web/Models/Request/AlbumsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/AlbumsRequest.cs @@ -4,6 +4,10 @@ namespace SpotifyAPI.Web { public class AlbumsRequest : RequestParams { + /// + /// AlbumsRequest + /// + /// A comma-separated list of the Spotify IDs for the albums. Maximum: 20 IDs. public AlbumsRequest(IList ids) { Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids)); @@ -11,9 +15,18 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of the Spotify IDs for the albums. Maximum: 20 IDs. + /// + /// [QueryParam("ids")] public IList Ids { get; } + /// + /// An ISO 3166-1 alpha-2 country code or the string from_token. + /// Provide this parameter if you want to apply Track Relinking. + /// + /// [QueryParam("market")] public string? Market { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/ArtistsAlbumsRequest.cs b/SpotifyAPI.Web/Models/Request/ArtistsAlbumsRequest.cs index 2ae8a268..36cd2ee6 100644 --- a/SpotifyAPI.Web/Models/Request/ArtistsAlbumsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/ArtistsAlbumsRequest.cs @@ -4,15 +4,36 @@ namespace SpotifyAPI.Web { public class ArtistsAlbumsRequest : RequestParams { + /// + /// A comma-separated list of keywords that will be used to filter the response. + /// If not supplied, all album types will be returned. + /// + /// [QueryParam("include_groups")] public IncludeGroups? IncludeGroupsParam { get; set; } + /// + /// Synonym for country. An ISO 3166-1 alpha-2 country code or the string from_token. + /// Supply this parameter to limit the response to one particular geographical market. + /// For example, for albums available in Sweden: market=SE. + /// If not given, results will be returned for all markets and you are likely to get duplicate results per album, + /// one for each market in which the album is available! + /// + /// [QueryParam("market")] public string? Market { get; set; } + /// + /// The number of album objects to return. Default: 20. Minimum: 1. Maximum: 50. For example: limit=2 + /// + /// [QueryParam("limit")] public int? Limit { get; set; } + /// + /// The index of the first album to return. Default: 0 (i.e., the first album). Use with limit to get the next set of albums. + /// + /// [QueryParam("offset")] public int? Offset { get; set; } diff --git a/SpotifyAPI.Web/Models/Request/ArtistsRequest.cs b/SpotifyAPI.Web/Models/Request/ArtistsRequest.cs index 7342f766..a5305e63 100644 --- a/SpotifyAPI.Web/Models/Request/ArtistsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/ArtistsRequest.cs @@ -4,6 +4,10 @@ namespace SpotifyAPI.Web { public class ArtistsRequest : RequestParams { + /// + /// ArtistsRequest + /// + /// A comma-separated list of the Spotify IDs for the artists. Maximum: 50 IDs. public ArtistsRequest(IList ids) { Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids)); @@ -11,6 +15,10 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of the Spotify IDs for the artists. Maximum: 50 IDs. + /// + /// [QueryParam("ids")] public IList Ids { get; } } diff --git a/SpotifyAPI.Web/Models/Request/ArtistsTopTracksRequest.cs b/SpotifyAPI.Web/Models/Request/ArtistsTopTracksRequest.cs index 9aaff456..26cecbc5 100644 --- a/SpotifyAPI.Web/Models/Request/ArtistsTopTracksRequest.cs +++ b/SpotifyAPI.Web/Models/Request/ArtistsTopTracksRequest.cs @@ -2,6 +2,10 @@ namespace SpotifyAPI.Web { public class ArtistsTopTracksRequest : RequestParams { + /// + /// An ISO 3166-1 alpha-2 country code or the string from_token. Synonym for country. + /// + /// public ArtistsTopTracksRequest(string market) { Ensure.ArgumentNotNullOrEmptyString(market, nameof(market)); @@ -9,6 +13,10 @@ namespace SpotifyAPI.Web Market = market; } + /// + /// An ISO 3166-1 alpha-2 country code or the string from_token. Synonym for country. + /// + /// [QueryParam("market")] public string Market { get; } } diff --git a/SpotifyAPI.Web/Models/Request/CategoriesRequest.cs b/SpotifyAPI.Web/Models/Request/CategoriesRequest.cs index 8dd92e1c..5b0a5b86 100644 --- a/SpotifyAPI.Web/Models/Request/CategoriesRequest.cs +++ b/SpotifyAPI.Web/Models/Request/CategoriesRequest.cs @@ -2,15 +2,39 @@ namespace SpotifyAPI.Web { public class CategoriesRequest : RequestParams { + /// + /// A country: an ISO 3166-1 alpha-2 country code. + /// Provide this parameter if you want to narrow the list of returned categories to those relevant to a particular country. + /// If omitted, the returned items will be globally relevant. + /// + /// [QueryParam("country")] public string? Country { get; set; } + /// + /// The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code, + /// joined by an underscore. For example: es_MX, meaning “Spanish (Mexico)”. Provide this parameter if + /// you want the category metadata returned in a particular language. + /// Note that, if locale is not supplied, or if the specified language is not available, all strings will + /// be returned in the Spotify default language (American English). + /// The locale parameter, combined with the country parameter, may give odd results if not carefully matched. + /// For example country=SE&locale=de_DE will return a list of categories relevant to Sweden but as German language strings. + /// + /// [QueryParam("locale")] public string? Locale { get; set; } + /// + /// The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50. + /// + /// [QueryParam("limit")] public int? Limit { get; set; } + /// + /// The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of categories. + /// + /// [QueryParam("offset")] public int? Offset { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/CategoryPlaylistsRequest.cs b/SpotifyAPI.Web/Models/Request/CategoryPlaylistsRequest.cs index 65ecb340..84e6b186 100644 --- a/SpotifyAPI.Web/Models/Request/CategoryPlaylistsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/CategoryPlaylistsRequest.cs @@ -2,12 +2,25 @@ namespace SpotifyAPI.Web { public class CategoriesPlaylistsRequest : RequestParams { + /// + /// A country: an ISO 3166-1 alpha-2 country code. + /// Provide this parameter to ensure that the category exists for a particular country. + /// + /// [QueryParam("country")] public string? Country { get; set; } + /// + /// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. + /// + /// [QueryParam("limit")] public int? Limit { get; set; } + /// + /// The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items. + /// + /// [QueryParam("offset")] public int? Offset { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/CategoryRequest.cs b/SpotifyAPI.Web/Models/Request/CategoryRequest.cs index 306a4976..9cf14c45 100644 --- a/SpotifyAPI.Web/Models/Request/CategoryRequest.cs +++ b/SpotifyAPI.Web/Models/Request/CategoryRequest.cs @@ -2,9 +2,22 @@ namespace SpotifyAPI.Web { public class CategoryRequest : RequestParams { + /// + /// A country: an ISO 3166-1 alpha-2 country code. + /// Provide this parameter to ensure that the category exists for a particular country. + /// + /// [QueryParam("country")] public string? Country { get; set; } + /// + /// The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code, + /// joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)". + /// Provide this parameter if you want the category strings returned in a particular language. + /// Note that, if locale is not supplied, or if the specified language is not available, + /// the category strings returned will be in the Spotify default language (American English). + /// + /// [QueryParam("locale")] public string? Locale { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/EpisodeRequest.cs b/SpotifyAPI.Web/Models/Request/EpisodeRequest.cs index 28e034ee..2a456579 100644 --- a/SpotifyAPI.Web/Models/Request/EpisodeRequest.cs +++ b/SpotifyAPI.Web/Models/Request/EpisodeRequest.cs @@ -2,6 +2,15 @@ namespace SpotifyAPI.Web { public class EpisodeRequest : RequestParams { + /// + /// An ISO 3166-1 alpha-2 country code. If a country code is specified, + /// only shows and episodes that are available in that market will be returned. + /// If a valid user access token is specified in the request header, the country + /// associated with the user account will take priority over this parameter. + /// Note: If neither market or user country are provided, the content is considered unavailable for the client. + /// Users can view the country that is associated with their account in the account settings. + /// + /// [QueryParam("market")] public string? Market { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/EpisodesRequest.cs b/SpotifyAPI.Web/Models/Request/EpisodesRequest.cs index a9450b60..01b0c693 100644 --- a/SpotifyAPI.Web/Models/Request/EpisodesRequest.cs +++ b/SpotifyAPI.Web/Models/Request/EpisodesRequest.cs @@ -4,6 +4,10 @@ namespace SpotifyAPI.Web { public class EpisodesRequest : RequestParams { + /// + /// + /// + /// A comma-separated list of the Spotify IDs for the episodes. Maximum: 50 IDs. public EpisodesRequest(IList ids) { Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids)); @@ -11,9 +15,22 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of the Spotify IDs for the episodes. Maximum: 50 IDs. + /// + /// [QueryParam("ids")] public IList Ids { get; } + /// + /// An ISO 3166-1 alpha-2 country code. If a country code is specified, only shows and episodes + /// that are available in that market will be returned.If a valid user access token is specified + /// in the request header, the country associated with the user account will take priority over + /// this parameter.Note: If neither market or user country are provided, the content is considered + /// unavailable for the client.Users can view the country that is associated with their account + /// in the account settings. + /// + /// [QueryParam("market")] public string? Market { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/FeaturedPlaylistsRequest.cs b/SpotifyAPI.Web/Models/Request/FeaturedPlaylistsRequest.cs index 1cdb1fa7..6aeab6db 100644 --- a/SpotifyAPI.Web/Models/Request/FeaturedPlaylistsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/FeaturedPlaylistsRequest.cs @@ -4,18 +4,50 @@ namespace SpotifyAPI.Web { public class FeaturedPlaylistsRequest : RequestParams { + /// + /// A country: an ISO 3166-1 alpha-2 country code. + /// Provide this parameter if you want the list of returned items to be relevant to a particular country. + /// If omitted, the returned items will be relevant to all countries. + /// + /// [QueryParam("country")] public string? Country { get; set; } + /// + /// The desired language, consisting of a lowercase ISO 639-1 language code and an uppercase ISO 3166-1 + /// alpha-2 country code, joined by an underscore. For example: es_MX, meaning “Spanish (Mexico)”. Provide + /// this parameter if you want the results returned in a particular language (where available). Note that, + /// if locale is not supplied, or if the specified language is not available, all strings will be returned + /// in the Spotify default language (American English). The locale parameter, combined with the country + /// parameter, may give odd results if not carefully matched. + /// For example country=SE&locale=de_DE will return a list of categories relevant to Sweden but as German language strings. + /// + /// [QueryParam("locale")] public string? Locale { get; set; } + /// + /// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. + /// + /// [QueryParam("limit")] public int? Limit { get; set; } + /// + /// The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items. + /// + /// [QueryParam("offset")] public int? Offset { get; set; } + /// + /// A timestamp in ISO 8601 format: yyyy-MM-ddTHH:mm:ss. Use this parameter to specify the user’s + /// local time to get results tailored for that specific date and time in the day. If not provided, + /// the response defaults to the current UTC time. Example: “2014-10-23T09:00:00” for a user whose local + /// time is 9AM. If there were no featured playlists (or there is no data) at the specified time, + /// the response will revert to the current UTC time. + /// + /// public DateTime? Timestamp { get; set; } [QueryParam("timestamp")] diff --git a/SpotifyAPI.Web/Models/Request/FollowCheckCurrentUserRequest.cs b/SpotifyAPI.Web/Models/Request/FollowCheckCurrentUserRequest.cs index 81023c02..e9515fda 100644 --- a/SpotifyAPI.Web/Models/Request/FollowCheckCurrentUserRequest.cs +++ b/SpotifyAPI.Web/Models/Request/FollowCheckCurrentUserRequest.cs @@ -4,6 +4,15 @@ namespace SpotifyAPI.Web { public class FollowCheckCurrentUserRequest : RequestParams { + /// + /// + /// + /// The ID type: either artist or user. + /// + /// A list of the artist or the user Spotify IDs to check. + /// For example: ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q. + /// A maximum of 50 IDs can be sent in one request. + /// public FollowCheckCurrentUserRequest(Type type, IList ids) { Ensure.ArgumentNotNull(type, nameof(type)); @@ -13,9 +22,19 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// The ID type: either artist or user. + /// + /// [QueryParam("type")] public Type TypeParam { get; } + /// + /// A list of the artist or the user Spotify IDs to check. + /// For example: ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q. + /// A maximum of 50 IDs can be sent in one request. + /// + /// [QueryParam("ids")] public IList Ids { get; } diff --git a/SpotifyAPI.Web/Models/Request/FollowCheckPlaylistRequest.cs b/SpotifyAPI.Web/Models/Request/FollowCheckPlaylistRequest.cs index 2110b2ca..24d76db0 100644 --- a/SpotifyAPI.Web/Models/Request/FollowCheckPlaylistRequest.cs +++ b/SpotifyAPI.Web/Models/Request/FollowCheckPlaylistRequest.cs @@ -4,6 +4,14 @@ namespace SpotifyAPI.Web { public class FollowCheckPlaylistRequest : RequestParams { + /// + /// + /// + /// + /// A comma-separated list of Spotify User IDs ; + /// the ids of the users that you want to check to see if they follow the playlist. + /// Maximum: 5 ids. + /// public FollowCheckPlaylistRequest(IList ids) { Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids)); @@ -11,6 +19,12 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of Spotify User IDs ; + /// the ids of the users that you want to check to see if they follow the playlist. + /// Maximum: 5 ids. + /// + /// [QueryParam("ids")] public IList Ids { get; } } diff --git a/SpotifyAPI.Web/Models/Request/FollowGetCurrentUserRequest.cs b/SpotifyAPI.Web/Models/Request/FollowGetCurrentUserRequest.cs index d70eafbe..f58be579 100644 --- a/SpotifyAPI.Web/Models/Request/FollowGetCurrentUserRequest.cs +++ b/SpotifyAPI.Web/Models/Request/FollowGetCurrentUserRequest.cs @@ -2,17 +2,33 @@ namespace SpotifyAPI.Web { public class FollowOfCurrentUserRequest : RequestParams { + /// + /// The ID type: currently only artist is supported. + /// + /// public FollowOfCurrentUserRequest(Type type = Type.Artist) { TypeParam = type; } + /// + /// The ID type: currently only artist is supported. + /// + /// [QueryParam("type")] public Type TypeParam { get; set; } + /// + /// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. + /// + /// [QueryParam("limit")] public int? Limit { get; set; } + /// + /// The last artist ID retrieved from the previous request. + /// + /// [QueryParam("after")] public string? After { get; set; } diff --git a/SpotifyAPI.Web/Models/Request/FollowPlaylistRequest.cs b/SpotifyAPI.Web/Models/Request/FollowPlaylistRequest.cs index 4e6cf2b1..714a3fc8 100644 --- a/SpotifyAPI.Web/Models/Request/FollowPlaylistRequest.cs +++ b/SpotifyAPI.Web/Models/Request/FollowPlaylistRequest.cs @@ -2,6 +2,12 @@ namespace SpotifyAPI.Web { public class FollowPlaylistRequest : RequestParams { + /// + /// Defaults to true. If true the playlist will be included in user’s public playlists, + /// if false it will remain private. To be able to follow playlists privately, + /// the user must have granted the playlist-modify-private scope. + /// + /// [BodyParam("public")] public bool? Public { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/FollowRequest.cs b/SpotifyAPI.Web/Models/Request/FollowRequest.cs index 8c2e0285..96b932b6 100644 --- a/SpotifyAPI.Web/Models/Request/FollowRequest.cs +++ b/SpotifyAPI.Web/Models/Request/FollowRequest.cs @@ -4,6 +4,15 @@ namespace SpotifyAPI.Web { public class FollowRequest : RequestParams { + /// + /// + /// + /// The ID type: either artist or user. + /// + /// A comma-separated list of the artist or the user Spotify IDs. + /// For example: ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q. + /// A maximum of 50 IDs can be sent in one request. + /// public FollowRequest(Type type, IList ids) { Ensure.ArgumentNotNull(type, nameof(type)); @@ -13,9 +22,19 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// The ID type: either artist or user. + /// + /// [QueryParam("type")] public Type? TypeParam { get; set; } + /// + /// A comma-separated list of the artist or the user Spotify IDs. + /// For example: ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q. + /// A maximum of 50 IDs can be sent in one request. + /// + /// [BodyParam("ids")] public IList Ids { get; } diff --git a/SpotifyAPI.Web/Models/Request/LibraryAlbumsRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryAlbumsRequest.cs index 3e091d99..0b867f18 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryAlbumsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryAlbumsRequest.cs @@ -2,12 +2,26 @@ namespace SpotifyAPI.Web { public class LibraryAlbumsRequest : RequestParams { + /// + /// The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50. + /// + /// [QueryParam("limit")] public int? Limit { get; set; } + /// + /// The index of the first object to return. Default: 0 (i.e., the first object). + /// Use with limit to get the next set of objects. + /// + /// [QueryParam("offset")] public int? Offset { get; set; } + /// + /// An ISO 3166-1 alpha-2 country code or the string from_token. Provide this parameter + /// if you want to apply Track Relinking. + /// + /// [QueryParam("market")] public string? Market { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/LibraryCheckAlbumsRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryCheckAlbumsRequest.cs index 18aef33f..9ab3e546 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryCheckAlbumsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryCheckAlbumsRequest.cs @@ -4,6 +4,12 @@ namespace SpotifyAPI.Web { public class LibraryCheckAlbumsRequest : RequestParams { + /// + /// + /// + /// + /// A comma-separated list of the Spotify IDs for the albums. Maximum: 50 IDs. + /// public LibraryCheckAlbumsRequest(IList ids) { Ensure.ArgumentNotNull(ids, nameof(ids)); @@ -11,7 +17,10 @@ namespace SpotifyAPI.Web Ids = ids; } - + /// + /// A comma-separated list of the Spotify IDs for the albums. Maximum: 50 IDs. + /// + /// [QueryParam("ids")] public IList Ids { get; } } diff --git a/SpotifyAPI.Web/Models/Request/LibraryCheckShowsRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryCheckShowsRequest.cs index dd5e0cb4..dbe830c9 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryCheckShowsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryCheckShowsRequest.cs @@ -4,6 +4,10 @@ namespace SpotifyAPI.Web { public class LibraryCheckShowsRequest : RequestParams { + /// + /// + /// + /// A comma-separated list of the Spotify IDs for the shows. Maximum: 50 ids. public LibraryCheckShowsRequest(IList ids) { Ensure.ArgumentNotNull(ids, nameof(ids)); @@ -11,6 +15,10 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of the Spotify IDs for the shows. Maximum: 50 ids. + /// + /// [QueryParam("ids")] public IList Ids { get; } } diff --git a/SpotifyAPI.Web/Models/Request/LibraryCheckTracksRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryCheckTracksRequest.cs index d1c21901..2be35b4c 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryCheckTracksRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryCheckTracksRequest.cs @@ -4,6 +4,12 @@ namespace SpotifyAPI.Web { public class LibraryCheckTracksRequest : RequestParams { + /// + /// + /// + /// + /// A comma-separated list of the Spotify IDs for the tracks. Maximum: 50 IDs. + /// public LibraryCheckTracksRequest(IList ids) { Ensure.ArgumentNotNull(ids, nameof(ids)); @@ -11,6 +17,10 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of the Spotify IDs for the tracks. Maximum: 50 IDs. + /// + /// [QueryParam("ids")] public IList Ids { get; } } diff --git a/SpotifyAPI.Web/Models/Request/LibraryRemoveAlbumsRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryRemoveAlbumsRequest.cs index 04cfb2a1..4221cdd1 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryRemoveAlbumsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryRemoveAlbumsRequest.cs @@ -4,6 +4,12 @@ namespace SpotifyAPI.Web { public class LibraryRemoveAlbumsRequest : RequestParams { + /// + /// + /// + /// A comma-separated list of the Spotify IDs. + /// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs. + /// public LibraryRemoveAlbumsRequest(IList ids) { Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids)); @@ -11,6 +17,11 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of the Spotify IDs. + /// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs. + /// + /// [BodyParam("ids")] public IList Ids { get; } } diff --git a/SpotifyAPI.Web/Models/Request/LibraryRemoveShowsRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryRemoveShowsRequest.cs index be60abb4..05a462af 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryRemoveShowsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryRemoveShowsRequest.cs @@ -4,6 +4,12 @@ namespace SpotifyAPI.Web { public class LibraryRemoveShowsRequest : RequestParams { + /// + /// + /// + /// + /// A comma-separated list of Spotify IDs for the shows to be deleted from the user’s library. + /// public LibraryRemoveShowsRequest(IList ids) { Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids)); @@ -11,6 +17,10 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of Spotify IDs for the shows to be deleted from the user’s library. + /// + /// [BodyParam("ids")] public IList Ids { get; } } diff --git a/SpotifyAPI.Web/Models/Request/LibraryRemoveTracksRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryRemoveTracksRequest.cs index c2c044c7..e21d1900 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryRemoveTracksRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryRemoveTracksRequest.cs @@ -4,6 +4,13 @@ namespace SpotifyAPI.Web { public class LibraryRemoveTracksRequest : RequestParams { + /// + /// + /// + /// + /// A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. + /// Maximum: 50 IDs. + /// public LibraryRemoveTracksRequest(IList ids) { Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids)); @@ -11,6 +18,11 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. + /// Maximum: 50 IDs. + /// + /// [BodyParam("ids")] public IList Ids { get; } } diff --git a/SpotifyAPI.Web/Models/Request/LibrarySaveAlbumsRequest.cs b/SpotifyAPI.Web/Models/Request/LibrarySaveAlbumsRequest.cs index be999422..01261ced 100644 --- a/SpotifyAPI.Web/Models/Request/LibrarySaveAlbumsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibrarySaveAlbumsRequest.cs @@ -4,6 +4,13 @@ namespace SpotifyAPI.Web { public class LibrarySaveAlbumsRequest : RequestParams { + /// + + /// + /// + /// A comma-separated list of the Spotify IDs. + /// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs. + /// public LibrarySaveAlbumsRequest(IList ids) { Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids)); @@ -11,6 +18,11 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of the Spotify IDs. + /// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs. + /// + /// [QueryParam("ids")] public IList Ids { get; } } diff --git a/SpotifyAPI.Web/Models/Request/LibrarySaveShowsRequest.cs b/SpotifyAPI.Web/Models/Request/LibrarySaveShowsRequest.cs index 0f19c64d..6dd617b0 100644 --- a/SpotifyAPI.Web/Models/Request/LibrarySaveShowsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibrarySaveShowsRequest.cs @@ -4,6 +4,10 @@ namespace SpotifyAPI.Web { public class LibrarySaveShowsRequest : RequestParams { + /// + /// + /// + /// A comma-separated list of Spotify IDs for the shows to be added to the user’s library. public LibrarySaveShowsRequest(IList ids) { Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids)); @@ -11,6 +15,10 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of Spotify IDs for the shows to be added to the user’s library. + /// + /// [QueryParam("ids")] public IList Ids { get; } } diff --git a/SpotifyAPI.Web/Models/Request/LibrarySaveTracksRequest.cs b/SpotifyAPI.Web/Models/Request/LibrarySaveTracksRequest.cs index 54589e61..1991de17 100644 --- a/SpotifyAPI.Web/Models/Request/LibrarySaveTracksRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibrarySaveTracksRequest.cs @@ -4,6 +4,13 @@ namespace SpotifyAPI.Web { public class LibrarySaveTracksRequest : RequestParams { + /// + /// + /// + /// + /// A comma-separated list of the Spotify IDs. + /// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs. + /// public LibrarySaveTracksRequest(IList ids) { Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids)); @@ -11,6 +18,11 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// A comma-separated list of the Spotify IDs. + /// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs. + /// + /// [QueryParam("ids")] public IList Ids { get; } } diff --git a/SpotifyAPI.Web/Models/Request/LibraryShowsRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryShowsRequest.cs index c59c309e..0105a5b8 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryShowsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryShowsRequest.cs @@ -2,14 +2,20 @@ namespace SpotifyAPI.Web { public class LibraryShowsRequest : RequestParams { + /// + /// The maximum number of shows to return. Default: 20. Minimum: 1. Maximum: 50 + /// + /// [QueryParam("limit")] public int? Limit { get; set; } + /// + /// The index of the first show to return. Default: 0 (the first object). + /// Use with limit to get the next set of shows. + /// + /// [QueryParam("offset")] public int? Offset { get; set; } - - [QueryParam("market")] - public string? Market { get; set; } } } diff --git a/SpotifyAPI.Web/Models/Request/LibraryTracksRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryTracksRequest.cs index 04016a52..3256b051 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryTracksRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryTracksRequest.cs @@ -2,12 +2,26 @@ namespace SpotifyAPI.Web { public class LibraryTracksRequest : RequestParams { + /// + /// The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50. + /// + /// [QueryParam("limit")] public int? Limit { get; set; } + /// + /// The index of the first object to return. + /// Default: 0 (i.e., the first object). Use with limit to get the next set of objects. + /// + /// [QueryParam("offset")] public int? Offset { get; set; } + /// + /// An ISO 3166-1 alpha-2 country code or the string from_token. + /// Provide this parameter if you want to apply Track Relinking. + /// + /// [QueryParam("market")] public string? Market { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/NewReleasesRequest.cs b/SpotifyAPI.Web/Models/Request/NewReleasesRequest.cs index 84cff1de..0123bbd7 100644 --- a/SpotifyAPI.Web/Models/Request/NewReleasesRequest.cs +++ b/SpotifyAPI.Web/Models/Request/NewReleasesRequest.cs @@ -2,12 +2,27 @@ namespace SpotifyAPI.Web { public class NewReleasesRequest : RequestParams { + /// + /// A country: an ISO 3166-1 alpha-2 country code. + /// Provide this parameter if you want the list of returned items to be relevant to a particular country. + /// If omitted, the returned items will be relevant to all countries. + /// + /// [QueryParam("country")] public string? Country { get; set; } + /// + /// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. + /// + /// [QueryParam("limit")] public int? Limit { get; set; } + /// + /// The index of the first item to return. Default: 0 (the first object). + /// Use with limit to get the next set of items. + /// + /// [QueryParam("offset")] public int? Offset { get; set; } } diff --git a/SpotifyAPI.Web/Models/Request/RecommendationsRequest.cs b/SpotifyAPI.Web/Models/Request/RecommendationsRequest.cs index c8e4564c..c463e2fb 100644 --- a/SpotifyAPI.Web/Models/Request/RecommendationsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/RecommendationsRequest.cs @@ -15,23 +15,77 @@ namespace SpotifyAPI.Web SeedTracks = new List(); } + /// + /// A comma separated list of Spotify IDs for seed artists. + /// Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. + /// + /// [QueryParam("seed_artists")] public IList SeedArtists { get; } + /// + /// A comma separated list of any genres in the set of available genre seeds. + /// Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. + /// + /// [QueryParam("seed_genres")] public IList SeedGenres { get; } + /// + /// A comma separated list of Spotify IDs for a seed track. + /// Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. + /// + /// [QueryParam("seed_tracks")] public IList SeedTracks { get; } + /// + /// The target size of the list of recommended tracks. + /// 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. + /// Debugging information for such cases is available in the response. Default: 20. Minimum: 1. Maximum: 100. + /// + /// [QueryParam("limit")] public int? Limit { get; set; } + /// + /// An ISO 3166-1 alpha-2 country code or the string from_token. + /// Provide this parameter if you want to apply Track Relinking. + /// Because min_*, max_* and target_* are applied to pools before relinking, the generated results + /// may not precisely match the filters applied. Original, + /// non-relinked tracks are available via the linked_from attribute of the relinked track response. + /// + /// [QueryParam("market")] public string? Market { get; set; } + /// + /// Multiple values. For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. + /// See tunable track attributes below for the list of available options. + /// For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. + /// DO NOT INCLUDE min_ IN THE KEY + /// + /// public Dictionary Min { get; } + + /// + /// Multiple values. For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. + /// See tunable track attributes below for the list of available options. + /// For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. + /// DO NOT INCLUDE max_ IN THE KEY + /// + /// public Dictionary Max { get; } + + /// + /// Multiple values. For each of the tunable track attributes (below) a target value may be provided. + /// Tracks with the attribute values nearest to the target values will be preferred. + /// For example, you might request target_energy=0.6 and target_danceability=0.8. + /// All target values will be weighed equally in ranking results. + /// DO NOT INCLUDE target_ IN THE KEY + /// + /// public Dictionary Target { get; } protected override void CustomEnsure() @@ -50,11 +104,11 @@ namespace SpotifyAPI.Web { queryParams.Add($"min_{pair.Key}", pair.Value); } - foreach (KeyValuePair pair in Min) + foreach (KeyValuePair pair in Max) { queryParams.Add($"max_{pair.Key}", pair.Value); } - foreach (KeyValuePair pair in Min) + foreach (KeyValuePair pair in Target) { queryParams.Add($"target_{pair.Key}", pair.Value); } diff --git a/SpotifyAPI.Web/Models/Request/UnfollowRequest.cs b/SpotifyAPI.Web/Models/Request/UnfollowRequest.cs index 514d74cf..91acf8f1 100644 --- a/SpotifyAPI.Web/Models/Request/UnfollowRequest.cs +++ b/SpotifyAPI.Web/Models/Request/UnfollowRequest.cs @@ -3,6 +3,15 @@ namespace SpotifyAPI.Web { public class UnfollowRequest : RequestParams { + /// + /// + /// + /// The ID type: either artist or user. + /// + /// A comma-separated list of the artist or the user Spotify IDs. F + /// or example: ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q. + /// A maximum of 50 IDs can be sent in one request. + /// public UnfollowRequest(Type type, IList ids) { Ensure.ArgumentNotNull(type, nameof(type)); @@ -12,9 +21,19 @@ namespace SpotifyAPI.Web Ids = ids; } + /// + /// The ID type: either artist or user. + /// + /// [QueryParam("type")] public Type TypeParam { get; } + /// + /// A comma-separated list of the artist or the user Spotify IDs. F + /// or example: ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q. + /// A maximum of 50 IDs can be sent in one request. + /// + /// [BodyParam("ids")] public IList Ids { get; }