using YandexMusic.API.Common;
using YandexMusic.API.Common.Ynison;

namespace YandexMusic.API;
/// <summary>
/// API Ynison
/// </summary>
public partial class YYnisonAPI : YCommonAPI
{
    public YYnisonAPI(YandexMusicApi yandex) : base(yandex)
    {
    }

    public YnisonPlayer GetPlayer(AuthStorage storage)
    {
        if (string.IsNullOrEmpty(storage.Token))
            throw new Exception("Токен пользователя не задан.");

        return new(api, storage);
    }
}
