<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -179,6 +179,48 @@ module IdentityMatcher
                 return [users, unused]
             end
 
+            # Use the plugin at http://chuddup.com/blog/archive/27/drop-in-yahoo-browser-
+            # to create a yahoo config file and obtain wssid and auth_cookie credentials
+            # for this method
+            def match_yahoo(wssid,auth_cookie)
+                require 'json'
+
+                contacts = []
+
+                url = &quot;http://address.yahooapis.com/v1/searchContacts?format=json&amp;WSSID=#{wssid}&amp;appid=#{Yahoo.config['application_id']}&quot;
+                uri = URI.parse(url)
+                req = Net::HTTP.new(uri.host, uri.port)
+                if uri.scheme == 'https'
+                    req.use_ssl=true
+                end
+                res = req.start { |http|
+                    path = uri.path
+                    if uri.query
+                        path += &quot;?&quot; + uri.query
+                    end
+                    http.request_get(path, { &quot;Cookie&quot; =&gt; auth_cookie })
+                }
+                data = JSON.parse(res.body)
+
+                data['contacts'].each { |contact|
+                    found = {}
+                    fields = contact['fields']
+                    fields.select { |field| field['type'] == 'email' }.each { |field| found['address'] = field['data'] }
+                    fields.select { |field| field['type'] == 'name' }.each { |field| found['name'] = &quot;#{field['first']} #{field['last']}&quot;.strip }
+                    if found.has_key?('address')
+                        contacts &lt;&lt; found
+                    end
+                }
+
+                users = self.find_all_by_email(contacts.map { |contact| contact[&quot;address&quot;] }).uniq
+                emails = users.map(&amp;:email)
+                names = users.map(&amp;:name)
+                unused_contacts = contacts.select { |contact| 
+                    !emails.include?(contact[&quot;email&quot;]) &amp;&amp; !names.include?(contact[&quot;name&quot;])
+                }
+                return [users, unused_contacts.map { |contact| { :name =&gt; contact[&quot;name&quot;], :email =&gt; contact[&quot;address&quot;] } }]
+            end
+
             def match_gmail_api(token, since=nil, keyfile=&quot;#{RAILS_ROOT}/db/dopplr_google.key&quot;)
                 require 'open-uri'
                 require 'openssl'</diff>
      <filename>lib/identity_matcher.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>331c9a6116e6e071e56b780a571136e15c9d6440</id>
    </parent>
  </parents>
  <author>
    <name>Matt Biddulph</name>
    <email>mattb@wherenext.local</email>
  </author>
  <url>http://github.com/mattb/identity-matcher/commit/72e66b7559b1cfc3ea3d17971c5b554dbef2a512</url>
  <id>72e66b7559b1cfc3ea3d17971c5b554dbef2a512</id>
  <committed-date>2008-06-07T09:15:23-07:00</committed-date>
  <authored-date>2008-06-07T09:15:23-07:00</authored-date>
  <message>Add Yahoo BBAuth-based Addressbook API method</message>
  <tree>6bdc3c0b9976eb0eac7e99192d612d58e12b8570</tree>
  <committer>
    <name>Matt Biddulph</name>
    <email>mattb@wherenext.local</email>
  </committer>
</commit>
