Files
YandexMusic/YandexMusic.API/Requests/Account/YGetShortAccountInifoBuilder.cs
FrigaT 36e28ce3fe
All checks were successful
Release / pack-and-publish (release) Successful in 36s
Полностью переписанное api
2026-04-19 17:00:05 +03:00

19 lines
795 B
C#

using System.Collections.Specialized;
using System.Net;
using System.Net.Http.Headers;
using YandexMusic.API.Models.Account;
namespace YandexMusic.API.Requests.Account;
public class YGetShortAccountInfoBuilder : YAuthRequestBuilder<YShortAccountInfo?, object>
{
public YGetShortAccountInfoBuilder(YandexMusicApi api) : base(api) { }
protected override string Method => WebRequestMethods.Http.Get;
protected override string PathTemplate => "1/bundle/account/short_info/";
protected override NameValueCollection GetQueryParams(object _)
=> new() { { "avatar_size", "islands-300" } };
protected override void SetCustomHeaders(HttpRequestHeaders headers)
{
headers.Add("Ya-Consumer-Authorization", $"OAuth {Api.Storage.AccessToken.AccessToken}");
}
}