Обнновлено до .net10
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAccessToken
|
||||
{
|
||||
public class YAccessToken
|
||||
{
|
||||
[JsonProperty("status")]
|
||||
public string Status { get; set; }
|
||||
[JsonProperty("access_token")]
|
||||
public string AccessToken { get; set; }
|
||||
[JsonProperty("expires_in")]
|
||||
public string Expires { get; set; }
|
||||
[JsonProperty("token_type")]
|
||||
public string TokenType { get; set; }
|
||||
public string Uid { get; set; }
|
||||
}
|
||||
[JsonPropertyName("status")]
|
||||
public string Status { get; set; }
|
||||
|
||||
[JsonPropertyName("access_token")]
|
||||
public string AccessToken { get; set; }
|
||||
|
||||
[JsonPropertyName("expires_in")]
|
||||
public string Expires { get; set; }
|
||||
|
||||
[JsonPropertyName("token_type")]
|
||||
public string TokenType { get; set; }
|
||||
|
||||
public string Uid { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,25 +1,40 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using YandexMusic.API.Models.Common;
|
||||
|
||||
namespace YandexMusic.API.Models.Account
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAccount
|
||||
{
|
||||
public class YAccount
|
||||
{
|
||||
public bool Child { get; set; }
|
||||
public string Birthday { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public bool HostedUser { get; set; }
|
||||
public string Login { get; set; }
|
||||
public bool NonOwnerFamilyMember { get; set; }
|
||||
public DateTime Now { get; set; }
|
||||
[JsonProperty("passport-phones")]
|
||||
public List<YPhone> PassportPhones { get; set; }
|
||||
public int Region { get; set; }
|
||||
public string RegionCode { get; set; }
|
||||
public DateTime RegisteredAt { get; set; }
|
||||
public string SecondName { get; set; }
|
||||
public bool ServiceAvailable { get; set; }
|
||||
public string Uid { get; set; }
|
||||
}
|
||||
public bool Child { get; set; }
|
||||
|
||||
public string Birthday { get; set; }
|
||||
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
public string FirstName { get; set; }
|
||||
|
||||
public string FullName { get; set; }
|
||||
|
||||
public bool HostedUser { get; set; }
|
||||
|
||||
public string Login { get; set; }
|
||||
|
||||
public bool NonOwnerFamilyMember { get; set; }
|
||||
|
||||
public DateTime Now { get; set; }
|
||||
|
||||
[JsonPropertyName("passport-phones")]
|
||||
public List<YPhone> PassportPhones { get; set; }
|
||||
|
||||
public int Region { get; set; }
|
||||
|
||||
public string RegionCode { get; set; }
|
||||
|
||||
public DateTime RegisteredAt { get; set; }
|
||||
|
||||
public string SecondName { get; set; }
|
||||
|
||||
public bool ServiceAvailable { get; set; }
|
||||
|
||||
public string Uid { get; set; }
|
||||
}
|
||||
@@ -1,26 +1,37 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using YandexMusic.API.Models.Common;
|
||||
|
||||
namespace YandexMusic.API.Models.Account
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAccountResult
|
||||
{
|
||||
public class YAccountResult
|
||||
public YAccount Account { get; set; }
|
||||
|
||||
public string DefaultEmail { get; set; }
|
||||
|
||||
public List<string> HasOptions { get; set; }
|
||||
|
||||
public YMasterHub MasterHub { get; set; }
|
||||
|
||||
public YPermissions Permissions { get; set; }
|
||||
|
||||
public YPlus Plus { get; set; }
|
||||
|
||||
public bool PretrialActive { get; set; }
|
||||
|
||||
public bool SubEditor { get; set; }
|
||||
|
||||
public int SubEditorLevel { get; set; }
|
||||
|
||||
public YSubscription Subscription { get; set; }
|
||||
|
||||
public YBar BarBelow { get; set; }
|
||||
|
||||
[JsonPropertyName("bar-below")]
|
||||
private YBar BarBelow2
|
||||
{
|
||||
public YAccount Account { get; set; }
|
||||
public string DefaultEmail { get; set; }
|
||||
public List<string> HasOptions { get; set; }
|
||||
public YMasterHub MasterHub { get; set; }
|
||||
public YPermissions Permissions { get; set; }
|
||||
public YPlus Plus { get; set; }
|
||||
public bool PretrialActive { get; set; }
|
||||
public bool SubEditor { get; set; }
|
||||
public int SubEditorLevel { get; set; }
|
||||
public YSubscription Subscription { get; set; }
|
||||
public YBar BarBelow { get; set; }
|
||||
// Повторяющееся свойство с другим названием
|
||||
[JsonProperty("bar-below")]
|
||||
private YBar BarBelow2
|
||||
{
|
||||
set => BarBelow = value;
|
||||
}
|
||||
public string Userhash { get; set; }
|
||||
set => BarBelow = value;
|
||||
}
|
||||
|
||||
public string Userhash { get; set; }
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAuthBase
|
||||
{
|
||||
public class YAuthBase
|
||||
{
|
||||
public YAuthStatus Status { get; set; }
|
||||
public YAuthStatus Status { get; set; }
|
||||
|
||||
[JsonProperty("redirect_url")]
|
||||
public string RedirectUrl { get; set; }
|
||||
[JsonPropertyName("redirect_url")]
|
||||
public string RedirectUrl { get; set; }
|
||||
|
||||
public List<YAuthError> Errors { get; set; }
|
||||
}
|
||||
public List<YAuthError> Errors { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,28 +1,29 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAuthCaptcha : YAuthBase
|
||||
{
|
||||
public class YAuthCaptcha : YAuthBase
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Label { get; set; }
|
||||
public string Label { get; set; }
|
||||
|
||||
public string Mode { get; set; }
|
||||
public string Mode { get; set; }
|
||||
|
||||
public List<YAuthCaptchaError> Error { get; set; }
|
||||
public List<YAuthCaptchaError> Error { get; set; }
|
||||
|
||||
public bool CountryFromAudioWhiteList { get; set; }
|
||||
public bool CountryFromAudioWhiteList { get; set; }
|
||||
|
||||
public YAuthCaptchaOptions Options { get; set; }
|
||||
public YAuthCaptchaOptions Options { get; set; }
|
||||
|
||||
public YAuthCaptchaVoice Voice { get; set; }
|
||||
public YAuthCaptchaVoice Voice { get; set; }
|
||||
|
||||
[JsonProperty("image_url")]
|
||||
public string ImageUrl { get; set; }
|
||||
[JsonPropertyName("image_url")]
|
||||
public string ImageUrl { get; set; }
|
||||
|
||||
public string Key { get; set; }
|
||||
public string Key { get; set; }
|
||||
|
||||
public string Static { get; set; }
|
||||
}
|
||||
public string Static { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAuthCaptchaError
|
||||
{
|
||||
public class YAuthCaptchaError
|
||||
{
|
||||
public string Message { get; set; }
|
||||
public YAuthCaptchaErrorCode Code { get; set; }
|
||||
}
|
||||
public string Message { get; set; }
|
||||
public YAuthCaptchaErrorCode Code { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public enum YAuthCaptchaErrorCode
|
||||
{
|
||||
public enum YAuthCaptchaErrorCode
|
||||
{
|
||||
MissingValue,
|
||||
CaptchaLocate,
|
||||
Incorrect
|
||||
}
|
||||
MissingValue,
|
||||
CaptchaLocate,
|
||||
Incorrect
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAuthCaptchaOptions
|
||||
{
|
||||
public class YAuthCaptchaOptions
|
||||
{
|
||||
public bool AsyncCheck { get; set; }
|
||||
}
|
||||
public bool AsyncCheck { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthCaptchaVoice
|
||||
{
|
||||
public string Url { get; set; }
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
[JsonProperty("intro_url")]
|
||||
public string IntroUrl { get; set; }
|
||||
}
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAuthCaptchaVoice
|
||||
{
|
||||
public string Url { get; set; }
|
||||
|
||||
[JsonPropertyName("intro_url")]
|
||||
public string IntroUrl { get; set; }
|
||||
}
|
||||
@@ -1,22 +1,27 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public enum YAuthError
|
||||
{
|
||||
public enum YAuthError
|
||||
{
|
||||
[EnumMember(Value = "authorization.invalid")]
|
||||
AuthorizationInvalid,
|
||||
[EnumMember(Value = "sessionid.invalid")]
|
||||
SessionIdInvalid,
|
||||
[EnumMember(Value = "password.not_matched")]
|
||||
PasswordNotMatched,
|
||||
[EnumMember(Value = "password.empty")]
|
||||
PasswordEmpty,
|
||||
[EnumMember(Value = "captcha.required")]
|
||||
CaptchaRequired,
|
||||
[EnumMember(Value = "captcha.not_matched")]
|
||||
CaptchaNotMatched,
|
||||
[EnumMember(Value = "oauth_token.invalid")]
|
||||
OAuthTokenInvalid
|
||||
}
|
||||
[EnumMember(Value = "authorization.invalid")]
|
||||
AuthorizationInvalid,
|
||||
|
||||
[EnumMember(Value = "sessionid.invalid")]
|
||||
SessionIdInvalid,
|
||||
|
||||
[EnumMember(Value = "password.not_matched")]
|
||||
PasswordNotMatched,
|
||||
|
||||
[EnumMember(Value = "password.empty")]
|
||||
PasswordEmpty,
|
||||
|
||||
[EnumMember(Value = "captcha.required")]
|
||||
CaptchaRequired,
|
||||
|
||||
[EnumMember(Value = "captcha.not_matched")]
|
||||
CaptchaNotMatched,
|
||||
|
||||
[EnumMember(Value = "oauth_token.invalid")]
|
||||
OAuthTokenInvalid,
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthLetter : YAuthBase
|
||||
{
|
||||
public List<string> Code { get; set; }
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public string Id { get; set; }
|
||||
}
|
||||
public class YAuthLetter : YAuthBase
|
||||
{
|
||||
public List<string> Code { get; set; }
|
||||
|
||||
public string Id { get; set; }
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthLetterStatus : YAuthBase
|
||||
{
|
||||
[JsonProperty("magic_link_confirmed")]
|
||||
public bool MagicLinkConfirmed { get; set; }
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
[JsonProperty("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
}
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAuthLetterStatus : YAuthBase
|
||||
{
|
||||
[JsonPropertyName("magic_link_confirmed")]
|
||||
public bool MagicLinkConfirmed { get; set; }
|
||||
|
||||
[JsonPropertyName("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
}
|
||||
@@ -1,22 +1,29 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public enum YAuthMethod
|
||||
{
|
||||
public enum YAuthMethod
|
||||
{
|
||||
Password,
|
||||
[EnumMember(Value = "magic_x_token")]
|
||||
MagicToken,
|
||||
[EnumMember(Value = "magic_x_token_with_pictures")]
|
||||
MagicTokenWithPictures,
|
||||
[EnumMember(Value = "magic_link")]
|
||||
MagicLink,
|
||||
Magic,
|
||||
Otp,
|
||||
[EnumMember(Value = "social_gg")]
|
||||
Social,
|
||||
WebAuthN,
|
||||
[EnumMember(Value = "sms_code")]
|
||||
SmsCode
|
||||
}
|
||||
Password,
|
||||
|
||||
[EnumMember(Value = "magic_x_token")]
|
||||
MagicToken,
|
||||
|
||||
[EnumMember(Value = "magic_x_token_with_pictures")]
|
||||
MagicTokenWithPictures,
|
||||
|
||||
[EnumMember(Value = "magic_link")]
|
||||
MagicLink,
|
||||
|
||||
Magic,
|
||||
|
||||
Otp,
|
||||
|
||||
[EnumMember(Value = "social_gg")]
|
||||
Social,
|
||||
|
||||
WebAuthN,
|
||||
|
||||
[EnumMember(Value = "sms_code")]
|
||||
SmsCode,
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthQR : YAuthBase
|
||||
{
|
||||
[JsonProperty("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
[JsonProperty("csrf_token")]
|
||||
public string CsrfToken { get; set; }
|
||||
}
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAuthQR : YAuthBase
|
||||
{
|
||||
[JsonPropertyName("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
|
||||
[JsonPropertyName("csrf_token")]
|
||||
public string CsrfToken { get; set; }
|
||||
}
|
||||
@@ -1,19 +1,20 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAuthQRStatus : YAuthBase
|
||||
{
|
||||
public class YAuthQRStatus : YAuthBase
|
||||
{
|
||||
[JsonProperty("default_uid")]
|
||||
public int DefaultUid { get; set; }
|
||||
[JsonPropertyName("default_uid")]
|
||||
public int DefaultUid { get; set; }
|
||||
|
||||
public string RetPath { get; set; }
|
||||
public string RetPath { get; set; }
|
||||
|
||||
[JsonProperty("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
[JsonPropertyName("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
|
||||
public string Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
public string State { get; set; }
|
||||
public string State { get; set; }
|
||||
|
||||
public YAuthCaptcha Captcha { get; set; }
|
||||
}
|
||||
public YAuthCaptcha Captcha { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public enum YAuthStatus
|
||||
{
|
||||
public enum YAuthStatus
|
||||
{
|
||||
Ok,
|
||||
Error
|
||||
}
|
||||
Ok,
|
||||
Error
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthToken
|
||||
{
|
||||
[JsonProperty("csfr_token")]
|
||||
public string CsfrToken { get; set; }
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
[JsonProperty("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
}
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAuthToken
|
||||
{
|
||||
[JsonPropertyName("csfr_token")]
|
||||
public string CsfrToken { get; set; }
|
||||
|
||||
[JsonPropertyName("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
}
|
||||
@@ -1,47 +1,48 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YAuthTypes : YAuthBase
|
||||
{
|
||||
public class YAuthTypes : YAuthBase
|
||||
{
|
||||
[JsonProperty("primary_alias_type")]
|
||||
public string PrimaryAliasType { get; set; }
|
||||
[JsonPropertyName("primary_alias_type")]
|
||||
public string PrimaryAliasType { get; set; }
|
||||
|
||||
[JsonProperty("csrf_token")]
|
||||
public string CsrfToken { get; set; }
|
||||
[JsonPropertyName("csrf_token")]
|
||||
public string CsrfToken { get; set; }
|
||||
|
||||
public string LocCsrf { get; set; }
|
||||
public string LocCsrf { get; set; }
|
||||
|
||||
[JsonProperty("use_new_suggest_by_phone")]
|
||||
public bool UseNewSuggestByPhone { get; set; }
|
||||
[JsonPropertyName("use_new_suggest_by_phone")]
|
||||
public bool UseNewSuggestByPhone { get; set; }
|
||||
|
||||
[JsonProperty("is_rfc_2fa_enabled")]
|
||||
public bool IsRfc2faEnabled { get; set; }
|
||||
[JsonPropertyName("is_rfc_2fa_enabled")]
|
||||
public bool IsRfc2faEnabled { get; set; }
|
||||
|
||||
[JsonProperty("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
[JsonPropertyName("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
|
||||
[JsonProperty("can_authorize")]
|
||||
public string CanAuthorize { get; set; }
|
||||
[JsonPropertyName("can_authorize")]
|
||||
public string CanAuthorize { get; set; }
|
||||
|
||||
[JsonProperty("preferred_auth_method")]
|
||||
public YAuthMethod PreferredAuthMethod { get; set; }
|
||||
[JsonPropertyName("preferred_auth_method")]
|
||||
public YAuthMethod PreferredAuthMethod { get; set; }
|
||||
|
||||
[JsonProperty("auth_methods")]
|
||||
public List<YAuthMethod> AuthMethods { get; set; }
|
||||
[JsonPropertyName("auth_methods")]
|
||||
public List<YAuthMethod> AuthMethods { get; set; }
|
||||
|
||||
[JsonProperty("can_register")]
|
||||
public bool CanRegister { get; set; }
|
||||
[JsonPropertyName("can_register")]
|
||||
public bool CanRegister { get; set; }
|
||||
|
||||
[JsonProperty("location_id")]
|
||||
public string LocationId { get; set; }
|
||||
[JsonPropertyName("location_id")]
|
||||
public string LocationId { get; set; }
|
||||
|
||||
public string Country { get; set; }
|
||||
public string Country { get; set; }
|
||||
|
||||
[JsonProperty("phone_number")]
|
||||
public YPhoneNumber PhoneNumberNumber { get; set; }
|
||||
[JsonPropertyName("phone_number")]
|
||||
public YPhoneNumber PhoneNumberNumber { get; set; }
|
||||
|
||||
[JsonProperty("magic_link_email")]
|
||||
public string MagicLinkEmail { get; set; }
|
||||
[JsonPropertyName("magic_link_email")]
|
||||
public string MagicLinkEmail { get; set; }
|
||||
|
||||
public string TractorTargetLocationHost { get; set; }
|
||||
}
|
||||
public string TractorTargetLocationHost { get; set; }
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
using YandexMusic.API.Models.Common;
|
||||
|
||||
namespace YandexMusic.API.Models.Account
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YBar : YStyle
|
||||
{
|
||||
public class YBar : YStyle
|
||||
{
|
||||
public string AlertId { get; set; }
|
||||
public string Text { get; set; }
|
||||
public string AlertType { get; set; }
|
||||
public YButton Button { get; set; }
|
||||
public bool CloseButton { get; set; }
|
||||
public YCloseButtonStyles CloseButtonStyles { get; set; }
|
||||
}
|
||||
public string AlertId { get; set; }
|
||||
public string Text { get; set; }
|
||||
public string AlertType { get; set; }
|
||||
public YButton Button { get; set; }
|
||||
public bool CloseButton { get; set; }
|
||||
public YCloseButtonStyles CloseButtonStyles { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,31 +1,32 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YLoginInfo
|
||||
{
|
||||
public class YLoginInfo
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Login { get; set; }
|
||||
[JsonProperty("client_id")]
|
||||
public string ClientId { get; set; }
|
||||
[JsonProperty("display_name")]
|
||||
public string DisplayName { get; set; }
|
||||
[JsonProperty("real_name")]
|
||||
public string RealName { get; set; }
|
||||
[JsonProperty("first_name")]
|
||||
public string FirstName { get; set; }
|
||||
[JsonProperty("last_name")]
|
||||
public string LastName { get; set; }
|
||||
public string Sex { get; set; }
|
||||
[JsonProperty("default_email")]
|
||||
public string DefaultEmail { get; set; }
|
||||
public List<string> Emails { get; set; }
|
||||
public string Birthday { get; set; }
|
||||
[JsonProperty("default_avatar_id")]
|
||||
public string DefaultAvatarId { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string Login { get; set; }
|
||||
[JsonPropertyName("client_id")]
|
||||
public string ClientId { get; set; }
|
||||
[JsonPropertyName("display_name")]
|
||||
public string DisplayName { get; set; }
|
||||
[JsonPropertyName("real_name")]
|
||||
public string RealName { get; set; }
|
||||
[JsonPropertyName("first_name")]
|
||||
public string FirstName { get; set; }
|
||||
[JsonPropertyName("last_name")]
|
||||
public string LastName { get; set; }
|
||||
public string Sex { get; set; }
|
||||
[JsonPropertyName("default_email")]
|
||||
public string DefaultEmail { get; set; }
|
||||
public List<string> Emails { get; set; }
|
||||
public string Birthday { get; set; }
|
||||
[JsonPropertyName("default_avatar_id")]
|
||||
public string DefaultAvatarId { get; set; }
|
||||
|
||||
public string AvatarUrl => $"https://avatars.mds.yandex.net/get-yapic/{DefaultAvatarId}/islands-200";
|
||||
[JsonProperty("is_avatar_empty")]
|
||||
public bool IsAvatarEmpty { get; set; }
|
||||
public string PsuId { get; set; }
|
||||
public string AvatarUrl => $"https://avatars.mds.yandex.net/get-yapic/{DefaultAvatarId}/islands-200";
|
||||
[JsonPropertyName("is_avatar_empty")]
|
||||
public bool IsAvatarEmpty { get; set; }
|
||||
public string PsuId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,21 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account;
|
||||
|
||||
public class YPhoneNumber
|
||||
{
|
||||
public class YPhoneNumber
|
||||
{
|
||||
[JsonProperty("masked_e164")]
|
||||
public string MaskedE164 { get; set; }
|
||||
[JsonPropertyName("masked_e164")]
|
||||
public string MaskedE164 { get; set; }
|
||||
|
||||
public string E164 { get; set; }
|
||||
public string E164 { get; set; }
|
||||
|
||||
public string International { get; set; }
|
||||
public string International { get; set; }
|
||||
|
||||
[JsonProperty("masked_original")]
|
||||
public string MaskedOriginal { get; set; }
|
||||
[JsonPropertyName("masked_original")]
|
||||
public string MaskedOriginal { get; set; }
|
||||
|
||||
public string Original { get; set; }
|
||||
public string Original { get; set; }
|
||||
|
||||
[JsonProperty("masked_international")]
|
||||
public string MaskedInternational { get; set; }
|
||||
}
|
||||
[JsonPropertyName("masked_international")]
|
||||
public string MaskedInternational { get; set; }
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YShortAccountInfo : YAuthBase
|
||||
{
|
||||
[JsonProperty("public_id")]
|
||||
[JsonPropertyName("public_id")]
|
||||
public string PublicId { get; set; }
|
||||
|
||||
public string Uid { get; set; }
|
||||
@@ -13,69 +15,69 @@
|
||||
|
||||
public string Birthday { get; set; }
|
||||
|
||||
[JsonProperty("has_password")]
|
||||
[JsonPropertyName("has_password")]
|
||||
public bool HasPassword { get; set; }
|
||||
|
||||
public List<string> Partitions { get; set; }
|
||||
|
||||
[JsonProperty("primary_alias_type")]
|
||||
[JsonPropertyName("primary_alias_type")]
|
||||
public int PrimaryAliasType { get; set; }
|
||||
|
||||
[JsonProperty("display_name")]
|
||||
[JsonPropertyName("display_name")]
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
[JsonProperty("normalized_display_login")]
|
||||
[JsonPropertyName("normalized_display_login")]
|
||||
public string NormalizedDisplayLogin { get; set; }
|
||||
|
||||
[JsonProperty("x_token_issued_at")]
|
||||
[JsonPropertyName("x_token_issued_at")]
|
||||
public int XTokenIssuedAt { get; set; }
|
||||
|
||||
[JsonProperty("display_login")]
|
||||
[JsonPropertyName("display_login")]
|
||||
public string DisplayLogin { get; set; }
|
||||
|
||||
[JsonProperty("public_name")]
|
||||
[JsonPropertyName("public_name")]
|
||||
public string PublicName { get; set; }
|
||||
|
||||
[JsonProperty("avatar_url")]
|
||||
[JsonPropertyName("avatar_url")]
|
||||
public string AvatarUrl { get; set; }
|
||||
|
||||
[JsonProperty("native_default_email")]
|
||||
[JsonPropertyName("native_default_email")]
|
||||
public string NativeDefaultEmail { get; set; }
|
||||
|
||||
[JsonProperty("has_plus")]
|
||||
[JsonPropertyName("has_plus")]
|
||||
public bool HasPlus { get; set; }
|
||||
|
||||
[JsonProperty("location_id")]
|
||||
[JsonPropertyName("location_id")]
|
||||
public int LocationId { get; set; }
|
||||
|
||||
[JsonProperty("gender")]
|
||||
[JsonPropertyName("gender")]
|
||||
public string Gender { get; set; }
|
||||
|
||||
[JsonProperty("is_avatar_empty")]
|
||||
[JsonPropertyName("is_avatar_empty")]
|
||||
public bool IsAvatarEmpty { get; set; }
|
||||
|
||||
[JsonProperty("machine_readable_login")]
|
||||
[JsonPropertyName("machine_readable_login")]
|
||||
public string MachineReadableLogin { get; set; }
|
||||
|
||||
[JsonProperty("has_cards")]
|
||||
[JsonPropertyName("has_cards")]
|
||||
public bool HasCards { get; set; }
|
||||
|
||||
[JsonProperty("has_family")]
|
||||
[JsonPropertyName("has_family")]
|
||||
public bool HasFamily { get; set; }
|
||||
|
||||
[JsonProperty("picture_login_forbidden")]
|
||||
[JsonPropertyName("picture_login_forbidden")]
|
||||
public bool PictureLoginForbidden { get; set; }
|
||||
|
||||
[JsonProperty("can_account_join_master")]
|
||||
[JsonPropertyName("can_account_join_master")]
|
||||
public bool CanAccountJoinMaster { get; set; }
|
||||
|
||||
[JsonProperty("secure_phone_number")]
|
||||
[JsonPropertyName("secure_phone_number")]
|
||||
public string SecurePhoneNumber { get; set; }
|
||||
|
||||
[JsonProperty("x_token_client_id")]
|
||||
[JsonPropertyName("x_token_client_id")]
|
||||
public string XTokenClientId { get; set; }
|
||||
|
||||
[JsonProperty("x_token_need_reset")]
|
||||
[JsonPropertyName("x_token_need_reset")]
|
||||
public bool XTokenNeedReset { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user