Обнновлено до .net10
This commit is contained in:
@@ -6,31 +6,30 @@ using YandexMusic.API.Models.Account;
|
||||
using YandexMusic.API.Requests.Common;
|
||||
using YandexMusic.API.Requests.Common.Attributes;
|
||||
|
||||
namespace YandexMusic.API.Requests.Account
|
||||
namespace YandexMusic.API.Requests.Account;
|
||||
|
||||
[YOAuthMobile(WebRequestMethods.Http.Post, "/1/token")]
|
||||
internal class YGetMusicTokenBuilder : YRequestBuilder<YAccessToken, string>
|
||||
{
|
||||
[YOAuthMobile(WebRequestMethods.Http.Post, "/1/token")]
|
||||
internal class YGetMusicTokenBuilder : YRequestBuilder<YAccessToken, string>
|
||||
public YGetMusicTokenBuilder(YandexMusicApi yandex, AuthStorage auth) : base(yandex, auth)
|
||||
{
|
||||
public YGetMusicTokenBuilder(YandexMusicApi yandex, AuthStorage auth) : base(yandex, auth)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
protected override HttpContent GetContent(string tuple)
|
||||
protected override HttpContent GetContent(string tuple)
|
||||
{
|
||||
return new FormUrlEncodedContent(new Dictionary<string, string>
|
||||
{
|
||||
return new FormUrlEncodedContent(new Dictionary<string, string>
|
||||
{
|
||||
{ "client_id", YConstants.ClientId },
|
||||
{ "client_secret", YConstants.ClientSecret },
|
||||
{ "grant_type", "x-token" },
|
||||
{ "access_token", storage.AccessToken.AccessToken }
|
||||
});
|
||||
}
|
||||
{ "client_id", YConstants.ClientId },
|
||||
{ "client_secret", YConstants.ClientSecret },
|
||||
{ "grant_type", "x-token" },
|
||||
{ "access_token", storage.AccessToken.AccessToken }
|
||||
});
|
||||
}
|
||||
|
||||
protected override void SetCustomHeaders(HttpRequestHeaders headers)
|
||||
{
|
||||
headers.Remove("Authorization");
|
||||
protected override void SetCustomHeaders(HttpRequestHeaders headers)
|
||||
{
|
||||
headers.Remove("Authorization");
|
||||
|
||||
base.SetCustomHeaders(headers);
|
||||
}
|
||||
base.SetCustomHeaders(headers);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user