using Flurl.Http; using Recyclarr.Config.Models; using Recyclarr.ServarrApi.Http.Servarr; namespace Recyclarr.ServarrApi.ReleaseProfile; public class ReleaseProfileApiService(IServarrRequestBuilder service) : IReleaseProfileApiService { public async Task UpdateReleaseProfile(IServiceConfiguration config, SonarrReleaseProfile profile) { await service.Request(config, "releaseprofile", profile.Id) .PutJsonAsync(profile); } public async Task CreateReleaseProfile( IServiceConfiguration config, SonarrReleaseProfile profile) { return await service.Request(config, "releaseprofile") .PostJsonAsync(profile) .ReceiveJson(); } public async Task> GetReleaseProfiles(IServiceConfiguration config) { return await service.Request(config, "releaseprofile") .GetJsonAsync>(); } public async Task DeleteReleaseProfile(IServiceConfiguration config, int releaseProfileId) { await service.Request(config, "releaseprofile", releaseProfileId) .DeleteAsync(); } }