Полный рефакторинг api. Вынесено отдельно api passport
This commit is contained in:
35
YandexMusic.API/Requests/Passport/YMultistepStartBuilder.cs
Normal file
35
YandexMusic.API/Requests/Passport/YMultistepStartBuilder.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user