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.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Home.razor 1.0KB

123456789101112131415161718192021222324252627
  1. @page "/home"
  2. @using GrpcShared.DTO
  3. @using GrpcShared.DTO.Track
  4. @using NemAnBlazor.Services.Interfaces
  5. @inject Blazored.LocalStorage.ILocalStorageService localStorage
  6. @inject IStatsClientService spotifyService
  7. @inject ITrackClientService trackService
  8. <h3>Home</h3>
  9. <p>login radi</p>
  10. @code {
  11. protected override async Task OnInitializedAsync()
  12. {
  13. string tokenS = await localStorage.GetItemAsync<string>("token");
  14. TokenMessage token = new TokenMessage{Token = tokenS};
  15. CurrentTrackResponse response = await spotifyService.GetCurrentlyPlayingTrack(token);
  16. //napravi komponentu koja ce da prikazuje sta trenutno slusas i passuj joj parametre
  17. //4fy1A2WBTPX55mUI16TQXa
  18. //var trackById = await trackService.GetById(new GrpcShared.DTO.TrackByID.TrackRequest { TrackID = "4fy1A2WBTPX55mUI16TQXa", Token = tokenS });
  19. var items = await spotifyService.GetTopItems(new GrpcShared.DTO.TopItem.TopItemRequest { Token = tokenS, IsTracks = false, Offset = 5});
  20. }
  21. }