13 lines
611 B
C#
13 lines
611 B
C#
using System.Net;
|
|
using YandexMusic.API.Models.Track;
|
|
|
|
namespace YandexMusic.API.Requests.Track;
|
|
|
|
internal class YGetTracksBuilder : YMusicRequestBuilder<List<YTrack>?, IEnumerable<string>>
|
|
{
|
|
public YGetTracksBuilder(YandexMusicApi api) : base(api) { }
|
|
protected override string Method => WebRequestMethods.Http.Post;
|
|
protected override string PathTemplate => "tracks";
|
|
protected override HttpContent? GetContent(IEnumerable<string> trackIds)
|
|
=> new FormUrlEncodedContent(new Dictionary<string, string> { { "track-ids", string.Join(",", trackIds) }, { "with-positions", "true" } });
|
|
} |