1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-12 22:12:38 +01:00
Radarr/NzbDrone.Integration.Test/Client/SeriesClient.cs

38 lines
1016 B
C#
Raw Normal View History

2013-04-19 06:46:18 +02:00
using System.Collections.Generic;
2013-05-04 04:42:11 +02:00
using System.Net;
2013-04-19 06:46:18 +02:00
using NzbDrone.Api.Series;
using RestSharp;
namespace NzbDrone.Integration.Test.Client
{
public class SeriesClient : ClientBase<SeriesResource>
{
2013-09-21 04:07:42 +02:00
public SeriesClient(IRestClient restClient, string apiKey)
: base(restClient, apiKey)
2013-04-19 06:46:18 +02:00
{
}
public List<SeriesResource> Lookup(string term)
{
var request = BuildRequest("lookup?term={term}");
request.AddUrlSegment("term", term);
return Get<List<SeriesResource>>(request);
}
2013-05-04 04:42:11 +02:00
public SeriesResource Get(string slug, HttpStatusCode statusCode = HttpStatusCode.OK)
{
var request = BuildRequest(slug);
return Get<SeriesResource>(request, statusCode);
}
2013-04-19 06:46:18 +02:00
}
public class SystemInfoClient : ClientBase<SeriesResource>
{
2013-09-21 04:07:42 +02:00
public SystemInfoClient(IRestClient restClient, string apiKey)
: base(restClient, apiKey)
{
}
}
}