Giter Club home page Giter Club logo

skype's Introduction

skype โ€“ library to talk to the Skype API

Description

This library is a simple wrapper for Skype's dbus-based Linux API.

Currently, it has the following capabilities:

  • Get a list of your chats,
  • send chat messages,
  • receive chat messages,
  • use the raw Skype protocol via Skype::Api#invoke and Skype::Api#on_notification. More information about the protocol at developer.skype.com

Installation

In order to work with the skype gem, there are a few requirements:

  • You need to be on Linux
  • You need to have Skype running
  • You need dbus installed (e.g., via apt on Ubuntu)
  • You need the ruby-dbus gem:
  • You may want Xvfb (if you want to run Skype head-less)

Verify your installation

To confirm it's working, start skype and sign in. Then, open an irb session and:

require 'dbus'
bus = DBus::SessionBus.instance
skype_service = bus.service("com.Skype.API")
client_to_skype = skype_service.object('/com/Skype')
client_to_skype.introspect
api = client_to_skype["com.Skype.API"]
api.Invoke("NAME ruby-skype")

If everything is set up correctly, Skype will now ask whether "ruby-skype" should be allowed to connect.

Usage

There are a few examples in examples/ that should give you an idea of how to use the gem.

Head-less skype

Say you want to be running an app that connects to skype on a box that won't have a display attached. For this use case, Xvfb is quite handy:

"Xvfb or X virtual framebuffer is an X11 server that performs all graphical operations in memory, not showing any screen output." (wikipedia)"

In examples/start_skype, there's a shell script that shows how to start Skype and Xvfb.

You can safely ignore warnings about missing fonts, but if they bother you, try:

 sudo aptitude install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic

If Xvfb won't start at all, more drastic measures may be required:

 sudo apt-get install xserver-xorg-core

small print

This product uses the Skype API but is not endorsed, certified or otherwise approved in any way by Skype.

skype's People

Contributors

nfelger avatar tanraya avatar pbrisbin avatar

Stargazers

Bryan Liles avatar

Watchers

Bryan Liles avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.