17 lines
582 B
C#
17 lines
582 B
C#
using PageManager.Api.Api.Dtos;
|
|
|
|
namespace PageManager.Api.Services;
|
|
|
|
public interface IBooksService
|
|
{
|
|
Task<IEnumerable<BookDto>> GetAllAsync();
|
|
Task<BookDto?> GetByIdAsync(int id);
|
|
Task<BookDto?> UpdateAsync(int id, UpdateBookRequest req);
|
|
/// <summary>
|
|
/// Fetches full metadata from Hardcover and persists the book.
|
|
/// Returns the existing book if hardcoverId already exists in the DB.
|
|
/// Returns null if the Hardcover API does not recognise the id.
|
|
/// </summary>
|
|
Task<BookDto?> CreateFromHardcoverAsync(int hardcoverId);
|
|
}
|