mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-24 22:35:39 -04:00
Method, Variable, Class Renames in Readarr.Api
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using Readarr.Api.V1.Albums;
|
||||
using RestSharp;
|
||||
|
||||
namespace NzbDrone.Integration.Test.Client
|
||||
{
|
||||
public class AlbumClient : ClientBase<AlbumResource>
|
||||
{
|
||||
public AlbumClient(IRestClient restClient, string apiKey)
|
||||
: base(restClient, apiKey, "album")
|
||||
{
|
||||
}
|
||||
|
||||
public List<AlbumResource> GetAlbumsInArtist(int authorId)
|
||||
{
|
||||
var request = BuildRequest("?authorId=" + authorId.ToString());
|
||||
return Get<List<AlbumResource>>(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
-10
@@ -1,39 +1,39 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using Readarr.Api.V1.Artist;
|
||||
using Readarr.Api.V1.Author;
|
||||
using RestSharp;
|
||||
|
||||
namespace NzbDrone.Integration.Test.Client
|
||||
{
|
||||
public class ArtistClient : ClientBase<ArtistResource>
|
||||
public class AuthorClient : ClientBase<AuthorResource>
|
||||
{
|
||||
public ArtistClient(IRestClient restClient, string apiKey)
|
||||
public AuthorClient(IRestClient restClient, string apiKey)
|
||||
: base(restClient, apiKey)
|
||||
{
|
||||
}
|
||||
|
||||
public List<ArtistResource> Lookup(string term)
|
||||
public List<AuthorResource> Lookup(string term)
|
||||
{
|
||||
var request = BuildRequest("lookup");
|
||||
request.AddQueryParameter("term", term);
|
||||
return Get<List<ArtistResource>>(request);
|
||||
return Get<List<AuthorResource>>(request);
|
||||
}
|
||||
|
||||
public List<ArtistResource> Editor(ArtistEditorResource artist)
|
||||
public List<AuthorResource> Editor(AuthorEditorResource artist)
|
||||
{
|
||||
var request = BuildRequest("editor");
|
||||
request.AddJsonBody(artist);
|
||||
return Put<List<ArtistResource>>(request);
|
||||
return Put<List<AuthorResource>>(request);
|
||||
}
|
||||
|
||||
public ArtistResource Get(string slug, HttpStatusCode statusCode = HttpStatusCode.OK)
|
||||
public AuthorResource Get(string slug, HttpStatusCode statusCode = HttpStatusCode.OK)
|
||||
{
|
||||
var request = BuildRequest(slug);
|
||||
return Get<ArtistResource>(request, statusCode);
|
||||
return Get<AuthorResource>(request, statusCode);
|
||||
}
|
||||
}
|
||||
|
||||
public class SystemInfoClient : ClientBase<ArtistResource>
|
||||
public class SystemInfoClient : ClientBase<AuthorResource>
|
||||
{
|
||||
public SystemInfoClient(IRestClient restClient, string apiKey)
|
||||
: base(restClient, apiKey)
|
||||
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using Readarr.Api.V1.Books;
|
||||
using RestSharp;
|
||||
|
||||
namespace NzbDrone.Integration.Test.Client
|
||||
{
|
||||
public class BookClient : ClientBase<BookResource>
|
||||
{
|
||||
public BookClient(IRestClient restClient, string apiKey)
|
||||
: base(restClient, apiKey, "book")
|
||||
{
|
||||
}
|
||||
|
||||
public List<BookResource> GetBooksInAuthor(int authorId)
|
||||
{
|
||||
var request = BuildRequest("?authorId=" + authorId.ToString());
|
||||
return Get<List<BookResource>>(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user