第一步安装gem
gem install json
gem install contactlist-client
在rb里写
require 'contactlist-client'
require 'json'
contacts = ContactList::Client.fetch(account, password, type)
contacts.each do |contact|
puts "username: #{contact.username}, email: #{contact.email}"
end
account
, string of your email or im account
password
, string of your password
type
, string of your email type of im, now support gmail, hotmail, yahoo, sohu, sina, tom, yeah, 163, 126, 189, 139 and msn