using System.Collections.Specialized; using System.Net; using YandexMusic.API.Models.Landing; namespace YandexMusic.API.Requests.Landing; public class YGetLandingBuilder : YMusicRequestBuilder { public YGetLandingBuilder(YandexMusicApi api) : base(api) { } protected override string Method => WebRequestMethods.Http.Get; protected override string PathTemplate => "landing3"; protected override NameValueCollection GetQueryParams(YLandingBlockType[] blocks) { string blocksStr = string.Join(",", blocks.Select(b => SerializeJson(b).Replace("\"", ""))); return new NameValueCollection { { "blocks", blocksStr } }; } }