Skip to content

Commit 32d3c1b

Browse files
author
babelshift
committed
Move to Version 2 of GetAppList method.
1 parent 6759bd5 commit 32d3c1b

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

SteamWebAPI2.Models/SteamAppListResultContainer.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,10 @@ public class SteamApp
1515
public string Name { get; set; }
1616
}
1717

18-
public class SteamAppList
19-
{
20-
[JsonProperty("app")]
21-
public IList<SteamApp> Apps { get; set; }
22-
}
23-
2418
public class SteamAppListResult
2519
{
2620
[JsonProperty("apps")]
27-
public SteamAppList AppList { get; set; }
21+
public IList<SteamApp> Apps { get; set; }
2822
}
2923

3024
public class SteamAppListResultContainer

SteamWebAPI2/SteamApps.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public SteamApps(string steamWebApiKey)
1717

1818
public async Task<IReadOnlyCollection<SteamApp>> GetAppList()
1919
{
20-
var steamAppList = await CallMethodAsync<SteamAppListResultContainer>("GetAppList", 1);
21-
return new ReadOnlyCollection<SteamApp>(steamAppList.AppListResult.AppList.Apps);
20+
var steamAppList = await CallMethodAsync<SteamAppListResultContainer>("GetAppList", 2);
21+
return new ReadOnlyCollection<SteamApp>(steamAppList.AppListResult.Apps);
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)