diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-29 01:27:31 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-29 01:27:31 -0400 |
commit | 60b38666e29684650108031f08ca30bfe483ceab (patch) | |
tree | 8f6ad290eaae30fcd70df87ed4b94cb2cc51d9bc /src/StardewModdingAPI.Toolkit | |
parent | a0888e0ad1bf0ed38982d2aadf78c31d046b061b (diff) | |
download | SMAPI-60b38666e29684650108031f08ca30bfe483ceab.tar.gz SMAPI-60b38666e29684650108031f08ca30bfe483ceab.tar.bz2 SMAPI-60b38666e29684650108031f08ca30bfe483ceab.zip |
simplify mod API response structure (#532)
Diffstat (limited to 'src/StardewModdingAPI.Toolkit')
-rw-r--r-- | src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/WebApiClient.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/WebApiClient.cs b/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/WebApiClient.cs index 892dfeba..3e412fc3 100644 --- a/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/WebApiClient.cs +++ b/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/WebApiClient.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Net; using Newtonsoft.Json; @@ -34,10 +35,10 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi /// <param name="mods">The mod keys for which to fetch the latest version.</param> public IDictionary<string, ModEntryModel> GetModInfo(params ModSearchEntryModel[] mods) { - return this.Post<ModSearchModel, Dictionary<string, ModEntryModel>>( + return this.Post<ModSearchModel, ModEntryModel[]>( $"v{this.Version}/mods", new ModSearchModel(mods) - ); + ).ToDictionary(p => p.ID); } |