Полный рефакторинг api. Вынесено отдельно api passport

This commit is contained in:
2026-04-20 23:30:01 +03:00
parent 34261d02a9
commit eb1eba0162
61 changed files with 1074 additions and 640 deletions

View File

@@ -0,0 +1,27 @@
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);
}
}