1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00
Radarr/NzbDrone.Integration.Test/Client/SeriesClient.cs
2013-05-03 19:42:11 -07:00

31 lines
788 B
C#

using System.Collections.Generic;
using System.Net;
using NzbDrone.Api.Series;
using RestSharp;
namespace NzbDrone.Integration.Test.Client
{
public class SeriesClient : ClientBase<SeriesResource>
{
public SeriesClient(IRestClient restClient)
: base(restClient)
{
}
public List<SeriesResource> Lookup(string term)
{
var request = BuildRequest("lookup?term={term}");
request.AddUrlSegment("term", term);
return Get<List<SeriesResource>>(request);
}
public SeriesResource Get(string slug, HttpStatusCode statusCode = HttpStatusCode.OK)
{
var request = BuildRequest(slug);
return Get<SeriesResource>(request, statusCode);
}
}
}