chore: init commit from GitHub
This commit is contained in:
@@ -0,0 +1,268 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SWAD.API.Models.JsonStructures.MusicAPI.Yandex;
|
||||
/*
|
||||
* ВНИМАНИЕ
|
||||
* Yandex API писали шизы поэтому когда будешь добавлять поля в YandexSearchResponse
|
||||
* ПОМНИ: ID у артистов и альбомов в разных местах JSON в одних и тех же объектах то string то number
|
||||
* ЭТО ВЫЗОВЕТ ИСКЛЮЧЕНИЕ
|
||||
* Думой
|
||||
*/
|
||||
public class YandexSearchResponse
|
||||
{
|
||||
[JsonPropertyName("status")]
|
||||
public string Status { get; set; }
|
||||
|
||||
[JsonPropertyName("entities")]
|
||||
public List<Entity> Entities { get; set; }
|
||||
}
|
||||
public class Album
|
||||
{
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("year")]
|
||||
public int? Year { get; set; }
|
||||
|
||||
[JsonPropertyName("trackCount")]
|
||||
public int? TrackCount { get; set; }
|
||||
}
|
||||
|
||||
public class Album2
|
||||
{
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("year")]
|
||||
public int? Year { get; set; }
|
||||
|
||||
[JsonPropertyName("trackCount")]
|
||||
public int? TrackCount { get; set; }
|
||||
}
|
||||
|
||||
public class Artist
|
||||
{
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class Artist2
|
||||
{
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class Counts
|
||||
{
|
||||
[JsonPropertyName("tracks")]
|
||||
public int? Tracks { get; set; }
|
||||
|
||||
[JsonPropertyName("directAlbums")]
|
||||
public int? DirectAlbums { get; set; }
|
||||
|
||||
[JsonPropertyName("alsoAlbums")]
|
||||
public int? AlsoAlbums { get; set; }
|
||||
|
||||
[JsonPropertyName("alsoTracks")]
|
||||
public int? AlsoTracks { get; set; }
|
||||
}
|
||||
|
||||
public class Cover
|
||||
{
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonPropertyName("prefix")]
|
||||
public string Prefix { get; set; }
|
||||
|
||||
[JsonPropertyName("uri")]
|
||||
public string Uri { get; set; }
|
||||
}
|
||||
|
||||
public class DerivedColors
|
||||
{
|
||||
[JsonPropertyName("average")]
|
||||
public string Average { get; set; }
|
||||
|
||||
[JsonPropertyName("waveText")]
|
||||
public string WaveText { get; set; }
|
||||
|
||||
[JsonPropertyName("miniPlayer")]
|
||||
public string MiniPlayer { get; set; }
|
||||
|
||||
[JsonPropertyName("accent")]
|
||||
public string Accent { get; set; }
|
||||
}
|
||||
|
||||
public class Entity
|
||||
{
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonPropertyName("results")]
|
||||
public List<Result> Results { get; set; }
|
||||
}
|
||||
|
||||
public class Fade
|
||||
{
|
||||
[JsonPropertyName("inStart")]
|
||||
public double? InStart { get; set; }
|
||||
|
||||
[JsonPropertyName("inStop")]
|
||||
public double? InStop { get; set; }
|
||||
|
||||
[JsonPropertyName("outStart")]
|
||||
public double? OutStart { get; set; }
|
||||
|
||||
[JsonPropertyName("outStop")]
|
||||
public double? OutStop { get; set; }
|
||||
}
|
||||
|
||||
public class Label
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public int? Id { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class LyricsInfo
|
||||
{
|
||||
[JsonPropertyName("hasAvailableSyncLyrics")]
|
||||
public bool? HasAvailableSyncLyrics { get; set; }
|
||||
|
||||
[JsonPropertyName("hasAvailableTextLyrics")]
|
||||
public bool? HasAvailableTextLyrics { get; set; }
|
||||
}
|
||||
|
||||
public class Major
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public int? Id { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class R128
|
||||
{
|
||||
[JsonPropertyName("i")]
|
||||
public double? I { get; set; }
|
||||
|
||||
[JsonPropertyName("tp")]
|
||||
public double? Tp { get; set; }
|
||||
}
|
||||
|
||||
public class Ratings
|
||||
{
|
||||
[JsonPropertyName("month")]
|
||||
public int? Month { get; set; }
|
||||
}
|
||||
|
||||
public class Result
|
||||
{
|
||||
[JsonPropertyName("text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
[JsonPropertyName("track")]
|
||||
public Track Track { get; set; }
|
||||
}
|
||||
|
||||
public class Track
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonPropertyName("realId")]
|
||||
public string RealId { get; set; }
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("version")]
|
||||
public string Version { get; set; }
|
||||
|
||||
[JsonPropertyName("trackSource")]
|
||||
public string TrackSource { get; set; }
|
||||
|
||||
[JsonPropertyName("major")]
|
||||
public Major Major { get; set; }
|
||||
|
||||
[JsonPropertyName("available")]
|
||||
public bool? Available { get; set; }
|
||||
|
||||
[JsonPropertyName("availableForPremiumUsers")]
|
||||
public bool? AvailableForPremiumUsers { get; set; }
|
||||
|
||||
[JsonPropertyName("availableFullWithoutPermission")]
|
||||
public bool? AvailableFullWithoutPermission { get; set; }
|
||||
|
||||
[JsonPropertyName("disclaimers")]
|
||||
public List<object> Disclaimers { get; set; }
|
||||
|
||||
[JsonPropertyName("availableForOptions")]
|
||||
public List<string> AvailableForOptions { get; set; }
|
||||
|
||||
[JsonPropertyName("albums")]
|
||||
public List<Album> Albums { get; set; }
|
||||
|
||||
[JsonPropertyName("durationMs")]
|
||||
public int? DurationMs { get; set; }
|
||||
|
||||
[JsonPropertyName("storageDir")]
|
||||
public string StorageDir { get; set; }
|
||||
|
||||
[JsonPropertyName("fileSize")]
|
||||
public int? FileSize { get; set; }
|
||||
|
||||
[JsonPropertyName("r128")]
|
||||
public R128 R128 { get; set; }
|
||||
|
||||
[JsonPropertyName("fade")]
|
||||
public Fade Fade { get; set; }
|
||||
|
||||
[JsonPropertyName("previewDurationMs")]
|
||||
public int? PreviewDurationMs { get; set; }
|
||||
|
||||
[JsonPropertyName("coverUri")]
|
||||
public string CoverUri { get; set; }
|
||||
|
||||
[JsonPropertyName("ogImage")]
|
||||
public string OgImage { get; set; }
|
||||
|
||||
[JsonPropertyName("lyricsAvailable")]
|
||||
public bool? LyricsAvailable { get; set; }
|
||||
|
||||
[JsonPropertyName("lyricsInfo")]
|
||||
public LyricsInfo LyricsInfo { get; set; }
|
||||
|
||||
[JsonPropertyName("derivedColors")]
|
||||
public DerivedColors DerivedColors { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonPropertyName("rememberPosition")]
|
||||
public bool? RememberPosition { get; set; }
|
||||
|
||||
[JsonPropertyName("trackSharingFlag")]
|
||||
public string TrackSharingFlag { get; set; }
|
||||
|
||||
[JsonPropertyName("contentWarning")]
|
||||
public string ContentWarning { get; set; }
|
||||
}
|
||||
|
||||
public class TrackPosition
|
||||
{
|
||||
[JsonPropertyName("volume")]
|
||||
public int? Volume { get; set; }
|
||||
|
||||
[JsonPropertyName("index")]
|
||||
public int? Index { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user