Michael Coppola > Win32-Skype-0.01 > Win32::Skype

Download:
Win32-Skype-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Win32::Skype - Perl extension for interfacing with Skype's API on Windows

SYNOPSIS ^

use Win32::Skype;

my $Skype = Win32::Skype->new; $Skype->attach;

$Skype->call('echo123');

DESCRIPTION ^

This module provides an easy-to-use interface to Skype4COM. The naming scheme of the functions allows scripts to be written in an almost pseudo-code kind of way.

METHODS ^

new()

Returns a Win32::Skype object.

    my $Skype = Win32::Skype->new;

attach()

Attaches the script to the Skype4COM API interface.

call(person1[, person2, person3, ...])

Initiates a call to the supplied Skype user or PSTN phone number. Supplying multiple arguments will initiate a conference call.

    $Skype->call('echo123');
    # -or-
    $Skype->call('echo123', '+18004444444');

answer()

Answers an incoming call.

holdCall()

Places the current call on hold.

resumeCall()

Resumes the currently held call.

endCall()

Ends the current call.

startVideoSend()

Starts video send.

stopVideoSend()

Stops video send.

startVideoReceive()

Starts video receive.

stopVideoReceive()

Stops video receive.

userStatus([user])

Returns the status of the supplied user (or current user if one is not specified).

    print $Skype->userStatus;
    # -or-
    print $Skype->userStatus('echo123');

callStatus()

Returns the status of the current call.

dtmf(tones)

Sends DTMF (touch-tones) to the current call. Accepts alphanumeric characters.

    $Skype->dtmf('123ABCabc');

userGetHandle([user])

Returns the handle of the supplied user (or current user if one is not specified).

    print $Skype->userGetHandle;
    # -or-
    print $Skype->userGetHandle('echo123');

userGetFullName([user])

Returns the full name of the supplied user (or current user if one is not specified).

    print $Skype->userGetFullName;
    # -or-
    print $Skype->userGetFullName('echo123');

userSetFullName(name)

Sets the full name of the current user.

    print $Skype->userSetFullName('Mr. Meowingtons');

userGetBirthday([user])

Returns the birthdate of the supplied user (or current user if one is not specified).

    print $Skype->userGetBirthday; # works fine
    # -or-
    print $Skype->userGetBirthday('echo123'); # buggy, so don't use for the time being

userSetBirthday(date)

Sets the birthdate of the current user.

    print $Skype->userSetBirthday('YYYYMMDD');

userGetSex([user])

Returns the sex of the supplied user (or current user if one is not specified).

    print $Skype->userGetSex;
    # -or-
    print $Skype->userGetSex('echo123');

userSetSex(sex)

Sets the sex of the current user.

    print $Skype->userSetSex('male');

userGetLanguage([user])

Returns the language of the supplied user (or current user if one is not specified).

    print $Skype->userGetLanguage;
    # -or-
    print $Skype->userGetLanguage('echo123');

userSetLanguage(language)

Sets the language of the current user.

    print $Skype->userSetLanguage('en');

userGetCountry([user])

Returns the country of the supplied user (or current user if one is not specified).

    print $Skype->userGetCountry;
    # -or-
    print $Skype->userGetCountry('echo123');

userSetCountry(country)

Sets the country of the current user.

    print $Skype->userSetCountry('us');

userGetProvince([user])

Returns the province of the supplied user (or current user if one is not specified).

    print $Skype->userGetProvince;
    # -or-
    print $Skype->userGetProvince('echo123');

userSetProvince(province)

Sets the province of the current user.

    print $Skype->userSetProvince('nb');

userGetCity([user])

Returns the city of the supplied user (or current user if one is not specified).

    print $Skype->userGetCity;
    # -or-
    print $Skype->userGetCity('echo123');

userSetCity(city)

Sets the city of the current user.

    print $Skype->userSetCity('Boston');

userGetPhoneHome([user])

Returns the home phone number of the supplied user (or current user if one is not specified).

    print $Skype->userGetPhoneHome;
    # -or-
    print $Skype->userGetPhoneHome('echo123');

userSetPhoneHome(number)

Sets the home phone number of the current user.

    print $Skype->userSetPhoneHome('+13334445555');

userGetPhoneOffice([user])

Returns the office phone number of the supplied user (or current user if one is not specified).

    print $Skype->userGetPhoneOffice;
    # -or-
    print $Skype->userGetPhoneOffice('echo123');

userSetPhoneOffice(number)

Sets the office phone number of the current user.

    print $Skype->userSetPhoneOffice('+13334445555');

userGetPhoneMobile([user])

Returns the mobile phone number of the supplied user (or current user if one is not specified).

    print $Skype->userGetPhoneMobile;
    # -or-
    print $Skype->userGetPhoneMobile('echo123');

userSetPhoneMobile(number)

Sets the mobile phone number of the current user.

    print $Skype->userSetPhoneMobile('+13334445555');

userGetHomepage([user])

Returns the homepage of the supplied user (or current user if one is not specified).

    print $Skype->userGetHomepage;
    # -or-
    print $Skype->userGetHomepage('echo123');

userSetHomepage(homepage)

Sets the homepage of the current user.

    print $Skype->userSetHomepage('http://www.skype.com/');

userGetAbout([user])

Returns the about text of the supplied user (or current user if one is not specified).

    print $Skype->userGetAbout;
    # -or-
    print $Skype->userGetAbout('echo123');

userSetAbout(text)

Sets the about text of the current user.

    print $Skype->userSetAbout('Hi, I enjoy haxxing gibsons and long walks on the beach.');

userGetMood([user])

Returns the mood of the supplied user (or current user if one is not specified).

    print $Skype->userGetMood;
    # -or-
    print $Skype->userGetMood('echo123');

userSetMood(text)

Sets the mood of the current user.

    print $Skype->userSetMood('mood');

userGetRichMood([user])

Returns the rich mood of the supplied user (or current user if one is not specified).

    print $Skype->userGetRichMood;
    # -or-
    print $Skype->userGetRichMood('echo123');

userSetRichMood(text)

Sets the rich mood of the current user.

    print $Skype->userSetRichMood('mood');

userGetTimezone([user])

Returns the timezone of the supplied user (or current user if one is not specified).

    print $Skype->userGetTimezone;
    # -or-
    print $Skype->userGetTimezone('echo123');

userSetTimezone(timezone)

Sets the timezone of the current user.

    print $Skype->userSetTimezone('-2');

userGetCallNoAnswerTimeout()

Returns the "call no answer timeout" of the current user.

userSetCallNoAnswerTimeout(timeout)

Sets the "call no answer timeout" of the current user.

    print $Skype->userSetCallNoAnswerTimeout('15');

userGetCallApplyForward()

Returns if the current user has call forwarding enabled.

userSetCallApplyForward(boolean)

Enables or disables the call forwarding status of the current user.

    print $Skype->userSetCallApplyForward(1);

userGetSendToVoicemail()

Returns if the current user will send calls to voicemail.

userSetSendToVoicemail(boolean)

Enables or disables sending calls to voicemail of the current user.

    print $Skype->userSetSendToVoicemail(1);

userGetCallForwardRules()

Returns the call forwarding rules of the current user.

userSetCallForwardRules(rules)

Sets the call forwarding rules of the current user.

    print $Skype->userSetCallForwardRules('rules');

userBalance()

Returns the balance in currency cents of the current user. (Unfortunately, there is no userSetBalance() function, haha.)

userBalanceCurrency()

Returns the currency code of the current user.

userBalanceText()

Returns the balance amount with currency symbol of the current user.

userIPCountry()

Returns the ISO country code by IP address of the current user.

userHasCallEquipment([user])

Returns whether or not the supplied user (or current user if one is not specified) has call equipment. The current API implementation will always return true.

    print $Skype->userHasCallEquipment;
    # -or-
    print $Skype->userHasCallEquipment('echo123');

userGetBuddyStatus([user])

Returns the buddy status of the supplied user (or current user if one is not specified).

    print $Skype->userGetBuddyStatus;
    # -or-
    print $Skype->userGetBuddyStatus('echo123');

userSetBuddyStatus(status)

Sets the buddy status of the current user.

    print $Skype->userSetBuddyStatus('status');

userGetIsAuthorized([user])

Returns the authorization status the supplied user (or current user if one is not specified).

    print $Skype->userGetIsAuthorized;
    # -or-
    print $Skype->userGetIsAuthorized('echo123');

userSetIsAuthorized(user, boolean)

Sets the authorization status of the supplied user.

    print $Skype->userSetIsAuthorized('somedude', 1);

userGetIsBlocked([user])

Returns whether or not the supplied user (or current user if one is not specified) is blocked.

    print $Skype->userGetIsBlocked;
    # -or-
    print $Skype->userGetIsBlocked('echo123');

userSetIsBlocked(user, boolean)

Blocks or unblocks the supplied user.

    print $Skype->userSetIsBlocked('somedude', 1);

userGetDisplayName([user])

Returns the display name of supplied user (or current user if one is not specified).

    print $Skype->userGetDisplayName;
    # -or-
    print $Skype->userGetDisplayName('echo123');

userSetDisplayName(name)

Sets the mood of the current user.

    print $Skype->userSetDisplayName('Leetsauce');

isRunning()

Returns the running status of the Skype client.

    if ( $Skype->isRunning ) {
        # etc.
    }

start([boolean, boolean])

Starts the Skype client. If the first argument is true, Skype is minimized to the system tray. If the second argument is true, Skype does not display a splash screen on start up.

    $Skype->start;
    # -or-
    $Skype->start(1, 0);

shutdown()

Closes the Skype client.

minimize()

Minimizes the Skype client.

SEE ALSO ^

https://developer.skype.com/Docs/Skype4COM is the official documentation and reference to Skype4COM. Many functions in this module use similar names as the Skype4COM functions.

AUTHOR ^

Michael Coppola <mncoppola@cpan.org>

BUGS ^

Please report any bugs or feature requests to mncoppola at cpan dot org, and I'll be sure to get back to you.

Known bugs in this module:

The userGetBirthday function does not properly return the birthdate of other users. For example, userGetBirthday('friend') does not work, while userGetBirthday() does (returning your own birthdate).

Error handling is also not 100%, so calling certain functions without the necessary pre-requirements may break the module (for example, calling answer() when there is no incoming call). This will be addressed as the module continues development.

COPYRIGHT AND LICENSE ^

Copyright (C) 2010 by Michael Coppola

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

syntax highlighting: