Beispiel #1
0
        private void SongUrlRecv(HttpWebRequest request, HttpWebResponse response, String jsonData, Exception error)
        {
            if (error != null)
            {
                ThrowError(error);
                return;
            }

            GoogleMusicSongUrl url = null;

            try
            {
                url = JsonConvert.DeserializeObject <GoogleMusicSongUrl>(jsonData);
            }
            catch (Exception e)
            {
                OnError(e);
            }

            if (OnGetSongURL != null)
            {
                OnGetSongURL(url);
            }
        }
 void api_OnGetSongURL(GoogleMusicSongUrl songurl)
 {
     new WebClient().DownloadFile(songurl.URL, "C:\\test.mp3");
 }