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.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334
  1. @page "/"
  2. @using Grpc.Net.Client
  3. @using Grpc.Net.Client.Web
  4. @using SpotifyService.Protos
  5. @inject NavigationManager NavigationManager
  6. <PageTitle>Index</PageTitle>
  7. <h1>Pozdrav Diligent!</h1>
  8. Dobrodošli u našu NemAn aplikaciju.
  9. <button class="btn-outline-success" @onclick="SpotifyRedirect">Spotify</button>
  10. @code{
  11. private void SpotifyRedirect()
  12. {
  13. NavigationManager.NavigateTo(
  14. "https://accounts.spotify.com/en/authorize?client_id=83e1d09876b049c4bb1953185a4b3bfb&redirect_uri=https%3A%2F%2Flocalhost%3A7229%2F&response_type=code&scope=user-read-currently-playing%20user-read-email%20user-library-modify%20user-top-read%0A%0A%0A&show_dialog=true");
  15. }
  16. private async Task Grpc()
  17. {
  18. var channel = GrpcChannel.ForAddress("https://localhost:7251", new GrpcChannelOptions
  19. {
  20. HttpHandler = new GrpcWebHandler(new HttpClientHandler())
  21. });
  22. var client = new Search.SearchClient(channel);
  23. var response = await client.SearchForItemAsync(new SearchForItemRequest { Query = "venom", Type = "track", Limit = 5, Offset = 0, IncludeExternal = "audio"});
  24. }
  25. }