using System.Collections.Specialized; using System.Net; using YandexMusic.API.Models.Radio; namespace YandexMusic.API.Requests.Radio; internal class YGetStationTracksBuilder : YMusicRequestBuilder { public YGetStationTracksBuilder(YandexMusicApi api) : base(api) { } protected override string Method => WebRequestMethods.Http.Get; protected override string PathTemplate => "rotor/station/{type}:{tag}/tracks"; protected override Dictionary GetSubstitutions((YStationDescription station, string prevTrackId) tuple) => new() { { "type", tuple.station.Id.Type }, { "tag", tuple.station.Id.Tag } }; protected override NameValueCollection GetQueryParams((YStationDescription station, string prevTrackId) tuple) { var query = new NameValueCollection { { "settings2", "true" } }; if (!string.IsNullOrEmpty(tuple.prevTrackId)) query.Add("queue", tuple.prevTrackId); return query; } }