26 lines
826 B
C#
26 lines
826 B
C#
using System.Net;
|
|
using System.Net.Http.Json;
|
|
using YandexMusic.API.Models.Passport;
|
|
|
|
namespace YandexMusic.API.Requests.Passport;
|
|
|
|
internal class YSendPushBuilder : YPassportRequestBuilder<YSendPushResult?, string>
|
|
{
|
|
public YSendPushBuilder(YandexMusicApi api) : base(api) { }
|
|
|
|
protected override string Method => WebRequestMethods.Http.Post;
|
|
protected override string PathTemplate => "pwl-yandex/api/passport/auth/suggest-send-push";
|
|
|
|
protected override HttpContent? GetContent(string phone)
|
|
{
|
|
var data = new
|
|
{
|
|
track_id = Api.Storage.AuthToken.TrackId,
|
|
phone_number = phone,
|
|
can_use_anmon = true,
|
|
force_show_code_in_notification = "1",
|
|
country = Api.Storage.Country
|
|
};
|
|
return JsonContent.Create(data);
|
|
}
|
|
} |