19 lines
814 B
C#
19 lines
814 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.AuthToken.CsfrToken);
|
|
headers.Add("Process-Uuid", Api.Storage.AuthToken.ProcessUuid);
|
|
}
|
|
} |