public Song(string band, string songName) { string url = "https://api.lyrics.ovh/v1/" + band + "/" + songName; var json = WebCache.GetOrDownload(url); var lyricsData = JsonConvert.DeserializeObject <LyricsovhResponse>(json); title = songName; artist = band; lyrics = lyricsData.lyrics; }
public Song(string band, string song) { var url = "https://api.lyrics.ovh/v1/" + band + "/" + song; var json = WebCache.GetOrDownload(url); var lyricsData = JsonConvert.DeserializeObject <LyricsAnswer>(json); artist = band; title = song; lyrics = lyricsData.lyrics; }
public Song(string band, string songName) { var browser = new WebClient(); var url = "https://api.lyrics.ovh/v1/" + band + "/" + songName; var json = WebCache.GetOrDownload(url); var lyricsData = JsonConvert.DeserializeObject <LyricovhAnwser>(json); title = songName; artist = band; lyrics = lyricsData.lyrics; }
public Song(string artist, string title) { var url = "https://api.lyrics.ovh/v1/" + artist + "/" + title; var json = WebCache.GetOrDownload(url); var answer = JsonConvert.DeserializeObject <LyricsOvhAnswer>(json); lyrics = answer.lyrics; this.artist = artist; this.title = title; Console.WriteLine("Pobrano: " + artist + " - " + title); }
public Song(string artist, string title) { //var browser = new System.Net.WebClient(); var url = "https://api.lyrics.ovh/v1/" + artist + "/" + title; //var json = browser.DownloadString(url); var json = WebCache.GetOrDownload(url); var answer = JsonConvert.DeserializeObject <LyricsOvhAnswer>(json); lyrics = answer.lyrics; this.artist = artist; this.title = title; Console.WriteLine("Pobrano: " + artist + " - " + title + " (" + CountWords() + " słów)"); }
public Song(string artist, string title) { var url = "http://api.lyrics.ovh/v1/" + artist + "/" + title; var json = WebCache.GetOrDownload(url); var answe = JsonConvert.DeserializeObject <LyricsOvhAnswer>(json); lyrics = answe.lyrics; this.artist = artist; this.title = title; }
public Song(string band, string song) { if (band != "") { //var browser = new WebClient(); var url = "https://api.lyrics.ovh/v1/" + band + "/" + song; //var json = browser.DownloadString(url); var json = WebCache.GetOrDownload(url); var lyricsData = JsonConvert.DeserializeObject<LyricsAnswer>(json); tiitle = song; artist = band; lyrics = lyricsData.lyrics; } else { lyrics = song; } }