NAME

Google::Voice - Easy interface for google voice

DESCRIPTION

Easy interface for google voice

USAGE

use Google::Voice;

my $g = Google::Voice->new->login('username', 'password');

# Send sms
$g->send_sms(5555555555 => 'Hello friend!');

# Error code from google on fail
print $@ if !$g->send_sms('invalid phone' => 'text message');

# connect call & cancel it
my $call = $g->call('+15555555555' => '+14444444444');
$call->cancel;


# Print all sms conversations
foreach my $sms ($g->sms) {
    print $sms->name;
    print $_->time, ':', $_->text, "\n" foreach $sms->messages;

    # Delete conversation
    $sms->delete;
}

# loop through voicemail messages
foreach my $vm ($g->voicemail) {

    # Name, number, and transcribed text
    print $vm->name . "\n";
    print $vm->meta->{phoneNumber} . "\n";
    print $vm->text . "\n";

    # Download mp3
    $vm->download->move_to($vm->id . '.mp3');

    # Delete
    $vm->delete;
}

METHODS

new

Create object

login

Login. Returns object on success, false on failure.

call

Connect two phone numbers

send_sms

Send SMS message. Returns true/false.

sms

List of SMS messages

voicemail

List of voicemail messages

recorded

List of recorded calls

placed

List of placed calls

received

List of placed calls

missed

List of missed calls

starred

List of starred items (call, sms, or voicemail)

spam

List of items marked as spam (call, sms, or voicemail)

all

List of all items (call, sms, or voicemail)

SEE ALSO

Mojo::UserAgent, Mojo::DOM

DEVELOPMENT

http://github.com/tempire/perl-google-voice

AUTHOR

Glen Hinkle tempire@cpan.org

CREDITS

David Jones

Graham Forest