Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
            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;
            }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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)");
        }
Ejemplo n.º 6
0
        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;
        }
Ejemplo n.º 7
0
        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;
            }

        }