Files
YandexMusic/PlaylistShared/Services/IYandexMusicService.cs
2026-04-11 15:41:24 +03:00

14 lines
760 B
C#

namespace PlaylistShared.Services;
public interface IYandexMusicService
{
Task<string> CreatePlaylistAsync(string userId, string title);
Task AddTrackToPlaylistAsync(string userId, string yandexPlaylistId, string trackId);
Task RemoveTrackFromPlaylistAsync(string userId, string yandexPlaylistId, string trackId);
Task<List<YandexTrackInfo>> GetPlaylistTracksAsync(string userId, string yandexPlaylistId);
Task<YandexPlaylistInfo> GetPlaylistInfoAsync(string userId, string yandexPlaylistId);
Task<string?> RefreshUserTokenAsync(string userId);
}
public record YandexTrackInfo(string Id, string Title, string? Artist, string? AlbumTitle, int DurationMs);
public record YandexPlaylistInfo(string Kind, string Title, int TrackCount);