mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-02-26 09:44:38 +00:00
@@ -22,6 +22,7 @@ namespace Readarr.Api.V1.Health
|
||||
_healthCheckService = healthCheckService;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
protected override HealthResource GetResourceById(int id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NzbDrone.Core.DecisionEngine;
|
||||
using Readarr.Http.REST;
|
||||
|
||||
@@ -7,6 +8,7 @@ namespace Readarr.Api.V1.Indexers
|
||||
{
|
||||
public abstract class ReleaseControllerBase : RestController<ReleaseResource>
|
||||
{
|
||||
[NonAction]
|
||||
protected override ReleaseResource GetResourceById(int id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace Readarr.Api.V1
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Produces("application/json")]
|
||||
public List<TProviderResource> GetAll()
|
||||
{
|
||||
var providerDefinitions = _providerFactory.All().OrderBy(p => p.ImplementationName);
|
||||
@@ -58,6 +59,8 @@ namespace Readarr.Api.V1
|
||||
}
|
||||
|
||||
[RestPostById]
|
||||
[Consumes("application/json")]
|
||||
[Produces("application/json")]
|
||||
public ActionResult<TProviderResource> CreateProvider([FromBody] TProviderResource providerResource, [FromQuery] bool forceSave = false)
|
||||
{
|
||||
var providerDefinition = GetDefinition(providerResource, true, !forceSave, false);
|
||||
@@ -73,6 +76,8 @@ namespace Readarr.Api.V1
|
||||
}
|
||||
|
||||
[RestPutById]
|
||||
[Consumes("application/json")]
|
||||
[Produces("application/json")]
|
||||
public ActionResult<TProviderResource> UpdateProvider([FromBody] TProviderResource providerResource, [FromQuery] bool forceSave = false)
|
||||
{
|
||||
var providerDefinition = GetDefinition(providerResource, true, !forceSave, false);
|
||||
@@ -108,6 +113,7 @@ namespace Readarr.Api.V1
|
||||
}
|
||||
|
||||
[HttpGet("schema")]
|
||||
[Produces("application/json")]
|
||||
public List<TProviderResource> GetTemplates()
|
||||
{
|
||||
var defaultDefinitions = _providerFactory.GetDefaultDefinitions().OrderBy(p => p.ImplementationName).ToList();
|
||||
@@ -131,6 +137,7 @@ namespace Readarr.Api.V1
|
||||
|
||||
[SkipValidation(true, false)]
|
||||
[HttpPost("test")]
|
||||
[Consumes("application/json")]
|
||||
public object Test([FromBody] TProviderResource providerResource)
|
||||
{
|
||||
var providerDefinition = GetDefinition(providerResource, true, true, true);
|
||||
@@ -141,6 +148,7 @@ namespace Readarr.Api.V1
|
||||
}
|
||||
|
||||
[HttpPost("testall")]
|
||||
[Produces("application/json")]
|
||||
public IActionResult TestAll()
|
||||
{
|
||||
var providerDefinitions = _providerFactory.All()
|
||||
@@ -164,6 +172,8 @@ namespace Readarr.Api.V1
|
||||
|
||||
[SkipValidation]
|
||||
[HttpPost("action/{name}")]
|
||||
[Consumes("application/json")]
|
||||
[Produces("application/json")]
|
||||
public IActionResult RequestAction(string name, [FromBody] TProviderResource resource)
|
||||
{
|
||||
var providerDefinition = GetDefinition(resource, false, false, false);
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace Readarr.Api.V1.Queue
|
||||
_qualityComparer = new QualityModelComparer(qualityProfileService.GetDefaultProfile(string.Empty));
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
protected override QueueResource GetResourceById(int id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace Readarr.Api.V1.Queue
|
||||
_pendingReleaseService = pendingReleaseService;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
protected override QueueResource GetResourceById(int id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace Readarr.Api.V1.Queue
|
||||
_broadcastDebounce = new Debouncer(BroadcastChange, TimeSpan.FromSeconds(5));
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
protected override QueueStatusResource GetResourceById(int id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
Reference in New Issue
Block a user