<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,6 +5,14 @@ require 'cgi'
 require 'hpricot'
 
 
+module Hpricot
+  class Elem
+    def get_html(xpath)
+      search(xpath).inner_html
+    end
+  end
+end
+
 ##
 # This module holds every class and every method that handles Technorati API.
 # It contains classes for every logical entity that exists in the realm of
@@ -18,7 +26,7 @@ module Rubyrati
     
     def fetch(path, key, *args)
       url = URI.parse(&quot;http://api.technorati.com/&quot; + path)
-      @complete_url = url.path + self.key(key) + self.set_arguments(args)
+      @complete_url = url.path + key(key) + args.collect{|x| set_arguments(x)}.join
       response = Net::HTTP.start(url.host, url.port) do |http|
         http.get @complete_url, 'User-Agent' =&gt; key, 'Accept' =&gt; 'text/xml'
       end</diff>
      <filename>lib/rubyrati/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,32 +4,31 @@ module Rubyrati
   class Blog &lt; Base
     def get_links(key, *args)
       path = &quot;cosmos&quot;
-      res = fetch(path, key, *args)
-      parsed_response = {:linking_blogs =&gt; res.search(&quot;//item&quot;).collect{|i| resultify_links(i)}}
+      res = fetch(path, key, {:url =&gt; @url}, args)
+      parsed_response = {:linking_blogs =&gt; res.search(&quot;//item&quot;).collect{|i| resultify_links(i)}
+      }
     end
     
     private
     
-    def resultify_links(element)
+    def resultify_links(e)
       {
-        :name =&gt; element.search(&quot;//weblog/name&quot;).inner_html,
-        :url =&gt; element.search(&quot;//weblog/url&quot;).inner_html,
-        :rssurl =&gt; element.search(&quot;//weblog/rssurl&quot;).inner_html,
-        :atomurl =&gt; element.search(&quot;//weblog/atomurl&quot;).inner_html,
-        :inbound_blogs =&gt; element.search(&quot;//weblog/inboundblogs&quot;).inner_html,
-        :inbound_links =&gt; element.search(&quot;//weblog/inboundlinks&quot;).inner_html,
-        :last_update =&gt; element.search(&quot;//weblog/lastupdate&quot;).inner_html,
-        :nearest_permalink =&gt; element.search(&quot;//nearestpermalink&quot;).inner_html,
-        :excerpt =&gt; element.search(&quot;//excerpt&quot;).inner_html,
-        :link_created =&gt; element.search(&quot;//linkcreated&quot;).inner_html,
-        :link_url =&gt; element.search(&quot;//linkurl&quot;).inner_html
+        :name =&gt; e.get_html(&quot;//weblog/name&quot;),
+        :url =&gt; e.get_html(&quot;//weblog/url&quot;),
+        :rssurl =&gt; e.get_html(&quot;//weblog/rssurl&quot;),
+        :atomurl =&gt; e.get_html(&quot;//weblog/atomurl&quot;),
+        :inbound_blogs =&gt; e.get_html(&quot;//weblog/inboundblogs&quot;).to_i,
+        :inbound_links =&gt; e.get_html(&quot;//weblog/inboundlinks&quot;),
+        :last_update =&gt; e.get_html(&quot;//weblog/lastupdate&quot;),
+        :nearest_permalink =&gt; e.get_html(&quot;//nearestpermalink&quot;),
+        :excerpt =&gt; e.get_html(&quot;//excerpt&quot;),
+        :link_created =&gt; e.get_html(&quot;//linkcreated&quot;),
+        :link_url =&gt; e.get_html(&quot;//linkurl&quot;)
       }
     end
     
     def resultify_blog(elements)
-      {
-        # To be written.
-      }
+      {}
     end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/rubyrati/cosmos.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,12 +9,14 @@ class TestRubyrati &lt; Test::Unit::TestCase
   
   def test_should_do_a_basic_cosmos_query
     testblog = Rubyrati::Blog.new(@url)
-    assert_not_nil(testblog.get_links(@key))
+    result = testblog.get_links(@key)
+    assert_not_nil(result)
+    p result
   end
 
   def test_should_return_a_hash_of_parameters
     testblog = Rubyrati::Blog.new(@url)
-    assert_equal(testblog.get_links(@key).class, Array)
+    assert_equal(Hash, testblog.get_links(@key).class)
   end
 
 end
\ No newline at end of file</diff>
      <filename>test/test_rubyrati.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>16c73841bbf7d8e42ea3b1259c063453fec3f2e0</id>
    </parent>
  </parents>
  <author>
    <name>Apostlion</name>
    <email>apostlion@gmail.com</email>
  </author>
  <url>http://github.com/apostlion/rubyrati/commit/9878d5a6fc7026b895337dca449ae1dcdad8e2a2</url>
  <id>9878d5a6fc7026b895337dca449ae1dcdad8e2a2</id>
  <committed-date>2009-01-17T04:14:28-08:00</committed-date>
  <authored-date>2009-01-17T04:14:28-08:00</authored-date>
  <message>Fixed resultify_links, overall polish</message>
  <tree>ba3de753f5d38e554c0e7e8a81c7dd65e0e17203</tree>
  <committer>
    <name>Apostlion</name>
    <email>apostlion@gmail.com</email>
  </committer>
</commit>
