Полный рефакторинг 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,24 @@
using System.Net;
using System.Net.Http.Json;
using YandexMusic.API.Models.Account;
namespace YandexMusic.API.Requests.Passport;
internal class YCheckPushCodeBuilder : YPassportRequestBuilder<YAuthEmpty?, string>
{
public YCheckPushCodeBuilder(YandexMusicApi api) : base(api) { }
protected override string Method => WebRequestMethods.Http.Post;
protected override string PathTemplate => "pwl-yandex/api/passport/auth/check-push-code";
protected override HttpContent? GetContent(string code)
{
var data = new
{
track_id = Api.Storage.AuthToken.TrackId,
code
};
return JsonContent.Create(data);
}
}