Files
YandexMusic/YandexMusic.API/Requests/Landing/YGetLandingBuilder.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
694 B
C#

using System.Collections.Specialized;
using System.Net;
using YandexMusic.API.Models.Landing;
namespace YandexMusic.API.Requests.Landing;
internal class YGetLandingBuilder : YMusicRequestBuilder<YLanding?, YLandingBlockType[]>
{
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 } };
}
}