Class: Imstat::Skype

Inherits:
Object
  • Object
show all
Defined in:
lib/imstat/skype.rb

Class Method Summary collapse

Class Method Details

.get_status(user) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/imstat/skype.rb', line 8

def self.get_status(user)
	skype_xml_status = REXML::Document.new open("http://mystatus.skype.com/#{user}.xml").read
	status = Hash.new
	REXML::XPath.each(skype_xml_status, "//presence") do |el| 
		status[el.attributes["xml:lang"].to_sym] = el.text
	end
	status[:en]
end