Files
YandexMusic/YandexMusic.API/Requests/Label/YGetLabelAlbumsBuilder.cs
FrigaT add7f08215
All checks were successful
Release / pack-and-publish (release) Successful in 32s
Добавлен вывод AuthStorage. Спрятаны внутренние api запросы
2026-04-19 17:41:30 +03:00

17 lines
810 B
C#

using System.Collections.Specialized;
using System.Net;
using YandexMusic.API.Models.Common;
using YandexMusic.API.Models.Label;
namespace YandexMusic.API.Requests.Label;
internal class YGetLabelAlbumsBuilder : YMusicRequestBuilder<YLabelAlbums?, (YLabel label, int pageNumber)>
{
public YGetLabelAlbumsBuilder(YandexMusicApi api) : base(api) { }
protected override string Method => WebRequestMethods.Http.Get;
protected override string PathTemplate => "labels/{labelId}/albums";
protected override Dictionary<string, string> GetSubstitutions((YLabel label, int pageNumber) tuple)
=> new() { { "labelId", tuple.label.Id } };
protected override NameValueCollection GetQueryParams((YLabel label, int pageNumber) tuple)
=> new() { { "page", tuple.pageNumber.ToString() } };
}