diff --git a/SteamStorefrontAPI/Endpoints/Featured.cs b/SteamStorefrontAPI/Endpoints/Featured.cs index 8d355bf..2c0b0ab 100644 --- a/SteamStorefrontAPI/Endpoints/Featured.cs +++ b/SteamStorefrontAPI/Endpoints/Featured.cs @@ -38,8 +38,13 @@ namespace SteamStorefrontAPI public static async Task GetAsync(string CountryCode, string Language) { string steamUri = steamBaseUri; - steamUri = string.IsNullOrWhiteSpace(CountryCode) ? steamUri : $"{steamUri}&cc={CountryCode}"; - steamUri = string.IsNullOrWhiteSpace(Language) ? steamUri : $"{steamUri}&l={Language.ToLower()}"; + steamUri = string.IsNullOrWhiteSpace(CountryCode) ? steamUri : $"{steamUri}?cc={CountryCode}"; + + if (!string.IsNullOrWhiteSpace(Language)) + { + steamUri += string.IsNullOrWhiteSpace(CountryCode) ? "?" : "&"; + steamUri += $"l={Language.ToLower()}"; + } var response = await client.GetAsync(steamUri); if (!response.IsSuccessStatusCode) { return null; } diff --git a/SteamStorefrontAPI/Endpoints/FeaturedCategories.cs b/SteamStorefrontAPI/Endpoints/FeaturedCategories.cs index c9ae61f..c4c5f51 100644 --- a/SteamStorefrontAPI/Endpoints/FeaturedCategories.cs +++ b/SteamStorefrontAPI/Endpoints/FeaturedCategories.cs @@ -38,8 +38,13 @@ namespace SteamStorefrontAPI public static async Task> GetAsync(string CountryCode, string Language) { string steamUri = steamBaseUri; - steamUri = string.IsNullOrWhiteSpace(CountryCode) ? steamUri : $"{steamUri}&cc={CountryCode}"; - steamUri = string.IsNullOrWhiteSpace(Language) ? steamUri : $"{steamUri}&l={Language.ToLower()}"; + steamUri = string.IsNullOrWhiteSpace(CountryCode) ? steamUri : $"{steamUri}?cc={CountryCode}"; + + if (!string.IsNullOrWhiteSpace(Language)) + { + steamUri += string.IsNullOrWhiteSpace(CountryCode) ? "?" : "&"; + steamUri += $"l={Language.ToLower()}"; + } var response = await client.GetAsync(steamUri); if (!response.IsSuccessStatusCode) { return null; }