gracenote-rb 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/gracenote/request/search.rb +12 -6
- data/lib/gracenote/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5a1a27e3f1fe97f477f46fd955d03ad16c3b3e3
|
4
|
+
data.tar.gz: aa59476c5f9a13a7c7a9bbe13c7d8ae572ac603d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9697b42ecb48be63962dc505426dc37e0fe114d0ca2b7efae6a576129e4a5fcb5133a2737afd43bef1df6970044b72f9b406a1b583a4a8ae4fea2c621093526c
|
7
|
+
data.tar.gz: 717a22cfa673935f2aa739d1d3041ff3ad566cafe87f48edcd6511ec6c9de3c5093e0119802475a1b066581876f0f8a13d178c6647c8dd06eec4c0ad1f6e32d4
|
data/README.md
CHANGED
@@ -67,7 +67,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
67
67
|
|
68
68
|
## Contributing
|
69
69
|
|
70
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
70
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/tomoya55/gracenote-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
71
71
|
|
72
72
|
|
73
73
|
## License
|
@@ -9,12 +9,8 @@ module Gracenote
|
|
9
9
|
def search(artist: nil, album: nil, track: nil, mode: nil, range: nil)
|
10
10
|
query("album_search", auth: auth, lang: lang, country: country) do |xml|
|
11
11
|
xml.MODE { xml.text mode } if mode
|
12
|
-
if range
|
13
|
-
|
14
|
-
xml.START range[:start]
|
15
|
-
xml.END range[:end] if range[:end]
|
16
|
-
}
|
17
|
-
end
|
12
|
+
set_range(xml, range) if range
|
13
|
+
|
18
14
|
xml.TEXT(TYPE: "ARTIST") { xml.text artist } if artist
|
19
15
|
xml.TEXT(TYPE: "ALBUM_TITLE") { xml.text album } if album
|
20
16
|
xml.TEXT(TYPE: "TRACK_TITLE") { xml.text track } if track
|
@@ -24,6 +20,16 @@ module Gracenote
|
|
24
20
|
Option.new(xml, options).render
|
25
21
|
end
|
26
22
|
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def set_range(xml, range)
|
27
|
+
range[:end] ||= range[:start] + 10
|
28
|
+
xml.RANGE {
|
29
|
+
xml.START range[:start]
|
30
|
+
xml.END range[:end]
|
31
|
+
}
|
32
|
+
end
|
27
33
|
end
|
28
34
|
end
|
29
35
|
end
|
data/lib/gracenote/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gracenote-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomoya Hirano
|
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
248
|
version: '0'
|
249
249
|
requirements: []
|
250
250
|
rubyforge_project:
|
251
|
-
rubygems_version: 2.
|
251
|
+
rubygems_version: 2.5.1
|
252
252
|
signing_key:
|
253
253
|
specification_version: 4
|
254
254
|
summary: Gracenote Client for modern Ruby
|