Fixed incorrectly passed parameters for two endpoints.
This commit is contained in:
parent
b3f15721f3
commit
9067176dfa
@ -38,8 +38,13 @@ namespace SteamStorefrontAPI
|
||||
public static async Task<FeaturedApps> 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; }
|
||||
|
@ -38,8 +38,13 @@ namespace SteamStorefrontAPI
|
||||
public static async Task<List<FeaturedCategory>> 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; }
|
||||
|
Loading…
Reference in New Issue
Block a user