You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
using System;
|
|
|
|
using Microsoft.AspNetCore.Mvc.Routing;
|
|
|
|
|
|
|
|
namespace Lidarr.Http
|
|
|
|
{
|
|
|
|
public class VersionedFeedControllerAttribute : Attribute, IRouteTemplateProvider
|
|
|
|
{
|
|
|
|
public VersionedFeedControllerAttribute(int version, string resource = "[controller]")
|
|
|
|
{
|
|
|
|
Version = version;
|
|
|
|
Template = $"feed/v{Version}/{resource}";
|
|
|
|
}
|
|
|
|
|
|
|
|
public string Template { get; private set; }
|
|
|
|
public int? Order => 2;
|
|
|
|
public string Name { get; set; }
|
|
|
|
public int Version { get; private set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public class V1FeedControllerAttribute : VersionedFeedControllerAttribute
|
|
|
|
{
|
|
|
|
public V1FeedControllerAttribute(string resource = "[controller]")
|
|
|
|
: base(1, resource)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|