25 lines
776 B
C#
25 lines
776 B
C#
using System.Net;
|
|
using System.Net.Http.Json;
|
|
using YandexMusic.API.Models.Passport;
|
|
|
|
namespace YandexMusic.API.Requests.Passport;
|
|
|
|
internal class YValidateSquatterBuilder : YPassportRequestBuilder<YValidateSquatter?, string>
|
|
{
|
|
public YValidateSquatterBuilder(YandexMusicApi api) : base(api) { }
|
|
|
|
protected override string Method => WebRequestMethods.Http.Post;
|
|
protected override string PathTemplate => "pwl-yandex/api/passport/validate/squatter";
|
|
|
|
protected override HttpContent? GetContent(string phone)
|
|
{
|
|
var data = new
|
|
{
|
|
track_id = Api.Storage.AuthToken.TrackId,
|
|
phone_number = phone,
|
|
scenario = "auth",
|
|
can_use_anmon = true
|
|
};
|
|
return JsonContent.Create(data);
|
|
}
|
|
} |