The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SkypeAPI - Skype API simple implementation, only support windows platform now.

VERSION

0.06

SYNOPSIS

    use SkypeAPI;
    my $skype = SkypeAPI->new();
    print " skype available=", $skype->attach , "\n";
    my $command = $skype->create_command( { string => "GET USERSTATUS"}  );
    print  $skype->send_command($command) , "\n";
    $command = $skype->create_command( { string => "SEARCH CHATS"}  );
    print $skype->send_command($command) , "\n";

FUNCTIONS

SkypeAPI->new( )

Returns a SkypeAPI object.

    my $skype = SkypeAPI->new();

SkypeAPI->attach( )

Attach to skype, return 1 if attached ok.

SkypeAPI->send_command( $command_object, [$try_times] )

Send command to skype, return the reponse of skype

It sometimes failed when sending message to skype, so we have to retry sending message. $try_times default is 10.

SkypeAPI->create_command( $opt )

Create command. $opt is a hashref. You can defind the command string, timeout in it.

timeout default is 10 seconds.

    my $command = $skype->create_command( { string => "SEARCH CHATS", timeout => 5}  );

SkypeAPI->register_handler( $ref_callback )

Add listener to the chain of message handler.

    $skype->register_handler(\&handler);
    $skype->attach();
    sub handler {
        my $skype = shift;
        my $msg = shift;
        my $command = $skype->create_command( { string => "GET USERSTATUS"}  );
        print $skype->send_command($command) , "\n";
    }

SkypeAPI->listen( )

After you register handlers, call $skype->listen to enter the message loop;

    $skype->listen();

SkypeAPI->stop_listen( )

Call stop_listen in your handler to exit the message loop

    sub handler {
        my $skype = shift;
        my $msg = shift;
        $skype->stop_listen();
    }

DESCRIPTION

A Perl simple implementation of the Skype API, working off of the canonical Java and Python implementations. It is a encapsulation of Windows message communication between Skype and client applications. This version of SkypeAPI only implement some commands of SKYPE API, you can implement the others using SkypAPI->send_command

EXPORT

None by default.

ROBOT DEMO

You can find the robot.pl in the lib/../t/robot.pl, run it and your skype will become a xiaoi robot :)

the robot needs the module XiaoI, please install it first, See http://code.google.com/p/xiaoi/

SEE ALSO

For more command information, See https://developer.skype.com/Docs/ApiDoc/src

The svn source of this project, See http://code.google.com/p/skype4perl/

AUTHOR

laomoi ( laomoi@gmail.com )

COPYRIGHT AND LICENSE

Copyright (C) 2008 by laomoi

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itinstance, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.