NAME
Nexmo::SMS
VERSION
version 0.01
SYNOPSIS
This module simplifies sending SMS through the Nexmo API.
use Nexmo::SMS;
my $nexmo = Nexmo::SMS->new(
server => 'http://test.nexmo.com/sms/json',
username => 'testuser1',
password => 'testpasswd2',
);
my $sms = $nexmo->sms(
text => 'This is a test',
from => 'Test02',
to => '452312432',
) or die $nexmo->errstr;
my $response = $sms->send || die $sms->errstr;
if ( $response->is_success ) {
print "SMS was sent...\n";
}
NAME
Nexmo::SMS - Module for the Nexmo SMS API!
VERSION
Version 0.01
METHODS
new
create a new object
my $foo = Nexmo::SMS->new(
server => 'http://test.nexmo.com/sms/json',
username => 'testuser1',
password => 'testpasswd2',
);
Those parameters are optional and they are used as defaults for the message objects
sms
Create a new message object or returns undef
.
my $sms = $nexmo->sms(
text => 'This is a test',
from => 'Test02',
to => '452312432',
) or die $nexmo->errstr;
errstr
return the "last" error as string.
print $nexmo->errstr;
get_balance
Not implemented yet...
get_pricing
Not implemented yet...
Attributes
These attributes are available for Nexmo::SMS::TextMessage
objects. For each attribute there is a getter/setter:
$nexmo->server( 'servername' );
my $server = $nexmo->server;
password
server
username
AUTHOR
Renee Baecker, <module at renee-baecker.de>
BUGS
Please report any bugs or feature requests to bug-nexmo-sms at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Nexmo-SMS. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Nexmo::SMS
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2011 Renee Baecker.
This program is released under the following license: artistic_2
AUTHOR
Renee Baecker <module@renee-baecker.de>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2011 by Renee Baecker.
This is free software, licensed under:
The Artistic License 2.0