Download the PHP package alyatek/smspubli-api without Composer
On this page you can find all versions of the php package alyatek/smspubli-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alyatek/smspubli-api
More information about alyatek/smspubli-api
Files in alyatek/smspubli-api
Package smspubli-api
Short Description SMSPubli API helper for easier use.
License MIT
Informations about the package smspubli-api
⚠ DISCLAIMER : This is not even close to ready for production. This is my first public package so I have a lot to learn first.
Even though their api documentation is super simple and easy to understand I wanted an even simpler way of using it. The package is currently very simple and only does one thing, sends a sms, even though it validates the numbers and certain contents, I want to improve it in the future.
Installation
Use composer to install the package.
Make sure you also have an account at SMSPUBLI and get your key.
Usage
Pay attention to the following before using!
- Make sure the
SMS NAME
is not longer than 11 characters or it will throw an error - spaces count as a character so be warned. - The contact needs to have the country code before the actual contact without the plus sign. e.g : 351321321321
- ❗ For now only Portuguese(+351) contacts can be filtered because the package is being used on a product for PT contacts.
- Maybe I'll add support for more contacts in the future. If you don't want to wait just fork it and add to your needs, or if you want help this grow, open a pull request with the contact country code validation for the code you want.
The request returns an array with a variable status
, with the server request status(200 if request was ok).
If it is success - return an array a success_msg
, sms_id
and if it is an error - it returns an array with success_msg
, sms_id
.
If Guzzle throws an error, it is returned a message with a status of false.
Testing
For testing copy the and define the variables with the SMS PUBLI api key and the others. Then just run to test.
This is not an official package of smspubli.com, in the time of writing this is not, in anyway, affiliated or partned with smspubli.com . If I'm infringing any violation with the company image please let me know @ [email protected]
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate if that is the case.