2013-04-19 04:46:18 +00:00
|
|
|
|
using System.Collections.Generic;
|
2013-05-04 02:42:11 +00:00
|
|
|
|
using System.Net;
|
2013-04-19 04:46:18 +00:00
|
|
|
|
using NzbDrone.Api.Series;
|
|
|
|
|
using RestSharp;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Integration.Test.Client
|
|
|
|
|
{
|
|
|
|
|
public class SeriesClient : ClientBase<SeriesResource>
|
|
|
|
|
{
|
|
|
|
|
public SeriesClient(IRestClient restClient)
|
2013-04-22 03:18:08 +00:00
|
|
|
|
: base(restClient)
|
2013-04-19 04:46:18 +00: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 02:42:11 +00:00
|
|
|
|
|
|
|
|
|
public SeriesResource Get(string slug, HttpStatusCode statusCode = HttpStatusCode.OK)
|
|
|
|
|
{
|
|
|
|
|
var request = BuildRequest(slug);
|
|
|
|
|
return Get<SeriesResource>(request, statusCode);
|
|
|
|
|
}
|
|
|
|
|
|
2013-04-19 04:46:18 +00:00
|
|
|
|
}
|
2013-04-22 03:18:08 +00:00
|
|
|
|
}
|