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.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Index.razor 1.0KB

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