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.

Index.razor 1.1KB

123456789101112131415161718192021222324252627282930
  1. @page "/"
  2. @using Grpc.Net.Client
  3. @using Grpc.Net.Client.Web
  4. @using GrpcShared
  5. @using GrpcShared.DTO.Auth
  6. @using NemAnBlazor.Services.Interfaces
  7. @inject NavigationManager NavigationManager
  8. @inject IAuthClientService AuthService
  9. @*@inject ISearchClientService SearchService*@
  10. <PageTitle>Index</PageTitle>
  11. <h1>Pozdrav Diligent!</h1>
  12. Dobrodošli u našu NemAn aplikaciju.
  13. @code {
  14. protected override async Task OnInitializedAsync()
  15. {
  16. //var response = await SearchService.GetListSearchAsync(new GrpcShared.DTO.Search.SearchRequest() { Query="venom", Type = "track"});
  17. AuthParams authParams = await AuthService.GetAuthParams();
  18. // await AuthService.GetAccessToken(new CodeResponse{ Code = "hello"});
  19. AuthRequest request = new() { ResponseType = "code", Scope = authParams.Scope, ClientId = authParams.ClientId, RedirectURI = authParams.RedirectURI};
  20. string url = $"https://accounts.spotify.com/en/authorize?client_id={request.ClientId}&redirect_uri={request.RedirectURI}&response_type={request.ResponseType}&scope={request.Scope}&show_dialog=true";
  21. NavigationManager.NavigateTo(url);
  22. }
  23. }