mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 07:22:35 +01:00
New: Base API info endpoint
This commit is contained in:
parent
28df29ae8a
commit
5e57ffbcf9
23
src/Sonarr.Http/ApiInfoController.cs
Normal file
23
src/Sonarr.Http/ApiInfoController.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace NzbDrone.Http
|
||||||
|
{
|
||||||
|
public class ApiInfoController : Controller
|
||||||
|
{
|
||||||
|
public ApiInfoController()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("/api")]
|
||||||
|
[Produces("application/json")]
|
||||||
|
public object GetApiInfo()
|
||||||
|
{
|
||||||
|
return new ApiInfoResource
|
||||||
|
{
|
||||||
|
Current = "v3",
|
||||||
|
Deprecated = new List<string>()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
src/Sonarr.Http/ApiInfoResource.cs
Normal file
14
src/Sonarr.Http/ApiInfoResource.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace NzbDrone.Http
|
||||||
|
{
|
||||||
|
public class ApiInfoResource
|
||||||
|
{
|
||||||
|
public string Current { get; set; }
|
||||||
|
public List<string> Deprecated { get; set; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user