mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
New: Base API info endpoint
(cherry picked from commit 5e57ffbcf9ac3a346d4bf2b692248393215bad89)
This commit is contained in:
parent
56ca149df9
commit
7275261960
2 changed files with 37 additions and 0 deletions
23
src/Lidarr.Http/ApiInfoController.cs
Normal file
23
src/Lidarr.Http/ApiInfoController.cs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace Lidarr.Http
|
||||||
|
{
|
||||||
|
public class ApiInfoController : Controller
|
||||||
|
{
|
||||||
|
public ApiInfoController()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("/api")]
|
||||||
|
[Produces("application/json")]
|
||||||
|
public object GetApiInfo()
|
||||||
|
{
|
||||||
|
return new ApiInfoResource
|
||||||
|
{
|
||||||
|
Current = "v1",
|
||||||
|
Deprecated = new List<string>()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
src/Lidarr.Http/ApiInfoResource.cs
Normal file
14
src/Lidarr.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 Lidarr.Http
|
||||||
|
{
|
||||||
|
public class ApiInfoResource
|
||||||
|
{
|
||||||
|
public string Current { get; set; }
|
||||||
|
public List<string> Deprecated { get; set; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue