mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-23 14:46:26 +00:00
Started with Documentation #451
This commit is contained in:
parent
f1ca557c6e
commit
b2884debcd
16
.vscode/csharp.code-snippets
vendored
16
.vscode/csharp.code-snippets
vendored
@ -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": [
|
||||
"<remarks>",
|
||||
"/// $1",
|
||||
"/// </remarks>"
|
||||
],
|
||||
"description": "Creates a new request comment for XAML"
|
||||
}
|
||||
}
|
||||
|
@ -4,15 +4,60 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public interface IAlbumsClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information for multiple albums identified by their Spotify IDs.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-multiple-albums
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<AlbumsResponse> GetSeveral(AlbumsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information for a single album.
|
||||
/// </summary>
|
||||
/// <param name="albumId">The Spotify ID of the album.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-album
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")]
|
||||
Task<FullAlbum> Get(string albumId);
|
||||
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information for a single album.
|
||||
/// </summary>
|
||||
/// <param name="albumId">The Spotify ID of the album.</param>
|
||||
/// <param name="request">The request-model which contains required and optional parameters</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-album
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")]
|
||||
Task<FullAlbum> Get(string albumId, AlbumRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information about an album’s tracks.
|
||||
/// Optional parameters can be used to limit the number of tracks returned.
|
||||
/// </summary>
|
||||
/// <param name="albumId">The Spotify ID of the album.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-albums-tracks
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Paging<SimpleTrack>> GetTracks(string albumId);
|
||||
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information about an album’s tracks.
|
||||
/// Optional parameters can be used to limit the number of tracks returned.
|
||||
/// </summary>
|
||||
/// <param name="albumId">The Spotify ID of the album.</param>
|
||||
/// <param name="request">The request-model which contains required and optional parameters</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-albums-tracks
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Paging<SimpleTrack>> GetTracks(string albumId, AlbumTracksRequest request);
|
||||
}
|
||||
}
|
||||
|
@ -4,16 +4,72 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public interface IArtistsClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information for several artists based on their Spotify IDs.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-multiple-artists
|
||||
/// </remarks>
|
||||
/// <param name="request">The request-model which contains required and optional parameters</param>
|
||||
/// <returns></returns>
|
||||
Task<ArtistsResponse> GetSeveral(ArtistsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information for a single artist identified by their unique Spotify ID.
|
||||
/// </summary>
|
||||
/// <param name="artistId">The Spotify ID of the artist.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artist
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")]
|
||||
Task<FullArtist> Get(string artistId);
|
||||
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information about an artist’s albums.
|
||||
/// Optional parameters can be specified in the query string to filter and sort the response.
|
||||
/// </summary>
|
||||
/// <param name="artistId">The Spotify ID for the artist.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artists-albums
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Paging<SimpleAlbum>> GetAlbums(string artistId);
|
||||
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information about an artist’s albums.
|
||||
/// Optional parameters can be specified in the query string to filter and sort the response.
|
||||
/// </summary>
|
||||
/// <param name="artistId">The Spotify ID for the artist.</param>
|
||||
/// <param name="request">The request-model which contains required and optional parameters</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artists-albums
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Paging<SimpleAlbum>> GetAlbums(string artistId, ArtistsAlbumsRequest request);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information about an artist’s top tracks by country.
|
||||
/// </summary>
|
||||
/// <param name="artistId">The Spotify ID for the artist</param>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artists-top-tracks
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<ArtistsTopTracksResponse> GetTopTracks(string artistId, ArtistsTopTracksRequest request);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information about artists similar to a given artist.
|
||||
/// Similarity is based on analysis of the Spotify community’s listening history.
|
||||
/// </summary>
|
||||
/// <param name="artistId">The Spotify ID for the artist</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artists-related-artists
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<ArtistsRelatedArtistsResponse> GetRelatedArtists(string artistId);
|
||||
}
|
||||
}
|
||||
|
@ -4,22 +4,124 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public interface IBrowseClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-categories
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<CategoriesResponse> GetCategories();
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-categories
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<CategoriesResponse> GetCategories(CategoriesRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
|
||||
/// </summary>
|
||||
/// <param name="categoryId">The Spotify category ID for the category.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-a-category
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Category> GetCategory(string categoryId);
|
||||
|
||||
/// <summary>
|
||||
/// Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
|
||||
/// </summary>
|
||||
/// <param name="categoryId">The Spotify category ID for the category.</param>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-a-category
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Category> GetCategory(string categoryId, CategoryRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of Spotify playlists tagged with a particular category.
|
||||
/// </summary>
|
||||
/// <param name="categoryId">The Spotify category ID for the category.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-a-categories-playlists
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<CategoryPlaylistsResponse> GetCategoryPlaylists(string categoryId);
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of Spotify playlists tagged with a particular category.
|
||||
/// </summary>
|
||||
/// <param name="categoryId">The Spotify category ID for the category.</param>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-a-categories-playlists
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<CategoryPlaylistsResponse> GetCategoryPlaylists(string categoryId, CategoriesPlaylistsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-recommendations
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<RecommendationsResponse> GetRecommendations(RecommendationsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve a list of available genres seed parameter values for recommendations.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-recommendation-genres
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<RecommendationGenresResponse> GetRecommendationGenres();
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-new-releases
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<NewReleasesResponse> GetNewReleases();
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-new-releases
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<NewReleasesResponse> GetNewReleases(NewReleasesRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s ‘Browse’ tab).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-featured-playlists
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<FeaturedPlaylistsResponse> GetFeaturedPlaylists();
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s ‘Browse’ tab).
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-featured-playlists
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<FeaturedPlaylistsResponse> GetFeaturedPlaylists(FeaturedPlaylistsRequest request);
|
||||
}
|
||||
}
|
||||
|
@ -4,12 +4,37 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public interface IEpisodesClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information for a single episode identified by its unique Spotify ID.
|
||||
/// </summary>
|
||||
/// <param name="episodeId">The Spotify ID for the episode.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-episode
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")]
|
||||
Task<FullEpisode> Get(string episodeId);
|
||||
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information for a single episode identified by its unique Spotify ID.
|
||||
/// </summary>
|
||||
/// <param name="episodeId">The Spotify ID for the episode.</param>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-episode
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")]
|
||||
Task<FullEpisode> Get(string episodeId, EpisodeRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get Spotify catalog information for several episodes based on their Spotify IDs.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-multiple-episodes
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<EpisodesResponse> GetSeveral(EpisodesRequest request);
|
||||
}
|
||||
}
|
||||
|
@ -5,20 +5,103 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public interface IFollowClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Check to see if the current user is following one or more artists or other Spotify users.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-check-current-user-follows
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<List<bool>> CheckCurrentUser(FollowCheckCurrentUserRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Check to see if one or more Spotify users are following a specified playlist.
|
||||
/// </summary>
|
||||
/// <param name="playlistId">The Spotify ID of the playlist.</param>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-check-if-user-follows-playlist
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<List<bool>> CheckPlaylist(string playlistId, FollowCheckPlaylistRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Add the current user as a follower of one or more artists or other Spotify users.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-follow-artists-users
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<bool> Follow(FollowRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Add the current user as a follower of a playlist.
|
||||
/// </summary>
|
||||
/// <param name="playlistId">
|
||||
/// 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.
|
||||
/// </param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-follow-playlist
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<bool> FollowPlaylist(string playlistId);
|
||||
|
||||
/// <summary>
|
||||
/// Add the current user as a follower of a playlist.
|
||||
/// </summary>
|
||||
/// <param name="playlistId">
|
||||
/// 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.
|
||||
/// </param>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-follow-playlist
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<bool> FollowPlaylist(string playlistId, FollowPlaylistRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get the current user’s followed artists.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-followed
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<FollowedArtistsResponse> OfCurrentUser();
|
||||
|
||||
/// <summary>
|
||||
/// Get the current user’s followed artists.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-followed
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<FollowedArtistsResponse> OfCurrentUser(FollowOfCurrentUserRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Remove the current user as a follower of one or more artists or other Spotify users.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-unfollow-artists-users
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<bool> Unfollow(UnfollowRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Remove the current user as a follower of a playlist.
|
||||
/// </summary>
|
||||
/// <param name="playlistId">The Spotify ID of the playlist that is to be no longer followed.</param>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-unfollow-playlist
|
||||
/// </remarks>
|
||||
Task<bool> UnfollowPlaylist(string playlistId);
|
||||
}
|
||||
}
|
||||
|
@ -5,23 +5,153 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public interface ILibraryClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Remove one or more albums from the current user’s ‘Your Music’ library.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-remove-albums-user
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<bool> RemoveAlbums(LibraryRemoveAlbumsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Remove one or more tracks from the current user’s ‘Your Music’ library.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-remove-tracks-user
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<bool> RemoveTracks(LibraryRemoveTracksRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Delete one or more shows from current Spotify user’s library.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-remove-shows-user
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<bool> RemoveShows(LibraryRemoveShowsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Save one or more tracks to the current user’s ‘Your Music’ library.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-save-tracks-user
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<bool> SaveTracks(LibrarySaveTracksRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Save one or more albums to the current user’s ‘Your Music’ library.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-save-albums-user
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<bool> SaveAlbums(LibrarySaveAlbumsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Save one or more shows to current Spotify user’s library.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-save-shows-user
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<bool> SaveShows(LibrarySaveShowsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Check if one or more tracks is already saved in the current Spotify user’s ‘Your Music’ library.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-check-users-saved-tracks
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<List<bool>> CheckTracks(LibraryCheckTracksRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Check if one or more albums is already saved in the current Spotify user’s ‘Your Music’ library.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-check-users-saved-albums
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<List<bool>> CheckAlbums(LibraryCheckAlbumsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Check if one or more shows is already saved in the current Spotify user’s library.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-check-users-saved-shows
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<List<bool>> CheckShows(LibraryCheckShowsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of the songs saved in the current Spotify user’s ‘Your Music’ library.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-tracks
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Paging<SavedTrack>> GetTracks();
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of the songs saved in the current Spotify user’s ‘Your Music’ library.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-tracks
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Paging<SavedTrack>> GetTracks(LibraryTracksRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of the albums saved in the current Spotify user’s ‘Your Music’ library.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-albums
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Paging<SavedAlbum>> GetAlbums();
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of the albums saved in the current Spotify user’s ‘Your Music’ library.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-albums
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Paging<SavedAlbum>> GetAlbums(LibraryAlbumsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-shows
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Paging<SavedShow>> GetShows();
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
||||
/// <remarks>
|
||||
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-saved-shows
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
Task<Paging<SavedShow>> GetShows(LibraryShowsRequest request);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,10 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class AlbumRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// The market you’d like to request. Synonym for country.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("market")]
|
||||
public string? Market { get; set; }
|
||||
}
|
||||
|
@ -2,12 +2,26 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class AlbumTracksRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// An ISO 3166-1 alpha-2 country code or the string from_token.
|
||||
/// Provide this parameter if you want to apply Track Relinking.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("market")]
|
||||
public string? Market { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of tracks to return. Default: 20. Minimum: 1. Maximum: 50.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The index of the first track to return. Default: 0 (the first object).
|
||||
/// Use with limit to get the next set of tracks.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("offset")]
|
||||
public int? Offset { get; set; }
|
||||
}
|
||||
|
@ -4,6 +4,10 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class AlbumsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// AlbumsRequest
|
||||
/// </summary>
|
||||
/// <param name="ids">A comma-separated list of the Spotify IDs for the albums. Maximum: 20 IDs.</param>
|
||||
public AlbumsRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
|
||||
@ -11,9 +15,18 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of the Spotify IDs for the albums. Maximum: 20 IDs.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
|
||||
/// <summary>
|
||||
/// An ISO 3166-1 alpha-2 country code or the string from_token.
|
||||
/// Provide this parameter if you want to apply Track Relinking.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("market")]
|
||||
public string? Market { get; set; }
|
||||
}
|
||||
|
@ -4,15 +4,36 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class ArtistsAlbumsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// A comma-separated list of keywords that will be used to filter the response.
|
||||
/// If not supplied, all album types will be returned.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("include_groups")]
|
||||
public IncludeGroups? IncludeGroupsParam { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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!
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("market")]
|
||||
public string? Market { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of album objects to return. Default: 20. Minimum: 1. Maximum: 50. For example: limit=2
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("offset")]
|
||||
public int? Offset { get; set; }
|
||||
|
||||
|
@ -4,6 +4,10 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class ArtistsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// ArtistsRequest
|
||||
/// </summary>
|
||||
/// <param name="ids">A comma-separated list of the Spotify IDs for the artists. Maximum: 50 IDs.</param>
|
||||
public ArtistsRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
|
||||
@ -11,6 +15,10 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of the Spotify IDs for the artists. Maximum: 50 IDs.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
}
|
||||
|
@ -2,6 +2,10 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class ArtistsTopTracksRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// An ISO 3166-1 alpha-2 country code or the string from_token. Synonym for country.
|
||||
/// </summary>
|
||||
/// <param name="market"></param>
|
||||
public ArtistsTopTracksRequest(string market)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(market, nameof(market));
|
||||
@ -9,6 +13,10 @@ namespace SpotifyAPI.Web
|
||||
Market = market;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An ISO 3166-1 alpha-2 country code or the string from_token. Synonym for country.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("market")]
|
||||
public string Market { get; }
|
||||
}
|
||||
|
@ -2,15 +2,39 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class CategoriesRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("country")]
|
||||
public string? Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("locale")]
|
||||
public string? Locale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of categories.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("offset")]
|
||||
public int? Offset { get; set; }
|
||||
}
|
||||
|
@ -2,12 +2,25 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class CategoriesPlaylistsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// A country: an ISO 3166-1 alpha-2 country code.
|
||||
/// Provide this parameter to ensure that the category exists for a particular country.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("country")]
|
||||
public string? Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("offset")]
|
||||
public int? Offset { get; set; }
|
||||
}
|
||||
|
@ -2,9 +2,22 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class CategoryRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// A country: an ISO 3166-1 alpha-2 country code.
|
||||
/// Provide this parameter to ensure that the category exists for a particular country.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("country")]
|
||||
public string? Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("locale")]
|
||||
public string? Locale { get; set; }
|
||||
}
|
||||
|
@ -2,6 +2,15 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class EpisodeRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("market")]
|
||||
public string? Market { get; set; }
|
||||
}
|
||||
|
@ -4,6 +4,10 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class EpisodesRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ids">A comma-separated list of the Spotify IDs for the episodes. Maximum: 50 IDs.</param>
|
||||
public EpisodesRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
|
||||
@ -11,9 +15,22 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of the Spotify IDs for the episodes. Maximum: 50 IDs.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("market")]
|
||||
public string? Market { get; set; }
|
||||
}
|
||||
|
@ -4,18 +4,50 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class FeaturedPlaylistsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("country")]
|
||||
public string? Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("locale")]
|
||||
public string? Locale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("offset")]
|
||||
public int? Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public DateTime? Timestamp { get; set; }
|
||||
|
||||
[QueryParam("timestamp")]
|
||||
|
@ -4,6 +4,15 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class FollowCheckCurrentUserRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="type">The ID type: either artist or user.</param>
|
||||
/// <param name="ids">
|
||||
/// 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.
|
||||
/// </param>
|
||||
public FollowCheckCurrentUserRequest(Type type, IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNull(type, nameof(type));
|
||||
@ -13,9 +22,19 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The ID type: either artist or user.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("type")]
|
||||
public Type TypeParam { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
|
||||
|
@ -4,6 +4,14 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class FollowCheckPlaylistRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="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.
|
||||
/// </param>
|
||||
public FollowCheckPlaylistRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
|
||||
@ -11,6 +19,12 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
}
|
||||
|
@ -2,17 +2,33 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class FollowOfCurrentUserRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID type: currently only artist is supported.
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
public FollowOfCurrentUserRequest(Type type = Type.Artist)
|
||||
{
|
||||
TypeParam = type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The ID type: currently only artist is supported.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("type")]
|
||||
public Type TypeParam { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The last artist ID retrieved from the previous request.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("after")]
|
||||
public string? After { get; set; }
|
||||
|
||||
|
@ -2,6 +2,12 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class FollowPlaylistRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[BodyParam("public")]
|
||||
public bool? Public { get; set; }
|
||||
}
|
||||
|
@ -4,6 +4,15 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class FollowRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="type">The ID type: either artist or user.</param>
|
||||
/// <param name="ids">
|
||||
/// 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.
|
||||
/// </param>
|
||||
public FollowRequest(Type type, IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNull(type, nameof(type));
|
||||
@ -13,9 +22,19 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The ID type: either artist or user.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("type")]
|
||||
public Type? TypeParam { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[BodyParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
|
||||
|
@ -2,12 +2,26 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibraryAlbumsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("offset")]
|
||||
public int? Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// An ISO 3166-1 alpha-2 country code or the string from_token. Provide this parameter
|
||||
/// if you want to apply Track Relinking.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("market")]
|
||||
public string? Market { get; set; }
|
||||
}
|
||||
|
@ -4,6 +4,12 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibraryCheckAlbumsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ids">
|
||||
/// A comma-separated list of the Spotify IDs for the albums. Maximum: 50 IDs.
|
||||
/// </param>
|
||||
public LibraryCheckAlbumsRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNull(ids, nameof(ids));
|
||||
@ -11,7 +17,10 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of the Spotify IDs for the albums. Maximum: 50 IDs.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
}
|
||||
|
@ -4,6 +4,10 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibraryCheckShowsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ids">A comma-separated list of the Spotify IDs for the shows. Maximum: 50 ids.</param>
|
||||
public LibraryCheckShowsRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNull(ids, nameof(ids));
|
||||
@ -11,6 +15,10 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of the Spotify IDs for the shows. Maximum: 50 ids.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
}
|
||||
|
@ -4,6 +4,12 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibraryCheckTracksRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ids">
|
||||
/// A comma-separated list of the Spotify IDs for the tracks. Maximum: 50 IDs.
|
||||
/// </param>
|
||||
public LibraryCheckTracksRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNull(ids, nameof(ids));
|
||||
@ -11,6 +17,10 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of the Spotify IDs for the tracks. Maximum: 50 IDs.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
}
|
||||
|
@ -4,6 +4,12 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibraryRemoveAlbumsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="ids">
|
||||
/// A comma-separated list of the Spotify IDs.
|
||||
/// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.
|
||||
/// </param>
|
||||
public LibraryRemoveAlbumsRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
|
||||
@ -11,6 +17,11 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of the Spotify IDs.
|
||||
/// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[BodyParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
}
|
||||
|
@ -4,6 +4,12 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibraryRemoveShowsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ids">
|
||||
/// A comma-separated list of Spotify IDs for the shows to be deleted from the user’s library.
|
||||
/// </param>
|
||||
public LibraryRemoveShowsRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
|
||||
@ -11,6 +17,10 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of Spotify IDs for the shows to be deleted from the user’s library.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[BodyParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
}
|
||||
|
@ -4,6 +4,13 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibraryRemoveTracksRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ids">
|
||||
/// A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M.
|
||||
/// Maximum: 50 IDs.
|
||||
/// </param>
|
||||
public LibraryRemoveTracksRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
|
||||
@ -11,6 +18,11 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M.
|
||||
/// Maximum: 50 IDs.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[BodyParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
}
|
||||
|
@ -4,6 +4,13 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibrarySaveAlbumsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
/// </summary>
|
||||
/// <param name="ids">
|
||||
/// A comma-separated list of the Spotify IDs.
|
||||
/// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.
|
||||
/// </param>
|
||||
public LibrarySaveAlbumsRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
|
||||
@ -11,6 +18,11 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of the Spotify IDs.
|
||||
/// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
}
|
||||
|
@ -4,6 +4,10 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibrarySaveShowsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ids">A comma-separated list of Spotify IDs for the shows to be added to the user’s library.</param>
|
||||
public LibrarySaveShowsRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
|
||||
@ -11,6 +15,10 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of Spotify IDs for the shows to be added to the user’s library.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
}
|
||||
|
@ -4,6 +4,13 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibrarySaveTracksRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ids">
|
||||
/// A comma-separated list of the Spotify IDs.
|
||||
/// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.
|
||||
/// </param>
|
||||
public LibrarySaveTracksRequest(IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
|
||||
@ -11,6 +18,11 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of the Spotify IDs.
|
||||
/// For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
}
|
||||
|
@ -2,14 +2,20 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibraryShowsRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// The maximum number of shows to return. Default: 20. Minimum: 1. Maximum: 50
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The index of the first show to return. Default: 0 (the first object).
|
||||
/// Use with limit to get the next set of shows.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("offset")]
|
||||
public int? Offset { get; set; }
|
||||
|
||||
[QueryParam("market")]
|
||||
public string? Market { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,12 +2,26 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class LibraryTracksRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("offset")]
|
||||
public int? Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// An ISO 3166-1 alpha-2 country code or the string from_token.
|
||||
/// Provide this parameter if you want to apply Track Relinking.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("market")]
|
||||
public string? Market { get; set; }
|
||||
}
|
||||
|
@ -2,12 +2,27 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class NewReleasesRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("country")]
|
||||
public string? Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The index of the first item to return. Default: 0 (the first object).
|
||||
/// Use with limit to get the next set of items.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("offset")]
|
||||
public int? Offset { get; set; }
|
||||
}
|
||||
|
@ -15,23 +15,77 @@ namespace SpotifyAPI.Web
|
||||
SeedTracks = new List<string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("seed_artists")]
|
||||
public IList<string> SeedArtists { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("seed_genres")]
|
||||
public IList<string> SeedGenres { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("seed_tracks")]
|
||||
public IList<string> SeedTracks { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("market")]
|
||||
public string? Market { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public Dictionary<string, string> Min { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public Dictionary<string, string> Max { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public Dictionary<string, string> Target { get; }
|
||||
|
||||
protected override void CustomEnsure()
|
||||
@ -50,11 +104,11 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
queryParams.Add($"min_{pair.Key}", pair.Value);
|
||||
}
|
||||
foreach (KeyValuePair<string, string> pair in Min)
|
||||
foreach (KeyValuePair<string, string> pair in Max)
|
||||
{
|
||||
queryParams.Add($"max_{pair.Key}", pair.Value);
|
||||
}
|
||||
foreach (KeyValuePair<string, string> pair in Min)
|
||||
foreach (KeyValuePair<string, string> pair in Target)
|
||||
{
|
||||
queryParams.Add($"target_{pair.Key}", pair.Value);
|
||||
}
|
||||
|
@ -3,6 +3,15 @@ namespace SpotifyAPI.Web
|
||||
{
|
||||
public class UnfollowRequest : RequestParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="type">The ID type: either artist or user.</param>
|
||||
/// <param name="ids">
|
||||
/// 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.
|
||||
/// </param>
|
||||
public UnfollowRequest(Type type, IList<string> ids)
|
||||
{
|
||||
Ensure.ArgumentNotNull(type, nameof(type));
|
||||
@ -12,9 +21,19 @@ namespace SpotifyAPI.Web
|
||||
Ids = ids;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The ID type: either artist or user.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[QueryParam("type")]
|
||||
public Type TypeParam { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[BodyParam("ids")]
|
||||
public IList<string> Ids { get; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user