Exemplo n.º 1
0
        public async Task <ActionResult <SpotifyReply> > Get()
        {
            Player player = await HttpCaller.Get <Player>(_spotifyAPISettings.SpotifyUrl,
                                                          _spotifyAPISettings.AccessToken);

            SpotifyReply spotifyReply = player.ToSpotifyReply();

            return(Ok(spotifyReply));
        }
Exemplo n.º 2
0
        public async Task <ActionResult <SpotifyReply> > Previous()
        {
            HttpStatusCode status = await HttpCaller.Post(_spotifyAPISettings.SpotifyUrl + "/previous?device_id=" + _spotifyAPISettings.DeviceID,
                                                          _spotifyAPISettings.AccessToken,
                                                          null);

            Player player = await HttpCaller.Get <Player>(_spotifyAPISettings.SpotifyUrl,
                                                          _spotifyAPISettings.AccessToken);

            SpotifyReply spotifyReply = player.ToSpotifyReply();

            return(Ok(spotifyReply));
        }