mac-skype
mac-skype is a library to use Skype from Mac. It runs on Ruby 1.9 and does not depend on either RubyCocoa or AppleScript.
Tested Rubies
- 1.8.7
- 1.9.3
- 2.0.0
Installation
Add this line to your application's Gemfile:
gem 'mac-skype'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mac-skype
Usage
require 'mac-skype'
agent = Mac::Skype::Agent.instance
agent.connect
Send Skype command
agent.send_command('PROTOCOL 9999') #=> "PROTOCOL 8"
Observe incoming messages
agent. do ||
puts
end
agent.run_forever
Use with Ruby4Skype compatible API
require 'mac-skype'
require 'mac-skype/Ruby4Skype'
Skype.init
Skype.attach_wait
Skype::ChatMessage.set_notify do |, property, value|
if property == :status and value == 'RECEIVED'
.get_chat. .get_body
end
end
Skype.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request