Files
YandexMusic/YandexMusic.API/Requests/Account/YPostAuthStats.cs
FrigaT 0bbaac5689
All checks were successful
Release / pack-and-publish (release) Successful in 1m5s
Переделан способ авторизации по qr
2026-04-20 14:31:47 +03:00

19 lines
818 B
C#

using System.Net;
using System.Net.Http.Headers;
using YandexMusic.API.Models.Account;
namespace YandexMusic.API.Requests.Account;
internal class YPostAuthStats : YAuthRequestBuilder<YAuthEmpty?, object>
{
public YPostAuthStats(YandexMusicApi api) : base(api) { }
protected override string Method => WebRequestMethods.Http.Post;
protected override string PathTemplate => "pwl-yandex/api/passport/stats";
protected override HttpContent? GetContent(object _)
=> new FormUrlEncodedContent(new Dictionary<string, string> { { "messageType", "CLIENT_READY" } });
protected override void SetCustomHeaders(HttpRequestHeaders headers)
{
headers.Add("X-Csrf-Token", Api.Storage.HeaderToken.CsfrToken);
headers.Add("Process-Uuid", Api.Storage.HeaderToken.ProcessUuid);
}
}