20 lines
636 B
C#
20 lines
636 B
C#
using System.Net;
|
|
using System.Net.Http.Json;
|
|
using YandexMusic.API.Models.Passport;
|
|
|
|
namespace YandexMusic.API.Requests.Passport;
|
|
|
|
internal class YGetSessionBuilder : YPassportRequestBuilder<YPassportSession?, object>
|
|
{
|
|
public YGetSessionBuilder(YandexMusicApi api) : base(api) { }
|
|
|
|
protected override string Method => WebRequestMethods.Http.Post;
|
|
protected override string PathTemplate => "pwl-yandex/api/passport/sessions/get_session";
|
|
|
|
protected override HttpContent? GetContent(object _)
|
|
{
|
|
var data = new { track_id = Api.Storage.AuthToken.TrackId };
|
|
return JsonContent.Create(data);
|
|
}
|
|
|
|
} |