|
|
@ -76,6 +76,21 @@ namespace MediaBrowser.Api
|
|
|
|
public Stream RequestStream { get; set; }
|
|
|
|
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>
|
|
|
|
/// <summary>
|
|
|
|
/// Class PluginsService
|
|
|
|
/// Class PluginsService
|
|
|
@ -111,6 +126,19 @@ namespace MediaBrowser.Api
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the specified request.
|
|
|
|
/// Gets the specified request.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|