23 lines
663 B
C#
23 lines
663 B
C#
using System.Net;
|
|
using System.Net.Http.Json;
|
|
using YandexMusic.API.Models.Passport;
|
|
|
|
namespace YandexMusic.API.Requests.Passport;
|
|
|
|
internal class YRfcOtpBuilder : YPassportRequestBuilder<YPassportUser?, string>
|
|
{
|
|
public YRfcOtpBuilder(YandexMusicApi api) : base(api) { }
|
|
|
|
protected override string Method => WebRequestMethods.Http.Post;
|
|
protected override string PathTemplate => "pwl-yandex/api/passport/auth/rfc-otp";
|
|
|
|
protected override HttpContent? GetContent(string otp)
|
|
{
|
|
var data = new
|
|
{
|
|
track_id = Api.Storage.AuthToken.TrackId,
|
|
otp
|
|
};
|
|
return JsonContent.Create(data);
|
|
}
|
|
} |