summaryrefslogtreecommitdiff
path: root/Dewdrop/Controllers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-09-21 23:35:18 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-09-21 23:35:18 -0400
commit9791de306c22c744732219dadfd97b7dd556a5b2 (patch)
treef320674827f3535cf238106070fefd5a762a2a0f /Dewdrop/Controllers
parent57d9d28554de79734401a68ee1151fc4e9e0ca83 (diff)
downloadSMAPI-9791de306c22c744732219dadfd97b7dd556a5b2.tar.gz
SMAPI-9791de306c22c744732219dadfd97b7dd556a5b2.tar.bz2
SMAPI-9791de306c22c744732219dadfd97b7dd556a5b2.zip
minor cleanup, formatting, documentation (#336)
Diffstat (limited to 'Dewdrop/Controllers')
-rw-r--r--Dewdrop/Controllers/CheckController.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Dewdrop/Controllers/CheckController.cs b/Dewdrop/Controllers/CheckController.cs
index f3cdd364..def2edbc 100644
--- a/Dewdrop/Controllers/CheckController.cs
+++ b/Dewdrop/Controllers/CheckController.cs
@@ -8,10 +8,16 @@ using Dewdrop.Models;
namespace Dewdrop.Controllers
{
+ /// <summary>Provides an API to perform mod update checks.</summary>
[Produces("application/json")]
[Route("api/check")]
public class CheckController : Controller
{
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Fetch version metadata for the given mods.</summary>
+ /// <param name="mods">The mods for which to fetch update metadata.</param>
[HttpPost]
public async Task<string> Post([FromBody] NexusResponseModel[] mods)
{
@@ -25,7 +31,7 @@ namespace Dewdrop.Controllers
try
{
// create request with HttpRequestMessage
- var request = new HttpRequestMessage(HttpMethod.Get, new Uri($"http://www.nexusmods.com/stardewvalley/mods/{mod.Id}"));
+ var request = new HttpRequestMessage(HttpMethod.Get, new Uri($"http://www.nexusmods.com/stardewvalley/mods/{mod.ID}"));
// add the Nexus Client useragent to get JSON response from the site
request.Headers.UserAgent.ParseAdd("Nexus Client v0.63.15");