New: Base API info endpoint

(cherry picked from commit 5e57ffbcf9ac3a346d4bf2b692248393215bad89)
This commit is contained in:
Qstick 2022-10-31 19:37:05 -05:00
parent bd19c89f6e
commit 7fcb0d6e45
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,23 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
namespace Radarr.Http
{
public class ApiInfoController : Controller
{
public ApiInfoController()
{
}
[HttpGet("/api")]
[Produces("application/json")]
public ApiInfoResource GetApiInfo()
{
return new ApiInfoResource
{
Current = "v3",
Deprecated = new List<string>()
};
}
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Radarr.Http
{
public class ApiInfoResource
{
public string Current { get; set; }
public List<string> Deprecated { get; set; }
}
}