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 символов.

AuthClientService.cs 770B

1234567891011121314151617181920212223242526272829
  1. using Grpc.Net.Client;
  2. using GrpcShared.DTO.Auth;
  3. using GrpcShared.Interfaces;
  4. using NemAnBlazor.Services.Interfaces;
  5. using ProtoBuf.Grpc.Client;
  6. using GrpcShared;
  7. namespace NemAnBlazor.Services
  8. {
  9. public class AuthClientService : IAuthClientService
  10. {
  11. private IAuthService _serviceClient;
  12. public AuthClientService(GrpcChannel grpcChannel)
  13. {
  14. _serviceClient = grpcChannel.CreateGrpcService<IAuthService>();
  15. }
  16. public async Task<TokenResponse> GetAccessToken(TokenRequest request)
  17. {
  18. return await _serviceClient.GetAccessToken(request);
  19. }
  20. public async Task<CodeRequest> GetAuthParams()
  21. {
  22. return await _serviceClient.GetAuthParams();
  23. }
  24. }
  25. }