Skype Desktop API Ruby wrapper for Mac/Linux.
- AppleScript + Mac OSX
- DBus + Linux (testing on Ubuntu 12.04)
for Mac
% gem install skype
% skype-chat
for Linux
% gem install skype ruby-dbus
% skype-chat
Gemfile
gem "skype"
gem "ruby-dbus" if RUBY_PLATFORM =~ /linux/i
please read API Reference before use.
require 'rubygems'
require 'skype'
Skype.config :app_name => "my_skype_app"
send message
Skype.message "USER_NAME", "hello!!"
Skype.exec "MESSAGE USER_NAME hello!!" # execute API directly
call
Skype.call "USER_NAME"
Skype.exec "CALL USER_NAME"
video call
Skype.exec "VIDEOCALL USER_NAME"
find a chat
chat = Skype.chats.find{|c| c.members.include? "shokaishokai" and c.topic =~ /testchat/ }
post message to the chat
chat.post "hello chat!!"
show chat messages
chat.messages.each do |m|
puts m
end
call
call = Skype.call "shokaishokai"
check status
puts call.status # => :routing, :ringing, :inprogress, :finished, :missed, :cancelled
puts call.talking? # => true, false
hangup
call.hangup
- https://github.com/shokai/skype-ruby/tree/master/samples
- https://github.com/shokai/skype-ruby/tree/master/bin
test requires 2 skype accounts.
% gem install bundler
% bundle install
% export SKYPE_FROM=your_skype_name1
% export SKYPE_TO=your_skype_name2
% rake test
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request