WebService::Mocean - Perl library for integration with MoceanSMS gateway, https://moceanapi.com.
use WebService::Mocean; my $mocean_api = WebService::Mocean->new(api_key => 'foo', api_secret => 'bar');
WebService::Mocean is Perl library for integration with MoceanSMS gateway, https://moceanapi.com.
Source repo at https://github.com/kianmeng/webservice-mocean.
If you have Docker installed, you can build your Docker container for this project.
$ docker build -t webservice-mocean . $ docker run -it -v $(pwd):/root webservice-restcountries bash # cpanm --installdeps --notest .
Setting up the required packages.
$ milla authordeps --missing | cpanm $ milla listdeps --missing | cpanm
Check you code coverage.
$ milla cover
Several ways to run the test.
$ milla test $ milla test --author --release $ AUTHOR_TESTING=1 RELEASE_TESTING=1 milla test $ AUTHOR_TESTING=1 RELEASE_TESTING=1 milla run prove t/01_instantiation.t $ LOGGING=1 milla run prove t/t/02_request.t
Release the module.
$ milla build $ milla release
Construct a new WebService::Mocean instance. The api_key and api_secret is compulsory fields. Optionally takes additional hash or hash reference.
# Instantiate the class. my $mocean_api = WebService::Mocean->new(api_key => 'foo', api_secret => 'bar'); # Alternative way. my $mocean_api = WebService::Mocean->new({api_key => 'foo', api_secret => 'bar'});
The URL of the API resource.
# Instantiate the class by setting the URL of the API endpoints. my $mocean_api = WebService::Mocean->new({api_url => 'http://example.com/api/'}); # Alternative way. my $mocean_api = WebService::Mocean->new(api_key => 'foo', api_secret => 'bar'); $mocean_api->api_url('http://example.com/api/');
Send Mobile Terminated (MT) message, which means the message is sent from mobile SMS provider and terminated at the to the mobile phone.
# Send sample SMS. my $mocean_api = WebService::Mocean->new(api_key => 'foo', api_secret => 'bar'); $mocean_api->send_mt_sms('0123456789', 'ACME Ltd.', 'Hello');
This software is Copyright (c) 2018 by Kian Meng, Ang.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
Kian Meng, Ang <kianmeng@users.noreply.github.com>
To install WebService::Mocean, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Mocean
CPAN shell
perl -MCPAN -e shell install WebService::Mocean
For more information on module installation, please visit the detailed CPAN module installation guide.