From e4a2f555170b08263ae2d7e713808bd229b48947 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 22 Sep 2017 20:33:09 -0400 Subject: add GET endpoint for testing (#336) --- src/StardewModdingAPI.Web/Controllers/ModsController.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/StardewModdingAPI.Web/Controllers') diff --git a/src/StardewModdingAPI.Web/Controllers/ModsController.cs b/src/StardewModdingAPI.Web/Controllers/ModsController.cs index 7f7afbb9..366201e3 100644 --- a/src/StardewModdingAPI.Web/Controllers/ModsController.cs +++ b/src/StardewModdingAPI.Web/Controllers/ModsController.cs @@ -28,6 +28,17 @@ namespace StardewModdingAPI.Web.Controllers /********* ** Public methods *********/ + /// Fetch version metadata for the given mods. + /// The namespaced mod keys to search as a comma-delimited array. + [HttpGet] + public async Task> GetAsync(string modKeys) + { + return await this.Post(new ModSearchModel + { + ModKeys = modKeys?.Split(',').Select(p => p.Trim()).ToArray() ?? new string[0] + }); + } + /// Fetch version metadata for the given mods. /// The search options. [HttpPost] -- cgit