Code Monkey home page Code Monkey logo

skyper's Introduction

skyper

Skyper is a commandline tool and node library for autostarting local Skype calls using Skype URIs.

On Mac OSX, Applescript is used to confirm the call. On other OSes you will need to confirm manually (patches welcome!).

Raw Desktop API access is available via skyper.desktop, though Microsoft will be gradually discontinuing portions of this API over time.

Installation

If you want the commandline tool, install globally using npm:

sudo npm install skyper -g

If you just want the node module:

npm install skyper

Linux users: if you want to use the Desktop API, you may also need to install the Python dbus and gobject modules. For example, on Ubuntu:

sudo apt-get install python-dbus python-gobject

Commandline examples

On the commandline, make a test call to Skype's echo bot:

skyper call echo123

Note for Mac OSX You may be prompted for your Administrator password. This happens when activating OSX Accessibility options for auto-confirming calls.

Specify more than one participant:

skyper call echo123,skype.test.user.1,skype.test.user.2

Get advanced usage information:

skyper -h
Usage: skyper {call|chat} user1,user2,... [--topic topic] [--video]

node examples

Using the node module, make a test call to Skype's echo bot:

var skyper = require("skyper");
skyper.call(["echo123"]);

Note for Mac OSX You may be prompted for your Administrator password. This happens when activating OSX Accessibility options for auto-confirming calls.

Specify more than one participant, as well as advanced arguments like topic and enabling video:

var skyper = require("skyper");

skyper.call(["echo123", "skype.test.user.1"], {
  topic: "Hello world", // Note: in some cases, Skype does not modify the topic.
  video: true
});

Give a callback if you want to know about issues starting or confirming the call:

var skyper = require("skyper");

skyper.call(["echo123", "skype.test.user.1"], {}, function(err) {
  if (err) {
    console.error("Oh no! Something happenend", err);
  }
});

Desktop API examples

When Python is available, skyper.desktop exposes the Skype Desktop API via Skype4Py. All Python dependencies install into a local virtualenv during npm install, which keeps them isolated from the rest of the system.

Note for Linux You may need to install the dbus and gobject libraries for Python separately. You can do this with sudo apt-get install python-dbus python-gobject

You can send a Skype API command like this:

var skyper = require("skyper");

skyper.desktop.send("CALL echo123");

You can also listen for events from Skype:

var skyper = require("skyper");

// When sending your command to Skype...
skyper.desktop.on("command", function(event) {
  console.log(">>>", event)
});

// When Skype acknowledges your command...
skyper.desktop.on("reply", function(event) {
  console.log("<<<", event)
});

// When other events happen in Skype (incoming call, buddy online, etc)...
skyper.desktop.on("notification", function(event) {
  console.log("---", event)
});

Desktop API REPL (experimental)

If you want to experiment with Skype's Desktop API and watch Skype events live, you can fire up a REPL by executing skyper with no arguments:

skyper
######################################################
 Welcome to the Skyper REPL (experimental)
 http://mjpizz.github.io/skyper/desktop-api-reference
######################################################
<- CONNSTATUS ONLINE
-> #0 PROTOCOL 8
<- CURRENTUSERHANDLE mjpizz
<- USERSTATUS ONLINE
<- #0 PROTOCOL 8
>

You can also launch the REPL via the node API:

var skyper = require("skyper");

skyper.desktop.startRepl();

Contributing

Just make a pull request :) In particular, it'd be great to support auto-confirm calls for Windows and Linux.

skyper's People

Contributors

mjpizz avatar

Watchers

 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.