rb skypemac
Get Version
0.3.2
→ ‘rb-skypemac’
What
A simple Ruby interface to Skype for use with Mac OS X.
Installing
sudo gem install rb-skypemac
Demonstration of usage
require 'rubygems'
require 'rb-skypemac'
include SkypeMac
# Place a call to the 'echo123' user
call = Skype.call "echo123"
# Disconnect a call
call.hangup
sleight42 = Skype.online_friends.find { |u| u.handle == "sleight42" }
call = Skype.call sleight42
Skype.hangup call # no one wants to talk to him anyway
# Set your user status to away
Iam.away
# Set your user status to back
Iam.online
# Attempt to detect and answer a call -- still experimental!
# Sporadically crashes Skype 2.6.0.17
loop do
begin
if not (calls = Skype.incoming_calls).empty?
call = Skype.answer calls.first
sleep 10
Skype.hangup call
end
rescue RuntimeError => e
puts e.message
end
puts "sleeping..."
sleep 1
end
Licence
This code is free to use under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
Contact
Comments are welcome. Send an email to Evan Light.
Copyright 2007, Evan Light
Evan Light, 2nd May 2007