Blazor & WASM in combination to get statistics from Spotify API for performing the song analysis. With separate microservices for auth, Spotify, user data tracking, and application, connected through gRPC with Polly.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

CurrentTrackResponse.cs 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. using Newtonsoft.Json;
  2. using ProtoBuf;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace GrpcShared.DTO.Track
  9. {
  10. [ProtoContract]
  11. public class CurrentTrackResponse : StatusCodeMessage
  12. {
  13. [ProtoMember(1)]
  14. [JsonProperty("timestamp")]
  15. public string? Timestamp{ get; set; }
  16. [ProtoMember(2)]
  17. [JsonProperty("progress_ms")]
  18. public int? ProgressMs { get; set; }
  19. [ProtoMember(3)]
  20. [JsonProperty("is_playing")]
  21. public bool? IsPlaying { get; set; }
  22. [ProtoMember(4)]
  23. [JsonProperty("item")]
  24. public Item? Item { get; set; }
  25. }
  26. [ProtoContract]
  27. public class Item
  28. {
  29. [ProtoMember(1)]
  30. [JsonProperty("album")]
  31. public Album? Album { get; set; }
  32. [ProtoMember(2)]
  33. [JsonProperty("artists")]
  34. public Artist[]? Artists { get; set; }
  35. [ProtoMember(3)]
  36. [JsonProperty("id")]
  37. public string? Id { get; set; }
  38. [ProtoMember(4)]
  39. [JsonProperty("name")]
  40. public string? Name { get; set; }
  41. [ProtoMember(5)]
  42. [JsonProperty("href")]
  43. public string? Href { get; set; }
  44. }
  45. [ProtoContract]
  46. public class Album
  47. {
  48. [ProtoMember(1)]
  49. [JsonProperty("id")]
  50. public string? Id { get; set; }
  51. [ProtoMember(2)]
  52. [JsonProperty("name")]
  53. public string? Name { get; set; }
  54. [ProtoMember(3)]
  55. [JsonProperty("images")]
  56. public Image[]? Images { get; set; }
  57. [ProtoMember(4)]
  58. [JsonProperty("href")]
  59. public string? Href { get; set; }
  60. }
  61. [ProtoContract]
  62. public class Artist
  63. {
  64. [ProtoMember(1)]
  65. [JsonProperty("id")]
  66. public string? Id { get; set; }
  67. [ProtoMember(2)]
  68. [JsonProperty("name")]
  69. public string? Name { get; set; }
  70. [ProtoMember(3)]
  71. [JsonProperty("href")]
  72. public string? Href { get; set; }
  73. }
  74. [ProtoContract]
  75. public class Image
  76. {
  77. [ProtoMember(1)]
  78. [JsonProperty("height")]
  79. public int? Height{ get; set; }
  80. [ProtoMember(2)]
  81. [JsonProperty("url")]
  82. public string? Url { get; set; }
  83. [ProtoMember(3)]
  84. [JsonProperty("width")]
  85. public int? Width { get; set; }
  86. }
  87. }