public static Task <IList <JSONProfile> > GetProfiles(HttpClient httpClient, ILogger <SonarrClient> logger, SonarrSettings settings) { if (settings.Version == "2") { return(SonarrClientV2.GetProfiles(httpClient, logger, settings)); } else { return(SonarrClientV3.GetProfiles(httpClient, logger, settings)); } }
public static Task <IList <JSONTag> > GetTags(HttpClient httpClient, ILogger <SonarrClient> logger, SonarrSettings settings) { if (settings.Version == "2") { return(Task.FromResult((IList <JSONTag>) new List <JSONTag>())); } else { return(SonarrClientV3.GetTags(httpClient, logger, settings)); } }
public static Task TestConnectionAsync(HttpClient httpClient, ILogger <SonarrClient> logger, SonarrSettings settings) { if (settings.Version == "2") { return(SonarrClientV2.TestConnectionAsync(httpClient, logger, settings)); } else { return(SonarrClientV3.TestConnectionAsync(httpClient, logger, settings)); } }