From 60b38666e29684650108031f08ca30bfe483ceab Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 29 Jun 2018 01:27:31 -0400 Subject: simplify mod API response structure (#532) --- .../Framework/Clients/WebApi/WebApiClient.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/StardewModdingAPI.Toolkit') 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 /// The mod keys for which to fetch the latest version. public IDictionary GetModInfo(params ModSearchEntryModel[] mods) { - return this.Post>( + return this.Post( $"v{this.Version}/mods", new ModSearchModel(mods) - ); + ).ToDictionary(p => p.ID); } -- cgit