Skip to content

Commit 65d080b

Browse files
author
Justin
committed
Updated GetAppStoreDetails interface and models
1 parent 2d5c59f commit 65d080b

File tree

6 files changed

+100
-28
lines changed

6 files changed

+100
-28
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Steam.Models.SteamStore
2+
{
3+
public class StoreAchievement
4+
{
5+
public uint Total { get; set; }
6+
7+
public StoreHighlighted[] Highlighted { get; set; }
8+
}
9+
}

src/Steam.Models/SteamStore/StoreAppDetailsDataModel.cs

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,63 +9,69 @@ namespace Steam.Models.SteamStore
99
public class StoreAppDetailsDataModel
1010
{
1111
public string Type { get; set; }
12-
12+
1313
public string Name { get; set; }
14-
14+
1515
public uint SteamAppId { get; set; }
16-
16+
1717
public uint RequiredAge { get; set; }
18-
18+
19+
public string ControllerSupport { get; set; }
20+
1921
public bool IsFree { get; set; }
20-
22+
2123
public uint[] Dlc { get; set; }
22-
24+
2325
public string DetailedDescription { get; set; }
24-
26+
2527
public string AboutTheGame { get; set; }
2628

2729
public string ShortDescription { get; set; }
2830

2931
public string SupportedLanguages { get; set; }
30-
32+
3133
public string HeaderImage { get; set; }
32-
34+
3335
public string Website { get; set; }
34-
36+
3537
public dynamic PcRequirements { get; set; }
36-
38+
3739
public dynamic MacRequirements { get; set; }
38-
40+
3941
public dynamic LinuxRequirements { get; set; }
40-
42+
4143
public string[] Developers { get; set; }
42-
44+
4345
public string[] Publishers { get; set; }
4446

4547
public StorePriceOverview PriceOverview { get; set; }
4648

4749
public string[] Packages { get; set; }
48-
50+
4951
public StorePackageGroupModel[] PackageGroups { get; set; }
50-
52+
5153
public StorePlatformsModel Platforms { get; set; }
52-
54+
5355
public StoreMetacriticModel Metacritic { get; set; }
54-
56+
5557
public StoreCategoryModel[] Categories { get; set; }
56-
58+
5759
public StoreGenreModel[] Genres { get; set; }
58-
60+
5961
public StoreScreenshotModel[] Screenshots { get; set; }
60-
62+
6163
public StoreMovieModel[] Movies { get; set; }
62-
64+
6365
public StoreRecommendationsModel Recommendations { get; set; }
64-
66+
67+
public StoreAchievement Achievements { get; set; }
68+
6569
public StoreReleaseDateModel ReleaseDate { get; set; }
66-
70+
6771
public StoreSupportInfoModel SupportInfo { get; set; }
68-
72+
6973
public string Background { get; set; }
74+
75+
public StoreContentDescriptor ContentDescriptors { get; set; }
7076
}
7177
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Steam.Models.SteamStore
2+
{
3+
public class StoreContentDescriptor
4+
{
5+
public uint[] Ids { get; set; }
6+
7+
public string Notes { get; set; }
8+
}
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Steam.Models.SteamStore
2+
{
3+
public class StoreHighlighted
4+
{
5+
public string Name { get; set; }
6+
7+
public string Path { get; set; }
8+
}
9+
}

src/SteamWebAPI2/AutoMapperConfiguration.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,9 @@ public static void Initialize()
583583
x.CreateMap<PackageGroup, StorePackageGroupModel>();
584584
x.CreateMap<Price, StorePriceOverview>();
585585
x.CreateMap<Sub, StoreSubModel>();
586+
x.CreateMap<Achievement, StoreAchievement>();
587+
x.CreateMap<Highlighted, StoreHighlighted>();
588+
x.CreateMap<ContentDescriptor, StoreContentDescriptor>();
586589

587590
x.CreateMap<FeaturedCategoriesContainer, StoreFeaturedCategoriesModel>();
588591
x.CreateMap<TrailerSlideshow, StoreTrailerSlideshowModel>();

src/SteamWebAPI2/Models/SteamStore/AppDetailsContainer.cs

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ internal class Data
197197
[JsonProperty("is_free")]
198198
public bool IsFree { get; set; }
199199

200+
[JsonProperty("controller_support")]
201+
public string ControllerSupport { get; set; }
202+
200203
[JsonProperty("dlc")]
201204
public uint[] Dlc { get; set; }
202205

@@ -230,12 +233,12 @@ internal class Data
230233
[JsonProperty("developers")]
231234
public string[] Developers { get; set; }
232235

233-
[JsonProperty("price_overview")]
234-
public Price PriceOverview { get; set; }
235-
236236
[JsonProperty("publishers")]
237237
public string[] Publishers { get; set; }
238238

239+
[JsonProperty("price_overview")]
240+
public Price PriceOverview { get; set; }
241+
239242
[JsonProperty("packages")]
240243
public string[] Packages { get; set; }
241244

@@ -263,6 +266,9 @@ internal class Data
263266
[JsonProperty("recommendations")]
264267
public Recommendations Recommendations { get; set; }
265268

269+
[JsonProperty("achievements")]
270+
public Achievement Achievements { get; set; }
271+
266272
[JsonProperty("release_date")]
267273
public ReleaseDate ReleaseDate { get; set; }
268274

@@ -271,6 +277,36 @@ internal class Data
271277

272278
[JsonProperty("background")]
273279
public string Background { get; set; }
280+
281+
[JsonProperty("content_descriptors")]
282+
public ContentDescriptor ContentDescriptors { get; set; }
283+
}
284+
285+
public class ContentDescriptor
286+
{
287+
[JsonProperty("ids")]
288+
public uint[] Ids { get; set; }
289+
290+
[JsonProperty("notes")]
291+
public string Notes { get; set; }
292+
}
293+
294+
public class Achievement
295+
{
296+
[JsonProperty("total")]
297+
public uint Total { get; set; }
298+
299+
[JsonProperty("highlighted")]
300+
public Highlighted[] Highlighted { get; set; }
301+
}
302+
303+
public class Highlighted
304+
{
305+
[JsonProperty("name")]
306+
public string Name { get; set; }
307+
308+
[JsonProperty("path")]
309+
public string Path { get; set; }
274310
}
275311

276312
[JsonConverter(typeof(StoreAppDetailsContainerJsonConverter))]

0 commit comments

Comments
 (0)