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.
Sonarr/src/Sonarr.Api.V3/Tags/TagDetailsController.cs

32 lines
791 B

using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using NzbDrone.Core.Tags;
using Sonarr.Http;
using Sonarr.Http.REST;
namespace Sonarr.Api.V3.Tags
{
[V3ApiController("tag/detail")]
public class TagDetailsController : RestController<TagDetailsResource>
{
private readonly ITagService _tagService;
public TagDetailsController(ITagService tagService)
{
_tagService = tagService;
}
protected override TagDetailsResource GetResourceById(int id)
{
return _tagService.Details(id).ToResource();
}
[HttpGet]
[Produces("application/json")]
public List<TagDetailsResource> GetAll()
{
return _tagService.Details().ToResource();
}
}
}