diff --git a/SpotifyAPI.Web/Clients/ArtistsClient.cs b/SpotifyAPI.Web/Clients/ArtistsClient.cs index 656a9d3f..fb59fd49 100644 --- a/SpotifyAPI.Web/Clients/ArtistsClient.cs +++ b/SpotifyAPI.Web/Clients/ArtistsClient.cs @@ -16,6 +16,13 @@ namespace SpotifyAPI.Web return API.Get(URLs.Artist(artistId), cancel); } + public Task Get(string artistId, ArtistRequest request, CancellationToken cancel = default) + { + Ensure.ArgumentNotNullOrEmptyString(artistId, nameof(artistId)); + + return API.Get(URLs.Artist(artistId), request.BuildQueryParams(), cancel); + } + public Task> GetAlbums(string artistId, CancellationToken cancel = default) { Ensure.ArgumentNotNullOrEmptyString(artistId, nameof(artistId)); @@ -38,6 +45,13 @@ namespace SpotifyAPI.Web return API.Get(URLs.ArtistRelatedArtists(artistId), cancel); } + public Task GetRelatedArtists(string artistId, ArtistsRelatedArtistsRequest request, CancellationToken cancel = default) + { + Ensure.ArgumentNotNullOrEmptyString(artistId, nameof(artistId)); + + return API.Get(URLs.ArtistRelatedArtists(artistId), request.BuildQueryParams(), cancel); + } + public Task GetSeveral(ArtistsRequest request, CancellationToken cancel = default) { Ensure.ArgumentNotNull(request, nameof(request)); diff --git a/SpotifyAPI.Web/Clients/Interfaces/IArtistsClient.cs b/SpotifyAPI.Web/Clients/Interfaces/IArtistsClient.cs index f49f49b8..cd15a1c9 100644 --- a/SpotifyAPI.Web/Clients/Interfaces/IArtistsClient.cs +++ b/SpotifyAPI.Web/Clients/Interfaces/IArtistsClient.cs @@ -31,6 +31,18 @@ namespace SpotifyAPI.Web [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")] Task Get(string artistId, CancellationToken cancel = default); + /// + /// Get Spotify catalog information for a single artist identified by their unique Spotify ID. + /// + /// The Spotify ID of the artist. + /// The cancellation-token to allow to cancel the request. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artist + /// + /// + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")] + Task Get(string artistId, ArtistRequest request, CancellationToken cancel = default); + /// /// Get Spotify catalog information about an artist’s albums. /// Optional parameters can be specified in the query string to filter and sort the response. @@ -81,5 +93,17 @@ namespace SpotifyAPI.Web /// /// Task GetRelatedArtists(string artistId, CancellationToken cancel = default); + + /// + /// 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 + /// The cancellation-token to allow to cancel the request. + /// + /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-artists-related-artists + /// + /// + Task GetRelatedArtists(string artistId, ArtistsRelatedArtistsRequest request, CancellationToken cancel = default); } } diff --git a/SpotifyAPI.Web/Models/Request/AlbumRequest.cs b/SpotifyAPI.Web/Models/Request/AlbumRequest.cs index db30953c..3531ed86 100644 --- a/SpotifyAPI.Web/Models/Request/AlbumRequest.cs +++ b/SpotifyAPI.Web/Models/Request/AlbumRequest.cs @@ -8,5 +8,16 @@ namespace SpotifyAPI.Web /// [QueryParam("market")] public string? Market { 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/AlbumTracksRequest.cs b/SpotifyAPI.Web/Models/Request/AlbumTracksRequest.cs index 00a165ee..11a41a04 100644 --- a/SpotifyAPI.Web/Models/Request/AlbumTracksRequest.cs +++ b/SpotifyAPI.Web/Models/Request/AlbumTracksRequest.cs @@ -24,6 +24,17 @@ namespace SpotifyAPI.Web /// [QueryParam("offset")] public int? Offset { 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/AlbumsRequest.cs b/SpotifyAPI.Web/Models/Request/AlbumsRequest.cs index e858893d..de6cdfed 100644 --- a/SpotifyAPI.Web/Models/Request/AlbumsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/AlbumsRequest.cs @@ -29,6 +29,17 @@ namespace SpotifyAPI.Web /// [QueryParam("market")] public string? Market { 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/ArtistRequest.cs b/SpotifyAPI.Web/Models/Request/ArtistRequest.cs new file mode 100644 index 00000000..12d0d9a3 --- /dev/null +++ b/SpotifyAPI.Web/Models/Request/ArtistRequest.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; + +namespace SpotifyAPI.Web +{ + public class ArtistRequest : RequestParams + { + /// + /// 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/ArtistsAlbumsRequest.cs b/SpotifyAPI.Web/Models/Request/ArtistsAlbumsRequest.cs index b1594278..d346532a 100644 --- a/SpotifyAPI.Web/Models/Request/ArtistsAlbumsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/ArtistsAlbumsRequest.cs @@ -23,6 +23,17 @@ namespace SpotifyAPI.Web [QueryParam("market")] public string? Market { 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; } + /// /// The number of album objects to return. Default: 20. Minimum: 1. Maximum: 50. For example: limit=2 /// diff --git a/SpotifyAPI.Web/Models/Request/ArtistsRelatedArtistsRequest.cs b/SpotifyAPI.Web/Models/Request/ArtistsRelatedArtistsRequest.cs new file mode 100644 index 00000000..b0444c6d --- /dev/null +++ b/SpotifyAPI.Web/Models/Request/ArtistsRelatedArtistsRequest.cs @@ -0,0 +1,17 @@ +namespace SpotifyAPI.Web +{ + public class ArtistsRelatedArtistsRequest : RequestParams + { + /// + /// 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/ArtistsRequest.cs b/SpotifyAPI.Web/Models/Request/ArtistsRequest.cs index a5305e63..171a2ba0 100644 --- a/SpotifyAPI.Web/Models/Request/ArtistsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/ArtistsRequest.cs @@ -21,6 +21,17 @@ namespace SpotifyAPI.Web /// [QueryParam("ids")] public IList Ids { get; } + + /// + /// 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/ArtistsTopTracksRequest.cs b/SpotifyAPI.Web/Models/Request/ArtistsTopTracksRequest.cs index 26cecbc5..1c89a353 100644 --- a/SpotifyAPI.Web/Models/Request/ArtistsTopTracksRequest.cs +++ b/SpotifyAPI.Web/Models/Request/ArtistsTopTracksRequest.cs @@ -19,6 +19,17 @@ namespace SpotifyAPI.Web /// [QueryParam("market")] public string Market { get; } + + /// + /// 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/CategoryPlaylistsRequest.cs b/SpotifyAPI.Web/Models/Request/CategoryPlaylistsRequest.cs index 84e6b186..7d524b14 100644 --- a/SpotifyAPI.Web/Models/Request/CategoryPlaylistsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/CategoryPlaylistsRequest.cs @@ -10,6 +10,17 @@ namespace SpotifyAPI.Web [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; } + /// /// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. /// diff --git a/SpotifyAPI.Web/Models/Request/EpisodeRequest.cs b/SpotifyAPI.Web/Models/Request/EpisodeRequest.cs index 2a456579..a908feb4 100644 --- a/SpotifyAPI.Web/Models/Request/EpisodeRequest.cs +++ b/SpotifyAPI.Web/Models/Request/EpisodeRequest.cs @@ -13,6 +13,17 @@ namespace SpotifyAPI.Web /// [QueryParam("market")] public string? Market { 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/EpisodesRequest.cs b/SpotifyAPI.Web/Models/Request/EpisodesRequest.cs index 01b0c693..0ca3ca31 100644 --- a/SpotifyAPI.Web/Models/Request/EpisodesRequest.cs +++ b/SpotifyAPI.Web/Models/Request/EpisodesRequest.cs @@ -33,6 +33,17 @@ namespace SpotifyAPI.Web /// [QueryParam("market")] public string? Market { 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/FollowGetCurrentUserRequest.cs b/SpotifyAPI.Web/Models/Request/FollowGetCurrentUserRequest.cs index f58be579..142769d2 100644 --- a/SpotifyAPI.Web/Models/Request/FollowGetCurrentUserRequest.cs +++ b/SpotifyAPI.Web/Models/Request/FollowGetCurrentUserRequest.cs @@ -25,6 +25,17 @@ namespace SpotifyAPI.Web [QueryParam("limit")] public int? Limit { 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; } + /// /// The last artist ID retrieved from the previous request. /// diff --git a/SpotifyAPI.Web/Models/Request/LibraryAlbumsRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryAlbumsRequest.cs index 0b867f18..6b7f53eb 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryAlbumsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryAlbumsRequest.cs @@ -24,6 +24,17 @@ namespace SpotifyAPI.Web /// [QueryParam("market")] public string? Market { 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/LibraryEpisodesRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryEpisodesRequest.cs index 933c9ecc..524c86e3 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryEpisodesRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryEpisodesRequest.cs @@ -24,5 +24,16 @@ namespace SpotifyAPI.Web /// [QueryParam("market")] public string? Market { 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/LibraryTracksRequest.cs b/SpotifyAPI.Web/Models/Request/LibraryTracksRequest.cs index 3256b051..4abe886d 100644 --- a/SpotifyAPI.Web/Models/Request/LibraryTracksRequest.cs +++ b/SpotifyAPI.Web/Models/Request/LibraryTracksRequest.cs @@ -24,6 +24,17 @@ namespace SpotifyAPI.Web /// [QueryParam("market")] public string? Market { 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/NewReleasesRequest.cs b/SpotifyAPI.Web/Models/Request/NewReleasesRequest.cs index 0123bbd7..ef69b5f2 100644 --- a/SpotifyAPI.Web/Models/Request/NewReleasesRequest.cs +++ b/SpotifyAPI.Web/Models/Request/NewReleasesRequest.cs @@ -11,6 +11,17 @@ namespace SpotifyAPI.Web [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; } + /// /// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. /// diff --git a/SpotifyAPI.Web/Models/Request/PersonalizationTopRequest.cs b/SpotifyAPI.Web/Models/Request/PersonalizationTopRequest.cs index d4e1f262..468f72cf 100644 --- a/SpotifyAPI.Web/Models/Request/PersonalizationTopRequest.cs +++ b/SpotifyAPI.Web/Models/Request/PersonalizationTopRequest.cs @@ -9,6 +9,17 @@ namespace SpotifyAPI.Web [QueryParam("limit")] public int? Limit { 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; } + /// /// The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities. /// diff --git a/SpotifyAPI.Web/Models/Request/PlayerCurrentPlaybackRequest.cs b/SpotifyAPI.Web/Models/Request/PlayerCurrentPlaybackRequest.cs index c5936273..e06f0405 100644 --- a/SpotifyAPI.Web/Models/Request/PlayerCurrentPlaybackRequest.cs +++ b/SpotifyAPI.Web/Models/Request/PlayerCurrentPlaybackRequest.cs @@ -25,6 +25,17 @@ namespace SpotifyAPI.Web [QueryParam("market")] public string? Market { 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; } + /// /// This is set to `"track", "episode"` by default. /// diff --git a/SpotifyAPI.Web/Models/Request/PlayerCurrentlyPlayingRequest.cs b/SpotifyAPI.Web/Models/Request/PlayerCurrentlyPlayingRequest.cs index 022d3fae..c5ec0880 100644 --- a/SpotifyAPI.Web/Models/Request/PlayerCurrentlyPlayingRequest.cs +++ b/SpotifyAPI.Web/Models/Request/PlayerCurrentlyPlayingRequest.cs @@ -29,6 +29,17 @@ namespace SpotifyAPI.Web [QueryParam("market")] public string? Market { 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; } + /// /// A comma-separated list of item types that your client supports besides the default track type. /// Valid types are: track and episode. An unsupported type in the response is expected to be represented diff --git a/SpotifyAPI.Web/Models/Request/PlayerRecentlyPlayedRequest.cs b/SpotifyAPI.Web/Models/Request/PlayerRecentlyPlayedRequest.cs index 8fc55860..c4d4f084 100644 --- a/SpotifyAPI.Web/Models/Request/PlayerRecentlyPlayedRequest.cs +++ b/SpotifyAPI.Web/Models/Request/PlayerRecentlyPlayedRequest.cs @@ -9,6 +9,17 @@ namespace SpotifyAPI.Web [QueryParam("limit")] public int? Limit { 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; } + /// /// A Unix timestamp in milliseconds. Returns all items after (but not including) this cursor position. /// If after is specified, before must not be specified. diff --git a/SpotifyAPI.Web/Models/Request/PlaylistCurrentUsersRequest.cs b/SpotifyAPI.Web/Models/Request/PlaylistCurrentUsersRequest.cs index da41e5cc..9b540bb7 100644 --- a/SpotifyAPI.Web/Models/Request/PlaylistCurrentUsersRequest.cs +++ b/SpotifyAPI.Web/Models/Request/PlaylistCurrentUsersRequest.cs @@ -9,6 +9,17 @@ namespace SpotifyAPI.Web [QueryParam("limit")] public int? Limit { 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; } + /// /// The index of the first playlist to return. /// Default: 0 (the first object). Maximum offset: 100.000. Use with limit to get the next set of playlists. diff --git a/SpotifyAPI.Web/Models/Request/PlaylistGetItemsRequest.cs b/SpotifyAPI.Web/Models/Request/PlaylistGetItemsRequest.cs index 32907c22..233c8c77 100644 --- a/SpotifyAPI.Web/Models/Request/PlaylistGetItemsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/PlaylistGetItemsRequest.cs @@ -65,6 +65,17 @@ namespace SpotifyAPI.Web [QueryParam("market")] public string? Market { 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; } + /// /// This is set to `"track", "episode"` by default. /// diff --git a/SpotifyAPI.Web/Models/Request/PlaylistGetRequest.cs b/SpotifyAPI.Web/Models/Request/PlaylistGetRequest.cs index 96391911..dfd1dc29 100644 --- a/SpotifyAPI.Web/Models/Request/PlaylistGetRequest.cs +++ b/SpotifyAPI.Web/Models/Request/PlaylistGetRequest.cs @@ -39,6 +39,17 @@ namespace SpotifyAPI.Web [QueryParam("market")] public string? Market { get; } + /// + /// 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; } + /// /// This is set to `"track", "episode"` by default. /// diff --git a/SpotifyAPI.Web/Models/Request/PlaylistGetUsersRequest.cs b/SpotifyAPI.Web/Models/Request/PlaylistGetUsersRequest.cs index e553d538..506e2f7e 100644 --- a/SpotifyAPI.Web/Models/Request/PlaylistGetUsersRequest.cs +++ b/SpotifyAPI.Web/Models/Request/PlaylistGetUsersRequest.cs @@ -15,7 +15,18 @@ namespace SpotifyAPI.Web /// /// [QueryParam("offset")] - public int? Offset { get; set; } + public int? Offset { 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/RecommendationsRequest.cs b/SpotifyAPI.Web/Models/Request/RecommendationsRequest.cs index c463e2fb..9aa653c6 100644 --- a/SpotifyAPI.Web/Models/Request/RecommendationsRequest.cs +++ b/SpotifyAPI.Web/Models/Request/RecommendationsRequest.cs @@ -60,6 +60,17 @@ namespace SpotifyAPI.Web [QueryParam("market")] public string? Market { 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; } + /// /// 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. diff --git a/SpotifyAPI.Web/Models/Request/SearchRequest.cs b/SpotifyAPI.Web/Models/Request/SearchRequest.cs index 5d645b8b..d09ce7dc 100644 --- a/SpotifyAPI.Web/Models/Request/SearchRequest.cs +++ b/SpotifyAPI.Web/Models/Request/SearchRequest.cs @@ -59,6 +59,17 @@ namespace SpotifyAPI.Web [QueryParam("market")] public string? Market { 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; } + /// /// Maximum number of results to return. /// Default: 20 diff --git a/SpotifyAPI.Web/Models/Request/TrackRequest.cs b/SpotifyAPI.Web/Models/Request/TrackRequest.cs index 17536d7a..12e30035 100644 --- a/SpotifyAPI.Web/Models/Request/TrackRequest.cs +++ b/SpotifyAPI.Web/Models/Request/TrackRequest.cs @@ -9,6 +9,17 @@ namespace SpotifyAPI.Web /// [QueryParam("market")] public string? Market { 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/TracksRequest.cs b/SpotifyAPI.Web/Models/Request/TracksRequest.cs index 1edd2faa..c22a8cba 100644 --- a/SpotifyAPI.Web/Models/Request/TracksRequest.cs +++ b/SpotifyAPI.Web/Models/Request/TracksRequest.cs @@ -29,6 +29,17 @@ namespace SpotifyAPI.Web /// [QueryParam("market")] public string? Market { 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; } } }