diff --git a/SteamStorefrontAPI.sln b/SteamStorefrontAPI.sln
index 66de459..65c63d2 100644
--- a/SteamStorefrontAPI.sln
+++ b/SteamStorefrontAPI.sln
@@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.27428.2043
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamStorefrontAPI", "SteamStorefrontAPI\SteamStorefrontAPI.csproj", "{76131ABE-46BD-4A82-B5E6-F29A47F2F64D}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamStorefrontConsole", "SteamStorefrontConsole\SteamStorefrontConsole.csproj", "{44AAB32B-8986-48E0-8A08-42CE967D01F4}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
{76131ABE-46BD-4A82-B5E6-F29A47F2F64D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76131ABE-46BD-4A82-B5E6-F29A47F2F64D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76131ABE-46BD-4A82-B5E6-F29A47F2F64D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {44AAB32B-8986-48E0-8A08-42CE967D01F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {44AAB32B-8986-48E0-8A08-42CE967D01F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {44AAB32B-8986-48E0-8A08-42CE967D01F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {44AAB32B-8986-48E0-8A08-42CE967D01F4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/SteamStorefrontAPI/Class1.cs b/SteamStorefrontAPI/Class1.cs
deleted file mode 100644
index 8c25c7b..0000000
--- a/SteamStorefrontAPI/Class1.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SteamStorefrontAPI
-{
- public class Class1
- {
- }
-}
diff --git a/SteamStorefrontAPI/SteamStorefrontAPI.csproj b/SteamStorefrontAPI/SteamStorefrontAPI.csproj
index 6fe6bea..ecbaa97 100644
--- a/SteamStorefrontAPI/SteamStorefrontAPI.csproj
+++ b/SteamStorefrontAPI/SteamStorefrontAPI.csproj
@@ -1,10 +1,10 @@
-
+
Debug
AnyCPU
- 76131abe-46bd-4a82-b5e6-f29a47f2f64d
+ {76131ABE-46BD-4A82-B5E6-F29A47F2F64D}
Library
Properties
SteamStorefrontAPI
@@ -30,24 +30,39 @@
4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/SteamStorefrontAPI/appdetails/AppDetails.cs b/SteamStorefrontAPI/appdetails/AppDetails.cs
new file mode 100644
index 0000000..d686d98
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/AppDetails.cs
@@ -0,0 +1,45 @@
+using Newtonsoft.Json.Linq;
+using SteamStorefrontAPI.Classes;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Http;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SteamStorefrontAPI
+{
+ public static class AppDetails
+ {
+ private static HttpClient client = new HttpClient();
+ private const string steamBaseUri = "http://store.steampowered.com/api/appdetails";
+
+ public static async Task GetAsync(int AppId)
+ {
+ return await GetAsync(AppId, null, null);
+ }
+
+ public static async Task GetAsync(int AppId, string CountryCode)
+ {
+ return await GetAsync(AppId, CountryCode, null);
+ }
+
+ public static async Task GetAsync(int AppId, string CountryCode, string Language)
+ {
+ string steamUri = $"{steamBaseUri}?appids={AppId}";
+ steamUri = CountryCode is null ? steamUri : $"{steamUri}&cc={CountryCode}";
+ steamUri = Language is null ? steamUri : $"{steamUri}&l={Language}";
+
+ var response = await client.GetAsync(steamUri);
+ if (!response.IsSuccessStatusCode) { return null; }
+
+ var result = await response.Content.ReadAsStringAsync();
+
+ // The actual payload is wrapped, drill down to the third level to get to it
+ var jsonData = JToken.Parse(result).First.First;
+ if (!bool.Parse(jsonData["success"].ToString())) { return null; }
+
+ return jsonData["data"].ToObject();
+ }
+ }
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/Achievements.cs b/SteamStorefrontAPI/appdetails/Classes/Achievements.cs
new file mode 100644
index 0000000..ba513c8
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/Achievements.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+ public class Achievements
+ {
+ [JsonProperty("total")]
+ public long Total { get; set; }
+
+ [JsonProperty("highlighted")]
+ public List Highlighted { get; set; }
+ }
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/Category.cs b/SteamStorefrontAPI/appdetails/Classes/Category.cs
new file mode 100644
index 0000000..0c8e4cf
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/Category.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+ public class Category
+ {
+ [JsonProperty("id")]
+ public long Id { get; set; }
+
+ [JsonProperty("description")]
+ public string Description { get; set; }
+ }
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/Genre.cs b/SteamStorefrontAPI/appdetails/Classes/Genre.cs
new file mode 100644
index 0000000..96685b4
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/Genre.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+ public class Genre
+ {
+ [JsonProperty("id")]
+ public string Id { get; set; }
+
+ [JsonProperty("description")]
+ public string Description { get; set; }
+ }
+
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/Highlighted.cs b/SteamStorefrontAPI/appdetails/Classes/Highlighted.cs
new file mode 100644
index 0000000..2a4f271
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/Highlighted.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+ public class Highlighted
+ {
+ [JsonProperty("name")]
+ public string Name { get; set; }
+
+ [JsonProperty("path")]
+ public string Path { get; set; }
+ }
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/Movie.cs b/SteamStorefrontAPI/appdetails/Classes/Movie.cs
new file mode 100644
index 0000000..2e9f984
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/Movie.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+ public class Movie
+ {
+ [JsonProperty("id")]
+ public long Id { get; set; }
+
+ [JsonProperty("name")]
+ public string Name { get; set; }
+
+ [JsonProperty("thumbnail")]
+ public string Thumbnail { get; set; }
+
+ [JsonProperty("webm")]
+ public Dictionary Webm { get; set; }
+
+ [JsonProperty("highlight")]
+ public bool Highlight { get; set; }
+ }
+
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/PackageGroup.cs b/SteamStorefrontAPI/appdetails/Classes/PackageGroup.cs
new file mode 100644
index 0000000..620184b
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/PackageGroup.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+
+ public class PackageGroup
+ {
+ [JsonProperty("name")]
+ public string Name { get; set; }
+
+ [JsonProperty("title")]
+ public string Title { get; set; }
+
+ [JsonProperty("description")]
+ public string Description { get; set; }
+
+ [JsonProperty("selection_text")]
+ public string SelectionText { get; set; }
+
+ [JsonProperty("save_text")]
+ public string SaveText { get; set; }
+
+ [JsonProperty("display_type")]
+ public long DisplayType { get; set; }
+
+ [JsonProperty("is_recurring_subscription")]
+ public string IsRecurringSubscription { get; set; }
+
+ [JsonProperty("subs")]
+ public List Subs { get; set; }
+ }
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/PcRequirements.cs b/SteamStorefrontAPI/appdetails/Classes/PcRequirements.cs
new file mode 100644
index 0000000..bc72d5f
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/PcRequirements.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+ public class PcRequirements
+ {
+ [JsonProperty("minimum")]
+ public string Minimum { get; set; }
+
+ [JsonProperty("recommended")]
+ public string Recommended { get; set; }
+ }
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/Platforms.cs b/SteamStorefrontAPI/appdetails/Classes/Platforms.cs
new file mode 100644
index 0000000..6689c58
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/Platforms.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+ public class Platforms
+ {
+ [JsonProperty("windows")]
+ public bool Windows { get; set; }
+
+ [JsonProperty("mac")]
+ public bool Mac { get; set; }
+
+ [JsonProperty("linux")]
+ public bool Linux { get; set; }
+ }
+
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/PriceOverview.cs b/SteamStorefrontAPI/appdetails/Classes/PriceOverview.cs
new file mode 100644
index 0000000..85704cf
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/PriceOverview.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+ public class PriceOverview
+ {
+ [JsonProperty("currency")]
+ public string Currency { get; set; }
+
+ [JsonProperty("initial")]
+ [JsonConverter(typeof(LongToDoubleConverter))]
+ public double Initial { get; set; }
+
+ [JsonProperty("final")]
+ [JsonConverter(typeof(LongToDoubleConverter))]
+ public double Final { get; set; }
+
+ [JsonProperty("discount_percent")]
+ public long DiscountPercent { get; set; }
+ }
+
+ public class LongToDoubleConverter : JsonConverter
+ {
+ public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
+ {
+ long longValue = long.Parse(reader.Value.ToString());
+ double convertedValue = longValue / 100.0;
+ return convertedValue;
+ }
+
+ public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
+ {
+ throw new NotImplementedException("Unnecessary because CanRead is CanWrite. The type will skip the converter.");
+ }
+
+ public override bool CanConvert(Type objectType)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override bool CanRead
+ {
+ get { return true; }
+ }
+
+ public override bool CanWrite
+ {
+ get { return false; }
+ }
+ }
+
+ public class PriceOverviewSerializer : JsonSerializer
+ {
+
+ }
+
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/Recommendations.cs b/SteamStorefrontAPI/appdetails/Classes/Recommendations.cs
new file mode 100644
index 0000000..4296728
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/Recommendations.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+ public class Recommendations
+ {
+ [JsonProperty("total")]
+ public long Total { get; set; }
+ }
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/ReleaseDate.cs b/SteamStorefrontAPI/appdetails/Classes/ReleaseDate.cs
new file mode 100644
index 0000000..7e32d17
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/ReleaseDate.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+ public class ReleaseDate
+ {
+ [JsonProperty("coming_soon")]
+ public bool ComingSoon { get; set; }
+
+ [JsonProperty("date")]
+ public string Date { get; set; }
+ }
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/Screenshot.cs b/SteamStorefrontAPI/appdetails/Classes/Screenshot.cs
new file mode 100644
index 0000000..dc84795
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/Screenshot.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace SteamStorefrontAPI
+{
+
+ public class Screenshot
+ {
+ [JsonProperty("id")]
+ public long Id { get; set; }
+
+ [JsonProperty("path_thumbnail")]
+ public string PathThumbnail { get; set; }
+
+ [JsonProperty("path_full")]
+ public string PathFull { get; set; }
+ }
+}
diff --git a/SteamStorefrontAPI/appdetails/Classes/SteamApp.cs b/SteamStorefrontAPI/appdetails/Classes/SteamApp.cs
new file mode 100644
index 0000000..16f13c9
--- /dev/null
+++ b/SteamStorefrontAPI/appdetails/Classes/SteamApp.cs
@@ -0,0 +1,119 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Globalization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using Newtonsoft.Json.Linq;
+
+namespace SteamStorefrontAPI.Classes
+{
+ public class SteamApp
+ {
+ [JsonProperty("type")]
+ public string Type { get; set; }
+
+ [JsonProperty("name")]
+ public string Name { get; set; }
+
+ [JsonProperty("steam_appid")]
+ public long SteamAppid { get; set; }
+
+ [JsonProperty("required_age")]
+ public string RequiredAge { get; set; }
+
+ [JsonProperty("is_free")]
+ public bool IsFree { get; set; }
+
+ [JsonProperty("detailed_description")]
+ public string DetailedDescription { get; set; }
+
+ [JsonProperty("about_the_game")]
+ public string AboutTheGame { get; set; }
+
+ [JsonProperty("short_description")]
+ public string ShortDescription { get; set; }
+
+ [JsonProperty("supported_languages")]
+ public string SupportedLanguages { get; set; }
+
+ [JsonProperty("header_image")]
+ public string HeaderImage { get; set; }
+
+ [JsonProperty("website")]
+ public string Website { get; set; }
+
+ [JsonProperty("pc_requirements")]
+ public PcRequirements PcRequirements { get; set; }
+
+ [JsonProperty("mac_requirements")]
+ public List