mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Added ContentSummary to be able to describe the ContentData in a human readable form. (Useful for JsonRpc and FormData).
32 lines
No EOL
940 B
C#
32 lines
No EOL
940 B
C#
using System.Collections.Generic;
|
|
using NzbDrone.Common.Cloud;
|
|
using NzbDrone.Common.Http;
|
|
|
|
namespace NzbDrone.Core.DataAugmentation.Scene
|
|
{
|
|
public interface ISceneMappingProxy
|
|
{
|
|
List<SceneMapping> Fetch();
|
|
}
|
|
|
|
public class SceneMappingProxy : ISceneMappingProxy
|
|
{
|
|
private readonly IHttpClient _httpClient;
|
|
private readonly IHttpRequestBuilderFactory _requestBuilder;
|
|
|
|
public SceneMappingProxy(IHttpClient httpClient, ISonarrCloudRequestBuilder requestBuilder)
|
|
{
|
|
_httpClient = httpClient;
|
|
_requestBuilder = requestBuilder.Services;
|
|
}
|
|
|
|
public List<SceneMapping> Fetch()
|
|
{
|
|
var request = _requestBuilder.Create()
|
|
.Resource("/scenemapping")
|
|
.Build();
|
|
|
|
return _httpClient.Get<List<SceneMapping>>(request).Resource;
|
|
}
|
|
}
|
|
} |