Files
YandexMusic/YandexMusic.API/Requests/Track/YTrackDownloadInfoBuilder.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

16 lines
802 B
C#

using System.Collections.Specialized;
using System.Net;
using YandexMusic.API.Models.Common;
namespace YandexMusic.API.Requests.Track;
internal class YTrackDownloadInfoBuilder : YMusicRequestBuilder<List<YTrackDownloadInfo>?, (string trackKey, bool direct)>
{
public YTrackDownloadInfoBuilder(YandexMusicApi api) : base(api) { }
protected override string Method => WebRequestMethods.Http.Get;
protected override string PathTemplate => "tracks/{trackKey}/download-info";
protected override Dictionary<string, string> GetSubstitutions((string trackKey, bool direct) tuple)
=> new() { { "trackKey", tuple.trackKey } };
protected override NameValueCollection GetQueryParams((string trackKey, bool direct) tuple)
=> new() { { "direct", tuple.direct.ToString() } };
}