Добавьте файлы проекта.
This commit is contained in:
15
YandexMusic.API/Models/Account/YAccessToken.cs
Normal file
15
YandexMusic.API/Models/Account/YAccessToken.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
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; }
|
||||
}
|
||||
}
|
||||
25
YandexMusic.API/Models/Account/YAccount.cs
Normal file
25
YandexMusic.API/Models/Account/YAccount.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using YandexMusic.API.Models.Common;
|
||||
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
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; }
|
||||
}
|
||||
}
|
||||
26
YandexMusic.API/Models/Account/YAccountResult.cs
Normal file
26
YandexMusic.API/Models/Account/YAccountResult.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using YandexMusic.API.Models.Common;
|
||||
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
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; }
|
||||
// Повторяющееся свойство с другим названием
|
||||
[JsonProperty("bar-below")]
|
||||
private YBar BarBelow2
|
||||
{
|
||||
set => BarBelow = value;
|
||||
}
|
||||
public string Userhash { get; set; }
|
||||
}
|
||||
}
|
||||
12
YandexMusic.API/Models/Account/YAuthBase.cs
Normal file
12
YandexMusic.API/Models/Account/YAuthBase.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthBase
|
||||
{
|
||||
public YAuthStatus Status { get; set; }
|
||||
|
||||
[JsonProperty("redirect_url")]
|
||||
public string RedirectUrl { get; set; }
|
||||
|
||||
public List<YAuthError> Errors { get; set; }
|
||||
}
|
||||
}
|
||||
28
YandexMusic.API/Models/Account/YAuthCaptcha.cs
Normal file
28
YandexMusic.API/Models/Account/YAuthCaptcha.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthCaptcha : YAuthBase
|
||||
{
|
||||
public string Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Label { get; set; }
|
||||
|
||||
public string Mode { get; set; }
|
||||
|
||||
public List<YAuthCaptchaError> Error { get; set; }
|
||||
|
||||
public bool CountryFromAudioWhiteList { get; set; }
|
||||
|
||||
public YAuthCaptchaOptions Options { get; set; }
|
||||
|
||||
public YAuthCaptchaVoice Voice { get; set; }
|
||||
|
||||
[JsonProperty("image_url")]
|
||||
public string ImageUrl { get; set; }
|
||||
|
||||
public string Key { get; set; }
|
||||
|
||||
public string Static { get; set; }
|
||||
}
|
||||
}
|
||||
8
YandexMusic.API/Models/Account/YAuthCaptchaError.cs
Normal file
8
YandexMusic.API/Models/Account/YAuthCaptchaError.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthCaptchaError
|
||||
{
|
||||
public string Message { get; set; }
|
||||
public YAuthCaptchaErrorCode Code { get; set; }
|
||||
}
|
||||
}
|
||||
9
YandexMusic.API/Models/Account/YAuthCaptchaErrorCode.cs
Normal file
9
YandexMusic.API/Models/Account/YAuthCaptchaErrorCode.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public enum YAuthCaptchaErrorCode
|
||||
{
|
||||
MissingValue,
|
||||
CaptchaLocate,
|
||||
Incorrect
|
||||
}
|
||||
}
|
||||
7
YandexMusic.API/Models/Account/YAuthCaptchaOptions.cs
Normal file
7
YandexMusic.API/Models/Account/YAuthCaptchaOptions.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthCaptchaOptions
|
||||
{
|
||||
public bool AsyncCheck { get; set; }
|
||||
}
|
||||
}
|
||||
10
YandexMusic.API/Models/Account/YAuthCaptchaVoice.cs
Normal file
10
YandexMusic.API/Models/Account/YAuthCaptchaVoice.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthCaptchaVoice
|
||||
{
|
||||
public string Url { get; set; }
|
||||
|
||||
[JsonProperty("intro_url")]
|
||||
public string IntroUrl { get; set; }
|
||||
}
|
||||
}
|
||||
22
YandexMusic.API/Models/Account/YAuthError.cs
Normal file
22
YandexMusic.API/Models/Account/YAuthError.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
9
YandexMusic.API/Models/Account/YAuthLetter.cs
Normal file
9
YandexMusic.API/Models/Account/YAuthLetter.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthLetter : YAuthBase
|
||||
{
|
||||
public List<string> Code { get; set; }
|
||||
|
||||
public string Id { get; set; }
|
||||
}
|
||||
}
|
||||
11
YandexMusic.API/Models/Account/YAuthLetterStatus.cs
Normal file
11
YandexMusic.API/Models/Account/YAuthLetterStatus.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthLetterStatus : YAuthBase
|
||||
{
|
||||
[JsonProperty("magic_link_confirmed")]
|
||||
public bool MagicLinkConfirmed { get; set; }
|
||||
|
||||
[JsonProperty("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
}
|
||||
}
|
||||
22
YandexMusic.API/Models/Account/YAuthMethod.cs
Normal file
22
YandexMusic.API/Models/Account/YAuthMethod.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
11
YandexMusic.API/Models/Account/YAuthQr.cs
Normal file
11
YandexMusic.API/Models/Account/YAuthQr.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthQR : YAuthBase
|
||||
{
|
||||
[JsonProperty("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
|
||||
[JsonProperty("csrf_token")]
|
||||
public string CsrfToken { get; set; }
|
||||
}
|
||||
}
|
||||
19
YandexMusic.API/Models/Account/YAuthQrStatus.cs
Normal file
19
YandexMusic.API/Models/Account/YAuthQrStatus.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthQRStatus : YAuthBase
|
||||
{
|
||||
[JsonProperty("default_uid")]
|
||||
public int DefaultUid { get; set; }
|
||||
|
||||
public string RetPath { get; set; }
|
||||
|
||||
[JsonProperty("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
|
||||
public string Id { get; set; }
|
||||
|
||||
public string State { get; set; }
|
||||
|
||||
public YAuthCaptcha Captcha { get; set; }
|
||||
}
|
||||
}
|
||||
8
YandexMusic.API/Models/Account/YAuthStatus.cs
Normal file
8
YandexMusic.API/Models/Account/YAuthStatus.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public enum YAuthStatus
|
||||
{
|
||||
Ok,
|
||||
Error
|
||||
}
|
||||
}
|
||||
11
YandexMusic.API/Models/Account/YAuthToken.cs
Normal file
11
YandexMusic.API/Models/Account/YAuthToken.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthToken
|
||||
{
|
||||
[JsonProperty("csfr_token")]
|
||||
public string CsfrToken { get; set; }
|
||||
|
||||
[JsonProperty("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
}
|
||||
}
|
||||
47
YandexMusic.API/Models/Account/YAuthTypes.cs
Normal file
47
YandexMusic.API/Models/Account/YAuthTypes.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YAuthTypes : YAuthBase
|
||||
{
|
||||
[JsonProperty("primary_alias_type")]
|
||||
public string PrimaryAliasType { get; set; }
|
||||
|
||||
[JsonProperty("csrf_token")]
|
||||
public string CsrfToken { get; set; }
|
||||
|
||||
public string LocCsrf { get; set; }
|
||||
|
||||
[JsonProperty("use_new_suggest_by_phone")]
|
||||
public bool UseNewSuggestByPhone { get; set; }
|
||||
|
||||
[JsonProperty("is_rfc_2fa_enabled")]
|
||||
public bool IsRfc2faEnabled { get; set; }
|
||||
|
||||
[JsonProperty("track_id")]
|
||||
public string TrackId { get; set; }
|
||||
|
||||
[JsonProperty("can_authorize")]
|
||||
public string CanAuthorize { get; set; }
|
||||
|
||||
[JsonProperty("preferred_auth_method")]
|
||||
public YAuthMethod PreferredAuthMethod { get; set; }
|
||||
|
||||
[JsonProperty("auth_methods")]
|
||||
public List<YAuthMethod> AuthMethods { get; set; }
|
||||
|
||||
[JsonProperty("can_register")]
|
||||
public bool CanRegister { get; set; }
|
||||
|
||||
[JsonProperty("location_id")]
|
||||
public string LocationId { get; set; }
|
||||
|
||||
public string Country { get; set; }
|
||||
|
||||
[JsonProperty("phone_number")]
|
||||
public YPhoneNumber PhoneNumberNumber { get; set; }
|
||||
|
||||
[JsonProperty("magic_link_email")]
|
||||
public string MagicLinkEmail { get; set; }
|
||||
|
||||
public string TractorTargetLocationHost { get; set; }
|
||||
}
|
||||
}
|
||||
14
YandexMusic.API/Models/Account/YBar.cs
Normal file
14
YandexMusic.API/Models/Account/YBar.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using YandexMusic.API.Models.Common;
|
||||
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
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; }
|
||||
}
|
||||
}
|
||||
31
YandexMusic.API/Models/Account/YLoginInfo.cs
Normal file
31
YandexMusic.API/Models/Account/YLoginInfo.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
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 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; }
|
||||
|
||||
}
|
||||
}
|
||||
20
YandexMusic.API/Models/Account/YPhoneNumber.cs
Normal file
20
YandexMusic.API/Models/Account/YPhoneNumber.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YPhoneNumber
|
||||
{
|
||||
[JsonProperty("masked_e164")]
|
||||
public string MaskedE164 { get; set; }
|
||||
|
||||
public string E164 { get; set; }
|
||||
|
||||
public string International { get; set; }
|
||||
|
||||
[JsonProperty("masked_original")]
|
||||
public string MaskedOriginal { get; set; }
|
||||
|
||||
public string Original { get; set; }
|
||||
|
||||
[JsonProperty("masked_international")]
|
||||
public string MaskedInternational { get; set; }
|
||||
}
|
||||
}
|
||||
81
YandexMusic.API/Models/Account/YShortAccountInfo.cs
Normal file
81
YandexMusic.API/Models/Account/YShortAccountInfo.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
namespace YandexMusic.API.Models.Account
|
||||
{
|
||||
public class YShortAccountInfo : YAuthBase
|
||||
{
|
||||
[JsonProperty("public_id")]
|
||||
public string PublicId { get; set; }
|
||||
|
||||
public string Uid { get; set; }
|
||||
|
||||
public string FirstName { get; set; }
|
||||
|
||||
public string LastName { get; set; }
|
||||
|
||||
public string Birthday { get; set; }
|
||||
|
||||
[JsonProperty("has_password")]
|
||||
public bool HasPassword { get; set; }
|
||||
|
||||
public List<string> Partitions { get; set; }
|
||||
|
||||
[JsonProperty("primary_alias_type")]
|
||||
public int PrimaryAliasType { get; set; }
|
||||
|
||||
[JsonProperty("display_name")]
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
[JsonProperty("normalized_display_login")]
|
||||
public string NormalizedDisplayLogin { get; set; }
|
||||
|
||||
[JsonProperty("x_token_issued_at")]
|
||||
public int XTokenIssuedAt { get; set; }
|
||||
|
||||
[JsonProperty("display_login")]
|
||||
public string DisplayLogin { get; set; }
|
||||
|
||||
[JsonProperty("public_name")]
|
||||
public string PublicName { get; set; }
|
||||
|
||||
[JsonProperty("avatar_url")]
|
||||
public string AvatarUrl { get; set; }
|
||||
|
||||
[JsonProperty("native_default_email")]
|
||||
public string NativeDefaultEmail { get; set; }
|
||||
|
||||
[JsonProperty("has_plus")]
|
||||
public bool HasPlus { get; set; }
|
||||
|
||||
[JsonProperty("location_id")]
|
||||
public int LocationId { get; set; }
|
||||
|
||||
[JsonProperty("gender")]
|
||||
public string Gender { get; set; }
|
||||
|
||||
[JsonProperty("is_avatar_empty")]
|
||||
public bool IsAvatarEmpty { get; set; }
|
||||
|
||||
[JsonProperty("machine_readable_login")]
|
||||
public string MachineReadableLogin { get; set; }
|
||||
|
||||
[JsonProperty("has_cards")]
|
||||
public bool HasCards { get; set; }
|
||||
|
||||
[JsonProperty("has_family")]
|
||||
public bool HasFamily { get; set; }
|
||||
|
||||
[JsonProperty("picture_login_forbidden")]
|
||||
public bool PictureLoginForbidden { get; set; }
|
||||
|
||||
[JsonProperty("can_account_join_master")]
|
||||
public bool CanAccountJoinMaster { get; set; }
|
||||
|
||||
[JsonProperty("secure_phone_number")]
|
||||
public string SecurePhoneNumber { get; set; }
|
||||
|
||||
[JsonProperty("x_token_client_id")]
|
||||
public string XTokenClientId { get; set; }
|
||||
|
||||
[JsonProperty("x_token_need_reset")]
|
||||
public bool XTokenNeedReset { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user