Полный рефакторинг api. Вынесено отдельно api passport
This commit is contained in:
17
YandexMusic.API/Requests/Passport/YGetQrStatus.cs
Normal file
17
YandexMusic.API/Requests/Passport/YGetQrStatus.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Net;
|
||||
using YandexMusic.API.Models.Passport;
|
||||
|
||||
namespace YandexMusic.API.Requests.Passport;
|
||||
|
||||
internal class YGetQrStatus : YPassportRequestBuilder<YAuthQRStatus?, object>
|
||||
{
|
||||
public YGetQrStatus(YandexMusicApi api) : base(api) { }
|
||||
protected override string Method => WebRequestMethods.Http.Post;
|
||||
protected override string PathTemplate => "pwl-yandex/api/passport/auth/magic/code/status";
|
||||
protected override HttpContent? GetContent(object _)
|
||||
=> new FormUrlEncodedContent(new Dictionary<string, string>
|
||||
{
|
||||
["csrf_token"] = Api.Storage.AuthToken.CsfrToken,
|
||||
["track_id"] = Api.Storage.AuthToken.TrackId,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user