<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/fixtures/nil_video.xml</filename>
    </added>
    <added>
      <filename>test/fixtures/nine_inch_nails.xml</filename>
    </added>
    <added>
      <filename>test/fixtures/radiohead.xml</filename>
    </added>
    <added>
      <filename>test/fixtures/sailing_three_tuesdays.xml</filename>
    </added>
    <added>
      <filename>test/fixtures/there_there.xml</filename>
    </added>
    <added>
      <filename>test/test_helper.rb</filename>
    </added>
    <added>
      <filename>test/test_mtv_music_artist.rb</filename>
    </added>
    <added>
      <filename>test/test_mtv_music_video.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -15,6 +15,6 @@ module MTV
     API_VERSION = '1'
     API_URL     = &quot;http://api.mtvnservices.com/#{API_VERSION}/&quot;
     
-    MTV::Music::Base::connection = REST::Connection.new(API_URL, :rate_limit =&gt; 0.5)
+    MTV::Music::Base::connection = REST::Connection.new(API_URL, :rate_limit =&gt; 0.68)
   end
 end
\ No newline at end of file</diff>
      <filename>lib/mtv-music.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,18 @@
 module MTV
   module Music
-    class Artist &lt; Base      
-      attribute :uri,             String, :matcher =&gt; &quot;author/uri&quot;
+    class Artist &lt; Base    
       attribute :name,            String, :matcher =&gt; &quot;author/name&quot;
       attribute :thumbnail_url,   String, :matcher =&gt; &quot;media:thumbnail&quot;, :attribute =&gt; &quot;url&quot;
-      
-      def initialize_without_polymorphism(xml)
-        super
-        @id = @uri.split('/').last
-      end
     
       def videos
         xml = Video.fetch_and_parse(self.class.api_path(:videos, self.id))
         return xml.search(&quot;entry/id&quot;).collect{|elem| Video.new(Video.fetch_and_parse(elem.inner_text))}
       end
+      
+      def related
+        xml = Artist.fetch_and_parse(self.class.api_path(:related, self.id))
+        return xml.search(&quot;entry/id&quot;).collect{|elem| Artist.new(Artist.fetch_and_parse(elem.inner_text))}
+      end
     end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/mtv-music/artist.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ module MTV
     class Base
       class &lt;&lt; self
         
-        attr_accessor   :attributes
+        cattr_accessor   :attributes
         cattr_accessor  :connection
         
         def attribute(*args)
@@ -67,13 +67,21 @@ module MTV
         end
       end
       
-      attr_accessor :id
-      
+      attr_accessor :id, :uri
+            
       def initialize(xml)
         raise ArgumentError unless xml.kind_of?(Hpricot)
-                
+        
+        if xml.at(:uri).inner_text == &quot;http://api.mtvnservices.com/1/&quot;
+          raise MTVNetworkServiceError, xml.at(:title).inner_text, xml.at(:content).inner_text
+        end
+        
+        @uri = xml.at(:id).inner_text
+        @id  = @uri.split('/').last
+        
         self.class.attributes.each do |attribute, options|
           element = xml.search(options[:matcher]).first
+          next if element.nil?
           value = options[:attribute] ? element.attributes[options[:attribute]] : element.inner_text# rescue nil
           begin
             if options[:type] == Integer
@@ -87,6 +95,7 @@ module MTV
             self.instance_variable_set(&quot;@#{attribute}&quot;, value)
           end     
         end        
+        
       end
       
       def initialize_with_polymorphism(arg)
@@ -107,7 +116,7 @@ module MTV
     protected
       
       def query_by_string(string)
-        xml = self.class.fetch_and_parse(self.class.api_path(nil, string))
+        xml = self.class.fetch_and_parse(self.class.api_path(nil, string.gsub(/\s+/, '_')))
         return xml.at(:entry)
       end   
       </diff>
      <filename>lib/mtv-music/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,13 @@
 module MTV
   module Music
     class Video &lt; Base    
-      attribute :uri,           String,  :matcher =&gt; &quot;id&quot;
-      attribute :media_uri,     String,  :matcher =&gt; &quot;media:content&quot;, :attribute =&gt; &quot;url&quot;
-      attribute :artist_uri,    String,  :matcher =&gt; &quot;author/uri&quot;
-      attribute :title,         String,  :matcher =&gt; &quot;media:title&quot;
-      attribute :description,   String,  :matcher =&gt; &quot;media:description&quot;
-      attribute :director,      String,  :matcher =&gt; &quot;media:credit[@role^='director']&quot;
-      attribute :released_on,   Date,    :matcher =&gt; &quot;published&quot;
-      attribute :updated_on,    Date,    :matcher =&gt; &quot;updated&quot;
-      
-      def initialize_without_polymorphism(xml)
-        super
-        @id = @uri.split('/').last
-      end
+      attribute :media_uri,     String, :matcher =&gt; &quot;media:content&quot;, :attribute =&gt; &quot;url&quot;
+      attribute :artist_uri,    String, :matcher =&gt; &quot;author/uri&quot;
+      attribute :title,         String, :matcher =&gt; &quot;media:title&quot;
+      attribute :description,   String, :matcher =&gt; &quot;media:description&quot;
+      attribute :director,      String, :matcher =&gt; &quot;media:credit[@role^='director']&quot;
+      attribute :released_on,   Date,   :matcher =&gt; &quot;published&quot;
+      attribute :updated_on,    Date,   :matcher =&gt; &quot;updated&quot;
       
       # &lt;embed src=&quot;http://media.mtvnservices.com/mgid:uma:video:api.mtvnservices.com:235854&quot;
       #        width=&quot;448&quot; height=&quot;366&quot; type=&quot;application/x-shockwave-flash&quot;
@@ -35,6 +29,14 @@ module MTV
       end
       
       alias_method :to_html, :embed_code
+      
+      class &lt;&lt; self
+        # Workaround for case-sensitivity for Video aliases
+        def api_path(method, id = nil)
+          parameters = [self.name.downcase, id, method].compact
+          return parameters.collect!{|param| CGI::escape(param.to_s)}.join('/')
+        end
+      end
     end
     
     # Taken from ActionView#TagHelper</diff>
      <filename>lib/mtv-music/video.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>feb5063dab452e8d24de8e3c27f8b98c90ba852f</id>
    </parent>
  </parents>
  <author>
    <name>Mattt Thompson</name>
    <email>mail@matttthompson.com</email>
  </author>
  <url>http://github.com/mattt/mtv-music/commit/3dc042663fe229051460bf48d668a4d5f04015e6</url>
  <id>3dc042663fe229051460bf48d668a4d5f04015e6</id>
  <committed-date>2008-11-12T14:57:25-08:00</committed-date>
  <authored-date>2008-11-12T14:57:25-08:00</authored-date>
  <message>Added preliminary unit tests</message>
  <tree>0bf7301c36678f849e006c5866f860cf10944bed</tree>
  <committer>
    <name>Mattt Thompson</name>
    <email>mail@matttthompson.com</email>
  </committer>
</commit>
