using YandexMusic.API.Models.Queue;
using YandexMusic.API.Requests.Queue;
namespace YandexMusic.API;
/// API для работы с очередями воспроизведения.
public class YQueueAPI : YCommonAPI
{
public YQueueAPI(YandexMusicApi api) : base(api) { }
public Task ListAsync(string? device = null)
=> new YQueuesListBuilder(Api, device).ExecuteAsync(null!);
public Task GetAsync(string queueId)
=> new YGetQueueBuilder(Api).ExecuteAsync(queueId);
public Task CreateAsync(YQueue queue, string? device = null)
=> new YQueueCreateBuilder(Api, device).ExecuteAsync(queue);
public Task UpdatePositionAsync(string queueId, int currentIndex, bool isInteractive, string? device = null)
=> new YQueueUpdatePositionBuilder(Api, device).ExecuteAsync((queueId, currentIndex, isInteractive));
}