Полный рефакторинг api. Вынесено отдельно api passport
This commit is contained in:
23
YandexMusic.API/Requests/Passport/YSuggestByPhoneBuilder.cs
Normal file
23
YandexMusic.API/Requests/Passport/YSuggestByPhoneBuilder.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Net;
|
||||
using System.Net.Http.Json;
|
||||
using YandexMusic.API.Models.Passport;
|
||||
|
||||
namespace YandexMusic.API.Requests.Passport;
|
||||
|
||||
internal class YSuggestByPhoneBuilder : YPassportRequestBuilder<YSuggestByPhoneResult?, object>
|
||||
{
|
||||
public YSuggestByPhoneBuilder(YandexMusicApi api) : base(api) { }
|
||||
|
||||
protected override string Method => WebRequestMethods.Http.Post;
|
||||
protected override string PathTemplate => "pwl-yandex/api/passport/suggest/by_phone";
|
||||
|
||||
protected override HttpContent? GetContent(object _)
|
||||
{
|
||||
var data = new
|
||||
{
|
||||
track_id = Api.Storage.AuthToken.TrackId,
|
||||
can_use_anmon = true
|
||||
};
|
||||
return JsonContent.Create(data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user