Полный рефакторинг 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,35 @@
using System.Net;
using System.Net.Http.Json;
using YandexMusic.API.Models.Passport;
namespace YandexMusic.API.Requests.Passport;
internal class YMultistepStartBuilder : YPassportRequestBuilder<YMultistepStart?, string>
{
public YMultistepStartBuilder(YandexMusicApi api) : base(api) { }
protected override string Method => WebRequestMethods.Http.Post;
protected override string PathTemplate => "pwl-yandex/api/passport/auth/multistep_start";
protected override HttpContent? GetContent(string login)
{
var data = new
{
login,
track_id = Api.Storage.AuthToken.TrackId,
display_language = "ru",
retpath = string.Empty,
can_send_push_code = true,
check_for_xtokens_for_pictures = false,
force_check_for_protocols = true,
app_id = "ru.yandex.music",
am_version_name = "7.50.2(750024597)",
app_platform = "android",
app_version_name = "2026.02.3 #135rur",
device_id = Api.Storage.DeviceId,
device_connection_type = "9"
};
return JsonContent.Create(data);
}
}