public async Task <IActionResult> GetSpotifyUser(FromBodyAttribute authCode, string code)
        {
            var authToken = GetAuthToken(code);

            var userResponse = await SpotifyUser.GetCurrentUserProfile(authToken);

            return(Ok(userResponse));
        }
        public async Task <IActionResult> GetPlayer(string code)
        {
            var authToken = GetAuthToken(code);

            var userResponse = await SpotifyUser.GetCurrentUserProfile(authToken);

            var playingNow = await userResponse.GetPlayer(authToken);

            return(Ok(playingNow));
        }
Пример #3
0
        public async Task <IActionResult> GetPlayer(string code)
        {
            var authToken = HttpHelper.Post("https://accounts.spotify.com/api/token", code);

            var userResponse = await SpotifyUser.GetCurrentUserProfile(authToken);

            var playingNow = await userResponse.GetPlayer(authToken);

            return(Ok(playingNow));
        }
Пример #4
0
        public async Task <IActionResult> GetSpotifyUser(FromBodyAttribute authCode, string code)
        {
            var authToken = HttpHelper.Post("https://accounts.spotify.com/api/token", code);

            var userResponse = await SpotifyUser.GetCurrentUserProfile(authToken);

            await _dashboardHub.Clients.All.InvokeAsync("TestSend", "Hello From The Hub Server!!");

            return(Ok(userResponse));
        }