Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Nexmo::SMS::WAPPushMesUser(Contributed Perl DocumNexmo::SMS::WAPPushMessage(3)

NAME
       Nexmo::SMS::WAPPushMessage - Module that	respresents a WAPPush message
       for the Nexmo SMS API!

VERSION
       version 0.06

SYNOPSIS
       This module simplifies sending SMS through the Nexmo API.

	   use Nexmo::SMS::WAPPushMessage;

	   my $nexmo = Nexmo::SMS::WAPPushMessage->new(
	       server	=> 'http://rest.nexmo.com/sms/json',
	       username	=> 'testuser1',
	       password	=> 'testpasswd2',
	       text	=> 'This is a test',
	       from	=> 'Test02',
	       to	=> '452312432',
	   );

	   my $response	= $sms->send ||	die $sms->errstr;

	   if (	$response->is_success )	{
	       print "SMS was sent...\n";
	   }

VERSION
       Version 0.02

METHODS
   new
       create a	new object

	   my $message = Nexmo::SMS::WAPPushMessage->new(
	       server	=> 'http://rest.nexmo.com/sms/json',
	       username	=> 'testuser1',
	       password	=> 'testpasswd2',
	   );

       This method recognises these parameters:

	   title	     =>	'required',
	   url		     =>	'required',
	   type		     =>	'required',
	   from		     =>	'required',
	   to		     =>	'required',
	   server	     =>	'required',
	   username	     =>	'required',
	   password	     =>	'required',
	   status_report_req =>	'optional',
	   client_ref	     =>	'optional',
	   network_code	     =>	'optional',
	   validity	     =>	'optional',

   user_agent
       Getter/setter for the user_agent	attribute of the object. By default a
       new object of LWP::UserAgent is used, but you can use your own class as
       long as it is compatible	to LWP::UserAgent.

	 $sms->user_agent( MyUserAgent->new );
	 my $ua	= $sms->user_agent;

   errstr
       return the "last" error as string.

	   print $sms->errstr;

   send
       This actually calls the Nexmo SMS API. It returns a
       Nexmo::SMS::Response object or "undef" (on failure).

	  my $sms = Nexmo::SMS::WAPPushMessage->new( ... );
	  $sms->send or	die $sms->errstr;

   check_needed_params
       This method checks if all needed	parameters are passed.

	 my $params_not_ok = Nexmo::SMS::WAPPushMessage->check_needed_params( ... );
	 if ( $params_not_ok ) {
	     print "Please check $params_not_ok";
	 }

Attributes
       These attributes	are available for "Nexmo::SMS::TextMessage" objects:

       o   client_ref

       o   from

       o   network_code

       o   password

       o   server

       o   status_report_req

       o   title

       o   url

       o   type

       o   to

       o   username

       o   validity

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 (GPL Compatible)

perl v5.32.1			  2011-12-26	 Nexmo::SMS::WAPPushMessage(3)

NAME | VERSION | SYNOPSIS | VERSION | METHODS | Attributes | ACKNOWLEDGEMENTS | COPYRIGHT & LICENSE | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Nexmo::SMS::WAPPushMessage&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help