Files
YandexMusic/YandexMusic.API/API/YLabelAPIAsync.cs
2026-04-10 12:12:33 +03:00

40 lines
1.4 KiB
C#

using YandexMusic.API.Common;
using YandexMusic.API.Models.Common;
using YandexMusic.API.Models.Label;
using YandexMusic.API.Requests.Label;
namespace YandexMusic.API
{
public partial class YLabelAPI : YCommonAPI
{
public YLabelAPI(YandexMusicApi yandex) : base(yandex)
{
}
/// <summary>
/// Постраничное получение альбомов лейбла
/// </summary>
/// <param name="storage">Хранилище</param>
/// <param name="label">Лейбл</param>
/// <param name="page">Страница</param>
public Task<YResponse<YLabelAlbums>> GetAlbumsByLabelAsync(AuthStorage storage, YLabel label, int page)
{
return new YGetLabelAlbumsBuilder(api, storage)
.Build((label, page))
.GetResponseAsync();
}
/// <summary>
/// Постраничное получение артистов лейбла
/// </summary>
/// <param name="storage">Хранилище</param>
/// <param name="label">Лейбл</param>
/// <param name="page">Страница</param>
public Task<YResponse<YLabelArtists>> GetArtistsByLabelAsync(AuthStorage storage, YLabel label, int page)
{
return new YGetLabelArtistsBuilder(api, storage)
.Build((label, page))
.GetResponseAsync();
}
}
}