Files
YandexMusic/YandexMusic.API/Requests/Account/YGetAuthLoginQRBuilder.cs
FrigaT 36e28ce3fe
All checks were successful
Release / pack-and-publish (release) Successful in 36s
Полностью переписанное api
2026-04-19 17:00:05 +03:00

23 lines
698 B
C#

using System.Net;
using YandexMusic.API.Models.Account;
namespace YandexMusic.API.Requests.Account;
internal class YGetAuthLoginQRBuilder : YAuthRequestBuilder<YAuthQRStatus, string>
{
public YGetAuthLoginQRBuilder(YandexMusicApi yandex) : base(yandex)
{
}
protected override string Method => WebRequestMethods.Http.Post;
protected override string PathTemplate => "auth/new/magic/status/";
protected override HttpContent GetContent(string tuple)
{
return new FormUrlEncodedContent(new Dictionary<string, string> {
{ "csrf_token", Api.Storage.AuthToken.CsfrToken },
{ "track_id", Api.Storage.AuthToken.TrackId }
});
}
}