Files
YandexMusic/YandexMusic.API/Requests/Label/YGetLabelAlbumsBuilder.cs
FrigaT 36e28ce3fe
All checks were successful
Release / pack-and-publish (release) Successful in 36s
Полностью переписанное api
2026-04-19 17:00:05 +03:00

17 lines
808 B
C#

using System.Collections.Specialized;
using System.Net;
using YandexMusic.API.Models.Common;
using YandexMusic.API.Models.Label;
namespace YandexMusic.API.Requests.Label;
public 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() } };
}