Files
YandexMusic/YandexMusic.API/API/YPinsAPI.cs
2026-04-10 15:05:32 +03:00

20 lines
976 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using YandexMusic.API.Common;
using YandexMusic.API.Models.Common;
using YandexMusic.API.Models.Pins;
using YandexMusic.API.Requests.Pins;
namespace YandexMusic.API;
/// <summary>API для взаимодействия с закреплёнными объектами (пинами).</summary>
public class YPinsAPI : YCommonAPI
{
/// <summary>Инициализирует новый экземпляр API пинов.</summary>
/// <param name="yandex">Экземпляр основного API.</param>
public YPinsAPI(YandexMusicApi yandex) : base(yandex) { }
/// <summary>Получает список закреплённых объектов.</summary>
/// <param name="storage">Хранилище авторизации.</param>
/// <returns>Ответ API со списком пинов.</returns>
public Task<YResponse<YPins>> GetAsync(AuthStorage storage)
=> new YGetPinsBuilder(api, storage).Build(null!).GetResponseAsync();
}