| 12345678910111213141516171819202122232425262728293031323334 |
- @page "/"
- @using Grpc.Net.Client
- @using Grpc.Net.Client.Web
- @using SpotifyService.Protos
- @inject NavigationManager NavigationManager
-
- <PageTitle>Index</PageTitle>
-
- <h1>Pozdrav Diligent!</h1>
-
- Dobrodošli u našu NemAn aplikaciju.
-
- <button class="btn-outline-success" @onclick="SpotifyRedirect">Spotify</button>
-
- @code{
- private void SpotifyRedirect()
- {
- NavigationManager.NavigateTo(
- "https://accounts.spotify.com/en/authorize?client_id=83e1d09876b049c4bb1953185a4b3bfb&redirect_uri=https%3A%2F%2Flocalhost%3A7229%2F&response_type=code&scope=user-read-currently-playing%20user-read-email%20user-library-modify%20user-top-read%0A%0A%0A&show_dialog=true");
- }
-
- private async Task Grpc()
- {
- var channel = GrpcChannel.ForAddress("https://localhost:7251", new GrpcChannelOptions
- {
- HttpHandler = new GrpcWebHandler(new HttpClientHandler())
- });
-
- var client = new Search.SearchClient(channel);
- var response = await client.SearchForItemAsync(new SearchForItemRequest { Query = "venom", Type = "track", Limit = 5, Offset = 0, IncludeExternal = "audio"});
-
-
- }
- }
|