Exemple #1
0
        public override async Task <SkillResponse> HandleIntent(SkillRequest skillRequest, IntentRequest intentRequest,
                                                                ILambdaContext context)
        {
            var actualTrack = await SpotifyClient.GetPlayingTrackAsync();

            if (actualTrack.HasError())
            {
                return(TellWithoutEnding("There was an error with getting the current playing track"));
            }

            await SpotifyClient.SaveTrackAsync(actualTrack.Item.Id);

            return(TellWithoutEnding($"I have just saved the song: {actualTrack.Item.Name}"));
        }