27 lines
865 B
C#
27 lines
865 B
C#
using System.Net;
|
|
using System.Net.Http.Json;
|
|
using YandexMusic.API.Models.Passport;
|
|
|
|
namespace YandexMusic.API.Requests.Passport;
|
|
|
|
internal class YCheckPhoneAvailabilityBuilder : YPassportRequestBuilder<YCheckAvailabilityResult?, string>
|
|
{
|
|
public YCheckPhoneAvailabilityBuilder(YandexMusicApi api) : base(api) { }
|
|
|
|
protected override string Method => WebRequestMethods.Http.Post;
|
|
protected override string PathTemplate => "pwl-yandex/api/passport/suggest/check_availability";
|
|
|
|
protected override HttpContent? GetContent(string phone)
|
|
{
|
|
var data = new
|
|
{
|
|
track_id = Api.Storage.AuthToken.TrackId,
|
|
phone_number = phone,
|
|
can_use_anmon = true,
|
|
check_for_push = true,
|
|
push_suggest_log_all_subscriptions = false
|
|
};
|
|
|
|
return JsonContent.Create(data);
|
|
}
|
|
} |