aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaus Vium <clausvium@gmail.com>2019-01-05 00:25:34 +0100
committerBond-009 <bond.009@outlook.com>2019-01-15 16:48:21 +0100
commit4a03ac40220c26e4c08788a6f9434e0f6472bf9d (patch)
tree1382cfecd7047adcb825d15f0233fe0031465e80
parenteca3c099d9bd54f1e745143589c12fb9008aee13 (diff)
mock the registration endpoint since livetv etc. still uses it
-rw-r--r--MediaBrowser.Api/PluginService.cs32
1 files changed, 30 insertions, 2 deletions
diff --git a/MediaBrowser.Api/PluginService.cs b/MediaBrowser.Api/PluginService.cs
index 75defa998..477f916de 100644
--- a/MediaBrowser.Api/PluginService.cs
+++ b/MediaBrowser.Api/PluginService.cs
@@ -76,7 +76,22 @@ namespace MediaBrowser.Api
public Stream RequestStream { get; set; }
}
-
+ [Route("/Registrations/{Name}", "GET", Summary = "Gets registration status for a feature", IsHidden = true)]
+ [Authenticated]
+ public class GetRegistration : IReturn<RegistrationInfo>
+ {
+ [ApiMember(Name = "Name", Description = "Feature Name", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
+ public string Name { get; set; }
+ }
+
+ public class RegistrationInfo
+ {
+ public string Name { get; set; }
+ public DateTime ExpirationDate { get; set; }
+ public bool IsTrial { get; set; }
+ public bool IsRegistered { get; set; }
+ }
+
/// <summary>
/// Class PluginsService
/// </summary>
@@ -109,7 +124,20 @@ namespace MediaBrowser.Api
_deviceManager = deviceManager;
_jsonSerializer = jsonSerializer;
}
-
+
+
+ public async Task<object> Get(GetRegistration request)
+ {
+ var info = new RegistrationInfo
+ {
+ ExpirationDate = DateTime.Now.AddYears(100),
+ IsRegistered = true,
+ IsTrial = false,
+ Name = request.Name
+ };
+
+ return ToOptimizedResult(info);
+ }
/// <summary>
/// Gets the specified request.