|
|
|
@ -66,6 +66,8 @@ namespace Radarr.Api.V3
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[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);
|
|
|
|
@ -81,6 +83,8 @@ namespace Radarr.Api.V3
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[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);
|
|
|
|
@ -98,6 +102,7 @@ namespace Radarr.Api.V3
|
|
|
|
|
|
|
|
|
|
[HttpPut("bulk")]
|
|
|
|
|
[Consumes("application/json")]
|
|
|
|
|
[Produces("application/json")]
|
|
|
|
|
public ActionResult<TProviderResource> UpdateProvider([FromBody] TBulkProviderResource providerResource)
|
|
|
|
|
{
|
|
|
|
|
var definitionsToUpdate = _providerFactory.Get(providerResource.Ids).ToList();
|
|
|
|
@ -191,6 +196,7 @@ namespace Radarr.Api.V3
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost("testall")]
|
|
|
|
|
[Produces("application/json")]
|
|
|
|
|
public IActionResult TestAll()
|
|
|
|
|
{
|
|
|
|
|
var providerDefinitions = _providerFactory.All()
|
|
|
|
@ -214,6 +220,8 @@ namespace Radarr.Api.V3
|
|
|
|
|
|
|
|
|
|
[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);
|
|
|
|
|