You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
recyclarr/src/Recyclarr.TrashLib/Services/CustomFormat/Api/QualityProfileService.cs

29 lines
773 B

using Flurl.Http;
using Newtonsoft.Json.Linq;
using Recyclarr.TrashLib.Config.Services;
namespace Recyclarr.TrashLib.Services.CustomFormat.Api;
internal class QualityProfileService : IQualityProfileService
{
private readonly IServiceRequestBuilder _service;
public QualityProfileService(IServiceRequestBuilder service)
{
_service = service;
}
public async Task<List<JObject>> GetQualityProfiles()
{
return await _service.Request("qualityprofile")
.GetJsonAsync<List<JObject>>();
}
public async Task<JObject> UpdateQualityProfile(JObject profileJson, int id)
{
return await _service.Request("qualityprofile", id)
.PutJsonAsync(profileJson)
.ReceiveJson<JObject>();
}
}