2026-03-03 22:29:41 -06:00
|
|
|
using LANCommander.SDK.Models.Manifest;
|
|
|
|
|
|
|
|
|
|
namespace LANCommander.Server.Services.Providers.Metadata;
|
|
|
|
|
|
|
|
|
|
public interface IMetadataProvider
|
|
|
|
|
{
|
|
|
|
|
public string ProviderName { get; }
|
2026-06-01 02:15:53 -05:00
|
|
|
bool IsAvailable => true;
|
2026-03-03 22:29:41 -06:00
|
|
|
public Task<MetadataSearchResultsCollection<Game>?> SearchGamesAsync(string input, int limit = 10, int offset = 0);
|
|
|
|
|
public Task<Game?> GetGameAsync(string gameId);
|
2026-05-07 01:11:41 -05:00
|
|
|
|
|
|
|
|
Task<IEnumerable<(string Slug, string Name)>?> GetSubProvidersAsync() => Task.FromResult<IEnumerable<(string Slug, string Name)>?>(null);
|
|
|
|
|
|
|
|
|
|
Task<MetadataSearchResultsCollection<Game>?> SearchGamesAsync(string input, string? subProvider, int limit = 10, int offset = 0)
|
|
|
|
|
=> SearchGamesAsync(input, limit, offset);
|
2026-03-03 22:29:41 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public record MetadataSearchResult<T>(string Id, T Data);
|
|
|
|
|
public record MetadataSearchResultsCollection<T>(ICollection<MetadataSearchResult<T>> Results, bool More, int Limit = 10, int Offset = 0);
|