VoIPms - API wrapper for VoIP.ms
use VoIPms; my $voipms = VoIPms->new( 'api_username' => $api_username, 'api_password' => $api_password, // You can optionally defined your own WWW::Mechanize object ); # Response can be fetched with a hash, or individual key/value pairs $res = $voipms->response( %url_attrs ); $res = $voipms->response( 'method' => 'methodName', 'key2' => 'value2' ); eg. $res = $voipms->response( 'method' => 'getSMS', 'did' => '1234567890' ); # All responses will be returned as a hash reference, including a 'status' # which will have the value 'success' if the call worked. if ($res->{status} ne 'success') { die $res->{status}; }
This module provides all of the documented methods from the VoIP.ms API, as listed here: https://www.voip.ms/m/apidocs.php
Responses from VoIP.ms are provided as JSON but are decoded and returned as pure Perl.
None.
Initial release supporting all VoIP.ms public API methods. 2019-06-16
Official Documentation
The official VoIP.ms API documentation, again, with more thourough explanations of all methods:
https://www.voip.ms/m/apidocs.php
VoIPms::Errors
All responses will have a "status" method which should be 'success' if the call worked. The additional module VoIPms::Errors.pm is available to provide the long description of the short error code returned.
Examples
Some discussion of the author's use of the module here:
https://john.me.tz/projects/article.php?topic=VoIPms
John Mertz <perl@john.me.tz>
Copyright (C) 2019 by John Mertz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or, at your option, any later version of Perl 5 you may have available.
To install VoIPms, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VoIPms
CPAN shell
perl -MCPAN -e shell install VoIPms
For more information on module installation, please visit the detailed CPAN module installation guide.