LyricFind 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f1ebd78a0d5206fc86f6c7c5eef54af3ca92677
4
- data.tar.gz: 416561a039b43edcc0c7ce1029ee2ef282fe8427
3
+ metadata.gz: 394a1b69e759c034601bc5e11504fb8b323c84ca
4
+ data.tar.gz: 87f8ea293c44d6ec1b43e0df8d9e94ad65a76966
5
5
  SHA512:
6
- metadata.gz: b426119dc6dbb268e2807e14de22d70ed88e5c0db087e946435111e587f64e95b28bc8b3c77b17e879bdee3864bf20fd53ba955efc1d5712297c1153ecdc9874
7
- data.tar.gz: 97995d024e3053a31743365ebb39f06e945de31400d2e3168297bc3cf9e85e564a824772263a520664f722f2281c5ae164c9be3dbf255c7767d19462ba6c4b1b
6
+ metadata.gz: affa41b89722d4c1bd63924601624b36c4e554737d3a5c39f2b6177d942cb392f89394f77dc61fa661ad51c5938e7d23766970fbb00fe58089e4b9903ec02985
7
+ data.tar.gz: 1e6c4b9d5536f0839b4b79bbfd555c1a77ce0debdb53ff9fd8c19e5568d41ceca8b8c48edf656a29f410f10721f3f97fc678365fc636c20a5b18909855f73aea
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- LyricFind (0.1.4)
4
+ LyricFind (0.1.5)
5
5
  nokogiri (~> 1.6)
6
6
 
7
7
  GEM
@@ -1,3 +1,6 @@
1
1
  require "lyricfind/version"
2
2
  require "lyricfind/get_lyrics_by_song_name"
3
3
  require "lyricfind/instrumental"
4
+ require "lyricfind/duration"
5
+ require "lyricfind/album"
6
+ require "lyricfind/get_snippet_by_song_name"
@@ -0,0 +1,13 @@
1
+ require 'open-uri'
2
+ require 'nokogiri'
3
+
4
+ module LyricFind
5
+ class API
6
+ def album artist, song_name
7
+ doc = get_search_api_response artist, song_name
8
+ return nil if doc.nil?
9
+
10
+ doc.xpath('//album')[0].content.gsub("\r\n", '').strip
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ require 'open-uri'
2
+ require 'nokogiri'
3
+
4
+ module LyricFind
5
+ class API
6
+ def duration artist, song_name
7
+ doc = get_search_api_response artist, song_name
8
+ return nil if doc.nil?
9
+
10
+ return doc.xpath('//tracks/track')[0]['duration']
11
+
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'open-uri'
2
+ require 'nokogiri'
3
+
4
+ module LyricFind
5
+ class API
6
+ def get_snippet_by_song_name artist, song_name
7
+ doc = get_search_api_response artist, song_name
8
+ return nil if doc.nil?
9
+
10
+ return doc.xpath('//snippet')[0].content.gsub("\r\n",'').strip
11
+
12
+ end
13
+ end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module LyricFind
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: LyricFind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Itamar Hassin
@@ -126,7 +126,10 @@ files:
126
126
  - bin/console
127
127
  - bin/setup
128
128
  - lib/lyricfind.rb
129
+ - lib/lyricfind/album.rb
130
+ - lib/lyricfind/duration.rb
129
131
  - lib/lyricfind/get_lyrics_by_song_name.rb
132
+ - lib/lyricfind/get_snippet_by_song_name.rb
130
133
  - lib/lyricfind/instrumental.rb
131
134
  - lib/lyricfind/version.rb
132
135
  - lyricfind.gemspec