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文字以内のものにしてください。

StatsClientService.cs 654B

12345678910111213141516171819202122
  1. using Grpc.Net.Client;
  2. using GrpcShared.DTO;
  3. using GrpcShared.DTO.Track;
  4. using GrpcShared.Interfaces;
  5. using NemAnBlazor.Services.Interfaces;
  6. using ProtoBuf.Grpc.Client;
  7. namespace NemAnBlazor.Services
  8. {
  9. public class StatsClientService : IStatsClientService
  10. {
  11. private IStatsService _serviceClient;
  12. public StatsClientService(GrpcChannel channel)
  13. {
  14. _serviceClient = channel.CreateGrpcService<IStatsService>();
  15. }
  16. public async Task<CurrentTrackResponse> GetCurrentlyPlayingTrack(TokenMessage token)
  17. {
  18. return await _serviceClient.GetCurrentlyPlayingTrack(token);
  19. }
  20. }
  21. }