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 846B

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