robbie 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/robbie/request.rb +5 -4
- data/lib/robbie/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85c2139bb86e52708920505e4ba5e5bb526e3050
|
4
|
+
data.tar.gz: 64b3cd199275e5b0f231a91ce0b5895b07c3de06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c00c9331a64f581fcf005b8a680c7b9ff579933945e31c5411d57d4230398309268be8a25b531b2c1c60b48802ff4f18f20d48323554e4c6e2bad728c8045f2
|
7
|
+
data.tar.gz: 5bab60f654fb04a4e0ee41d7ad6faeeeabf109bf794afabc512e45d701b20d2617d219abf43eac7e577152579059225bf24f74f4779a7220377d6e49c9dace7c
|
data/lib/robbie/request.rb
CHANGED
@@ -39,6 +39,7 @@ module Request
|
|
39
39
|
puts "Title: \t\t#{@json['track']['name']}"
|
40
40
|
puts "Artist: \t#{@json['track']['artist']['name']}"
|
41
41
|
puts "Year: \t\t#{@json['track']['wiki']['published']}"
|
42
|
+
puts "Duration: \t#{@json['track']['duration']}"
|
42
43
|
end
|
43
44
|
|
44
45
|
def album(args) # works, sort of
|
@@ -48,13 +49,13 @@ module Request
|
|
48
49
|
@res = HTTP.get("http://ws.audioscrobbler.com/2.0/?method=album.getInfo&artist=#{@artist}&album=#{@album}&api_key=0a7d3b25ed857f679eba1a353e98a658&format=json").body
|
49
50
|
@json = JSON.parse(@res)
|
50
51
|
|
51
|
-
puts "Title: \t\t#{
|
52
|
+
puts "Title: \t\t#{@json['album']['name']}"
|
52
53
|
puts "Artist: \t#{@json['album']['artist']}"
|
53
54
|
puts "Year: \t\t#{@json['album']['wiki']['published']}"
|
54
55
|
puts "Tracks: \t"
|
55
|
-
|
56
|
-
@json['album']['tracks']['track'].
|
57
|
-
puts "\t#{track['name']}"
|
56
|
+
|
57
|
+
@json['album']['tracks']['track'].length.times do |i|
|
58
|
+
puts "\t##{i+1}:\t#{@json['album']['tracks']['track'][i]['name']}"
|
58
59
|
end
|
59
60
|
end
|
60
61
|
|
data/lib/robbie/version.rb
CHANGED