mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
Method, Variable, Class Renames in Readarr.Api
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using Readarr.Api.V1.Author;
|
||||
using RestSharp;
|
||||
|
||||
namespace NzbDrone.Integration.Test.Client
|
||||
{
|
||||
public class AuthorClient : ClientBase<AuthorResource>
|
||||
{
|
||||
public AuthorClient(IRestClient restClient, string apiKey)
|
||||
: base(restClient, apiKey)
|
||||
{
|
||||
}
|
||||
|
||||
public List<AuthorResource> Lookup(string term)
|
||||
{
|
||||
var request = BuildRequest("lookup");
|
||||
request.AddQueryParameter("term", term);
|
||||
return Get<List<AuthorResource>>(request);
|
||||
}
|
||||
|
||||
public List<AuthorResource> Editor(AuthorEditorResource artist)
|
||||
{
|
||||
var request = BuildRequest("editor");
|
||||
request.AddJsonBody(artist);
|
||||
return Put<List<AuthorResource>>(request);
|
||||
}
|
||||
|
||||
public AuthorResource Get(string slug, HttpStatusCode statusCode = HttpStatusCode.OK)
|
||||
{
|
||||
var request = BuildRequest(slug);
|
||||
return Get<AuthorResource>(request, statusCode);
|
||||
}
|
||||
}
|
||||
|
||||
public class SystemInfoClient : ClientBase<AuthorResource>
|
||||
{
|
||||
public SystemInfoClient(IRestClient restClient, string apiKey)
|
||||
: base(restClient, apiKey)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user