39 lines
1.3 KiB
C#
39 lines
1.3 KiB
C#
using DeepDrftModels.DTOs;
|
|
using Models.Common;
|
|
using NetBlocks.Models;
|
|
|
|
namespace DeepDrftPublic.Client.Services;
|
|
|
|
/// <summary>
|
|
/// Track metadata fetch abstraction. Both SSR and WASM renders are served by
|
|
/// <c>TrackClientDataService</c> in this assembly, which delegates to
|
|
/// <see cref="Clients.TrackClient"/> over HTTP. Components inject this single seam
|
|
/// so they do not branch on render mode.
|
|
/// </summary>
|
|
public interface ITrackDataService
|
|
{
|
|
Task<ApiResult<PagedResult<TrackDto>>> GetPage(
|
|
int pageNumber,
|
|
int pageSize,
|
|
string? sortColumn = null,
|
|
bool sortDescending = false,
|
|
string? searchText = null,
|
|
string? album = null,
|
|
string? genre = null);
|
|
|
|
/// <summary>All releases with track counts, title-ascending.</summary>
|
|
Task<ApiResult<List<ReleaseDto>>> GetAlbums();
|
|
|
|
/// <summary>Distinct non-null genres with track counts.</summary>
|
|
Task<ApiResult<List<GenreSummaryDto>>> GetGenres();
|
|
|
|
Task<ApiResult<TrackDto>> GetTrack(string trackId);
|
|
|
|
/// <summary>
|
|
/// Fetches a random track from the public library for instant play. Success with a value on a
|
|
/// hit; success with a null value when the library is empty (a valid state, not a failure);
|
|
/// failure on any other transport error.
|
|
/// </summary>
|
|
Task<ApiResult<TrackDto?>> GetRandomTrack();
|
|
}
|