next-big-sound 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.1
@@ -36,7 +36,7 @@ module NBS
36
36
  #puts self.to_xml
37
37
  #puts self.to_xml
38
38
  @profs ||= long_function
39
-
39
+ return @profs
40
40
  end
41
41
  def long_function
42
42
  profs={}
@@ -78,13 +78,30 @@ module NBS
78
78
  def to_hash
79
79
  Hash.from_xml(self.to_xml)
80
80
  end
81
+ def youtube_videos
82
+ @youtube_fetch ||= Net::HTTP.get(URI.parse("#{$nbs_api_key}youtube/artist/#{self.artist_id}.xml")).to_s
83
+ h = Hash.from_xml(@youtube_fetch)
81
84
 
82
- #def method_missing(method_name,*args)
83
- # splits = method_name.to_s.split("_")
84
- # prof = self.profiles[splits[0].upcase]
85
- # metrics = prof.metrics(args[0],args[1])
86
- # return metrics[splits[1].downcase.to_s].data_points
87
- #end
88
-
85
+ arr =[]
86
+ begin
87
+ h["data"][0]["youtubes"][0]["youtube"].each do |g|
88
+ arr << g["url"].to_s
89
+ end
90
+ rescue
91
+ end
92
+ return arr
93
+ end
94
+ def genres
95
+ @genre_fetch ||= Net::HTTP.get(URI.parse("#{$nbs_api_key}genres/artist/#{self.artist_id}.xml")).to_s
96
+ h = Hash.from_xml(@genre_fetch)
97
+ arr =[]
98
+ begin
99
+ h["data"][0]["genres"][0]["genre"].each do |g|
100
+ arr << g["name"].to_s
101
+ end
102
+ rescue
103
+ end
104
+ return arr
105
+ end
89
106
  end
90
107
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{next-big-sound}
8
- s.version = "0.8.0"
8
+ s.version = "0.8.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jeff durand"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - 0
9
- version: 0.8.0
8
+ - 1
9
+ version: 0.8.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - jeff durand