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.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

CurrentTrackResponse.cs 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. [ProtoMember(5)]
  26. public bool IsSaved { get; set; }
  27. }
  28. [ProtoContract]
  29. public class Item
  30. {
  31. [ProtoMember(1)]
  32. [JsonProperty("album")]
  33. public Album? Album { get; set; }
  34. [ProtoMember(2)]
  35. [JsonProperty("artists")]
  36. public Artist[]? Artists { get; set; }
  37. [ProtoMember(3)]
  38. [JsonProperty("id")]
  39. public string? Id { get; set; }
  40. [ProtoMember(4)]
  41. [JsonProperty("name")]
  42. public string? Name { get; set; }
  43. [ProtoMember(5)]
  44. [JsonProperty("href")]
  45. public string? Href { get; set; }
  46. }
  47. [ProtoContract]
  48. public class Album
  49. {
  50. [ProtoMember(1)]
  51. [JsonProperty("id")]
  52. public string? Id { get; set; }
  53. [ProtoMember(2)]
  54. [JsonProperty("name")]
  55. public string? Name { get; set; }
  56. [ProtoMember(3)]
  57. [JsonProperty("images")]
  58. public Image[]? Images { get; set; }
  59. [ProtoMember(4)]
  60. [JsonProperty("href")]
  61. public string? Href { get; set; }
  62. }
  63. [ProtoContract]
  64. public class Artist
  65. {
  66. [ProtoMember(1)]
  67. [JsonProperty("id")]
  68. public string? Id { get; set; }
  69. [ProtoMember(2)]
  70. [JsonProperty("name")]
  71. public string? Name { get; set; }
  72. [ProtoMember(3)]
  73. [JsonProperty("href")]
  74. public string? Href { get; set; }
  75. }
  76. [ProtoContract]
  77. public class Image
  78. {
  79. [ProtoMember(1)]
  80. [JsonProperty("height")]
  81. public int? Height{ get; set; }
  82. [ProtoMember(2)]
  83. [JsonProperty("url")]
  84. public string? Url { get; set; }
  85. [ProtoMember(3)]
  86. [JsonProperty("width")]
  87. public int? Width { get; set; }
  88. }
  89. }