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.
44 lines
1.2 KiB
44 lines
1.2 KiB
using System.Collections.Generic;
|
|
using System.Net;
|
|
using RestSharp;
|
|
using Sonarr.Api.V3.Series;
|
|
|
|
namespace NzbDrone.Integration.Test.Client
|
|
{
|
|
public class SeriesClient : ClientBase<SeriesResource>
|
|
{
|
|
public SeriesClient(IRestClient restClient, string apiKey)
|
|
: base(restClient, apiKey)
|
|
{
|
|
}
|
|
|
|
public List<SeriesResource> Lookup(string term)
|
|
{
|
|
var request = BuildRequest("lookup");
|
|
request.AddQueryParameter("term", term);
|
|
return Get<List<SeriesResource>>(request);
|
|
}
|
|
|
|
public List<SeriesResource> Editor(SeriesEditorResource series)
|
|
{
|
|
var request = BuildRequest("editor");
|
|
request.AddJsonBody(series);
|
|
return Put<List<SeriesResource>>(request);
|
|
}
|
|
|
|
public SeriesResource Get(string slug, HttpStatusCode statusCode = HttpStatusCode.OK)
|
|
{
|
|
var request = BuildRequest(slug);
|
|
return Get<SeriesResource>(request, statusCode);
|
|
}
|
|
}
|
|
|
|
public class SystemInfoClient : ClientBase<SeriesResource>
|
|
{
|
|
public SystemInfoClient(IRestClient restClient, string apiKey)
|
|
: base(restClient, apiKey)
|
|
{
|
|
}
|
|
}
|
|
}
|