Spotify.NET/SpotifyAPI.Web/Clients/Interfaces/ISpotifyClient.cs
2020-05-20 20:59:11 +02:00

60 lines
2.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace SpotifyAPI.Web
{
public interface ISpotifyClient
{
IPaginator DefaultPaginator { get; }
IUserProfileClient UserProfile { get; }
IBrowseClient Browse { get; }
IShowsClient Shows { get; }
IPlaylistsClient Playlists { get; }
ISearchClient Search { get; }
IFollowClient Follow { get; }
ITracksClient Tracks { get; }
IPlayerClient Player { get; }
IAlbumsClient Albums { get; }
IArtistsClient Artists { get; }
IPersonalizationClient Personalization { get; }
IEpisodesClient Episodes { get; }
ILibraryClient Library { get; }
Task<List<T>> PaginateAll<T>(Paging<T> firstPage);
Task<List<T>> PaginateAll<T>(Paging<T> firstPage, IPaginator paginator);
Task<List<T>> PaginateAll<T>(Func<Task<Paging<T>>> getFirstPage);
Task<List<T>> PaginateAll<T>(Func<Task<Paging<T>>> getFirstPage, IPaginator paginator);
Task<List<T>> PaginateAll<T, TNext>(Paging<T, TNext> firstPage, Func<TNext, Paging<T, TNext>> mapper);
Task<List<T>> PaginateAll<T, TNext>(Paging<T, TNext> firstPage, Func<TNext, Paging<T, TNext>> mapper, IPaginator paginator);
Task<List<T>> PaginateAll<T, TNext>(Func<Task<Paging<T, TNext>>> getFirstPage, Func<TNext, Paging<T, TNext>> mapper);
Task<List<T>> PaginateAll<T, TNext>(Func<Task<Paging<T, TNext>>> getFirstPage, Func<TNext, Paging<T, TNext>> mapper, IPaginator paginator);
#if NETSTANDARD2_1
IAsyncEnumerable<T> Paginate<T>(Paging<T> firstPage);
IAsyncEnumerable<T> Paginate<T>(Paging<T> firstPage, IPaginator paginator);
IAsyncEnumerable<T> Paginate<T>(Func<Task<Paging<T>>> getFirstPage);
IAsyncEnumerable<T> Paginate<T>(Func<Task<Paging<T>>> getFirstPage, IPaginator paginator);
IAsyncEnumerable<T> Paginate<T, TNext>(Paging<T, TNext> firstPage, Func<TNext, Paging<T, TNext>> mapper);
IAsyncEnumerable<T> Paginate<T, TNext>(Paging<T, TNext> firstPage, Func<TNext, Paging<T, TNext>> mapper, IPaginator paginator);
IAsyncEnumerable<T> Paginate<T, TNext>(Func<Task<Paging<T, TNext>>> getFirstPage, Func<TNext, Paging<T, TNext>> mapper);
IAsyncEnumerable<T> Paginate<T, TNext>(Func<Task<Paging<T, TNext>>> getFirstPage, Func<TNext, Paging<T, TNext>> mapper, IPaginator paginator);
#endif
}
}