diff --git a/SteamStorefrontAPI/Classes/featured/FeaturedApp.cs b/SteamStorefrontAPI/Classes/common/AppInfo.cs similarity index 98% rename from SteamStorefrontAPI/Classes/featured/FeaturedApp.cs rename to SteamStorefrontAPI/Classes/common/AppInfo.cs index e1ce75c..6b820e8 100644 --- a/SteamStorefrontAPI/Classes/featured/FeaturedApp.cs +++ b/SteamStorefrontAPI/Classes/common/AppInfo.cs @@ -11,7 +11,7 @@ namespace SteamStorefrontAPI.Classes { public enum ControllerSupport { Full, Partial }; - public class FeaturedApp + public class AppInfo { [JsonProperty("id")] public int Id { get; set; } diff --git a/SteamStorefrontAPI/Classes/featured/SteamFeatured.cs b/SteamStorefrontAPI/Classes/featured/FeaturedApps.cs similarity index 70% rename from SteamStorefrontAPI/Classes/featured/SteamFeatured.cs rename to SteamStorefrontAPI/Classes/featured/FeaturedApps.cs index dcb015d..7565649 100644 --- a/SteamStorefrontAPI/Classes/featured/SteamFeatured.cs +++ b/SteamStorefrontAPI/Classes/featured/FeaturedApps.cs @@ -9,19 +9,19 @@ using Newtonsoft.Json.Converters; namespace SteamStorefrontAPI.Classes { - public class SteamFeatured + public class FeaturedApps { [JsonProperty("large_capsules")] - public List LargeCapsules { get; set; } + public List LargeCapsules { get; set; } [JsonProperty("featured_win")] - public List FeaturedWin { get; set; } + public List FeaturedWin { get; set; } [JsonProperty("featured_mac")] - public List FeaturedMac { get; set; } + public List FeaturedMac { get; set; } [JsonProperty("featured_linux")] - public List FeaturedLinux { get; set; } + public List FeaturedLinux { get; set; } [JsonProperty("layout")] public string Layout { get; set; } @@ -29,7 +29,7 @@ namespace SteamStorefrontAPI.Classes //[JsonProperty("status")] //public int Status { get; set; } - public static SteamFeatured FromJson(string json) + public static FeaturedApps FromJson(string json) { var serializerSettings = new JsonSerializerSettings @@ -42,7 +42,7 @@ namespace SteamStorefrontAPI.Classes }, }; - return JsonConvert.DeserializeObject(json, serializerSettings); + return JsonConvert.DeserializeObject(json, serializerSettings); } } } diff --git a/SteamStorefrontAPI/Endpoints/Featured.cs b/SteamStorefrontAPI/Endpoints/Featured.cs index 745a7c3..93ab539 100644 --- a/SteamStorefrontAPI/Endpoints/Featured.cs +++ b/SteamStorefrontAPI/Endpoints/Featured.cs @@ -15,17 +15,17 @@ namespace SteamStorefrontAPI private const string steamBaseUri = "https://store.steampowered.com/api/featured"; - public static async Task GetAsync() + public static async Task GetAsync() { return await GetAsync(null, null); } - public static async Task GetAsync(string CountryCode) + public static async Task GetAsync(string CountryCode) { return await GetAsync(CountryCode, null); } - public static async Task GetAsync(string CountryCode, string Language) + public static async Task GetAsync(string CountryCode, string Language) { string steamUri = steamBaseUri; steamUri = CountryCode is null ? steamUri : $"{steamUri}&cc={CountryCode}"; @@ -39,7 +39,7 @@ namespace SteamStorefrontAPI var jsonData = JToken.Parse(result); if (jsonData["status"].ToString() != "1") { return null; } - return SteamFeatured.FromJson(result); + return FeaturedApps.FromJson(result); } } } diff --git a/SteamStorefrontAPI/SteamStorefrontAPI.csproj b/SteamStorefrontAPI/SteamStorefrontAPI.csproj index fd02cd7..125e7f5 100644 --- a/SteamStorefrontAPI/SteamStorefrontAPI.csproj +++ b/SteamStorefrontAPI/SteamStorefrontAPI.csproj @@ -59,8 +59,8 @@ - - + + @@ -70,5 +70,6 @@ + \ No newline at end of file diff --git a/SteamStorefrontConsole/Program.cs b/SteamStorefrontConsole/Program.cs index d80bcf4..d0fcb78 100644 --- a/SteamStorefrontConsole/Program.cs +++ b/SteamStorefrontConsole/Program.cs @@ -23,7 +23,7 @@ namespace SteamStorefrontConsole //var steamApp = await AppDetails.GetAsync(443790); //var steamApp = await AppDetails.GetAsync(460810, "JP"); - //var featured = await Featured.GetAsync(); + var featured = await Featured.GetAsync(); //Console.WriteLine(featured); }