Changelog is now available in the UI

New: Added changelog to UI
This commit is contained in:
Mark McDowall
2013-09-28 11:48:30 -07:00
parent 90001b1a3b
commit de556764bd
22 changed files with 285 additions and 52 deletions
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using NzbDrone.Common;
using RestSharp;
using NzbDrone.Core.Rest;
@@ -8,6 +9,7 @@ namespace NzbDrone.Core.Update
public interface IUpdatePackageProvider
{
UpdatePackage GetLatestUpdate(string branch, Version currentVersion);
List<UpdatePackage> GetRecentUpdates(string branch);
}
public class UpdatePackageProvider : IUpdatePackageProvider
@@ -27,5 +29,19 @@ namespace NzbDrone.Core.Update
return update.UpdatePackage;
}
public List<UpdatePackage> GetRecentUpdates(string branch)
{
var restClient = new RestClient(Services.RootUrl);
var request = new RestRequest("/v1/update/{branch}/all");
request.AddUrlSegment("branch", branch);
request.AddParameter("limit", 5);
var updates = restClient.ExecuteAndValidate<List<UpdatePackage>>(request);
return updates;
}
}
}