Skip to content

Commit

Permalink
pod & readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
tempire committed Sep 3, 2010
1 parent 0c137cf commit c40dfee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -5,7 +5,7 @@ Requires only Mojolicious & IO::Socket::SSL
my $g = Google::Voice->new->login( 'user', 'pass' );

# sms conversation
foreach my $sms ( $g->sms_inbox ) {
foreach my $sms ( $g->sms ) {
print $sms->name;
print $_->time , ':', $_->text, "\n" foreach $sms->messages;
Expand All @@ -19,7 +19,7 @@ Requires only Mojolicious & IO::Socket::SSL
$call->cancel;

# voicemail
foreach my $vm ( $g->voicemail_inbox ) {
foreach my $vm ( $g->voicemail ) {

# name & transcribed text
print $vm->name;
Expand Down
13 changes: 10 additions & 3 deletions lib/Google/Voice.pm
Expand Up @@ -148,11 +148,18 @@ google.com/voice services
# Send sms
$g->send_sms(5555555555 => 'Hello friend!');
# Print all messages in sms inbox
print "$_->{name}, $_->{text}\n" foreach $g->sms;
# Error code from google on fail
print $@ if ! $g->send_sms('invalid phone' => 'text message');
# Print all sms conversations
foreach my $sms ( $g->sms ) {
print $sms->name;
print $_->time , ':', $_->text, "\n" foreach $sms->messages;
}
# connect call & cancel it
my $call = $g->call( '+15555555555' => '+14444444444' );
$call->cancel;
=head1 METHODS
Expand Down

0 comments on commit c40dfee

Please sign in to comment.