mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Refactored HttpRequest and HttpRequestBuilder, moving most of the logic to the HttpRequestBuilder.
Added ContentSummary to be able to describe the ContentData in a human readable form. (Useful for JsonRpc and FormData).
This commit is contained in:
parent
7818f0c59b
commit
2ffbbb0e71
41 changed files with 683 additions and 347 deletions
|
@ -12,17 +12,20 @@ namespace NzbDrone.Core.DataAugmentation.Scene
|
|||
public class SceneMappingProxy : ISceneMappingProxy
|
||||
{
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly IDroneServicesRequestBuilder _requestBuilder;
|
||||
private readonly IHttpRequestBuilderFactory _requestBuilder;
|
||||
|
||||
public SceneMappingProxy(IHttpClient httpClient, IDroneServicesRequestBuilder requestBuilder)
|
||||
public SceneMappingProxy(IHttpClient httpClient, ISonarrCloudRequestBuilder requestBuilder)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
_requestBuilder = requestBuilder;
|
||||
_requestBuilder = requestBuilder.Services;
|
||||
}
|
||||
|
||||
public List<SceneMapping> Fetch()
|
||||
{
|
||||
var request = _requestBuilder.Build("/scenemapping");
|
||||
var request = _requestBuilder.Create()
|
||||
.Resource("/scenemapping")
|
||||
.Build();
|
||||
|
||||
return _httpClient.Get<List<SceneMapping>>(request).Resource;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue