Skip to content

Commit

Permalink
add price overview to app details data
Browse files Browse the repository at this point in the history
  • Loading branch information
peppage committed Nov 9, 2019
1 parent e0822cb commit b19a23c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/SteamWebAPI2/AutoMapperConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ public static void Initialize()
x.CreateMap<Metacritic, StoreMetacriticModel>();
x.CreateMap<Platforms, StorePlatformsModel>();
x.CreateMap<PackageGroup, StorePackageGroupModel>();
x.CreateMap<Price, StorePriceOverview>();
x.CreateMap<Sub, StoreSubModel>();

x.CreateMap<FeaturedCategoriesContainer, StoreFeaturedCategoriesModel>();
Expand Down Expand Up @@ -658,4 +659,4 @@ public static void Reset()
mapper = null;
}
}
}
}
26 changes: 25 additions & 1 deletion src/SteamWebAPI2/Models/SteamStore/AppDetailsContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,27 @@ internal class SupportInfo
public string Email { get; set; }
}

internal class Price
{
[JsonProperty("currency")]
public string Currency { get; set; }

[JsonProperty("initial")]
public uint Initial { get; set; }

[JsonProperty("final")]
public uint Final { get; set; }

[JsonProperty("discount_percent")]
public uint DiscountPercent { get; set; }

[JsonProperty("initial_formatted")]
public string InitialFormatted { get; set; }

[JsonProperty("final_formatted")]
public string FinalFormatted { get; set; }
}

internal class Data
{
[JsonProperty("type")]
Expand Down Expand Up @@ -206,6 +227,9 @@ internal class Data
[JsonProperty("developers")]
public string[] Developers { get; set; }

[JsonProperty("price_overview")]
public Price PriceOverview { get; set; }

[JsonProperty("publishers")]
public string[] Publishers { get; set; }

Expand Down Expand Up @@ -255,4 +279,4 @@ internal class AppDetailsContainer
[JsonProperty("data")]
public Data Data { get; set; }
}
}
}

0 comments on commit b19a23c

Please sign in to comment.