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.

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. }