16 lines
802 B
C#
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() } };
|
|
} |