示例#1
0
        // http://localhost:5000/playlist/coordinates/10.5/10.5
        public ContentResult GetLocationByCoordinates(double latitude, double longitude)
        {
            PlayListRecomedation playlist  = new PlayListRecomedation(latitude, longitude);
            Category             musicType = playlist.getRecomedation();

            SpotifyAPI spotifyAPI = new SpotifyAPI(_configuration);
            string     json       = spotifyAPI.getListOfTracks(musicType);

            Console.WriteLine(json);
            return(Content(json, "application/json"));
        }
示例#2
0
        // http://localhost:5000/playlist/city/fortaleza
        public ContentResult GetLocationByName(string nameId)
        {
            PlayListRecomedation playlist  = new PlayListRecomedation(nameId);
            Category             musicType = playlist.getRecomedation();


            SpotifyAPI spotifyAPI = new SpotifyAPI(_configuration);
            string     json       = spotifyAPI.getListOfTracks(musicType);

            Console.WriteLine(json);
            return(Content(json, "application/json"));
        }