mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
29 lines
830 B
C#
29 lines
830 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 IDroneServicesRequestBuilder _requestBuilder;
|
|
|
|
public SceneMappingProxy(IHttpClient httpClient, IDroneServicesRequestBuilder requestBuilder)
|
|
{
|
|
_httpClient = httpClient;
|
|
_requestBuilder = requestBuilder;
|
|
}
|
|
|
|
public List<SceneMapping> Fetch()
|
|
{
|
|
var request = _requestBuilder.Build("/scenemapping");
|
|
return _httpClient.Get<List<SceneMapping>>(request).Resource;
|
|
}
|
|
}
|
|
} |