2014-06-11 22:59:52 +02:00
|
|
|
freemobile-smsapi-client
|
|
|
|
========================
|
|
|
|
|
|
|
|
API client for the Free Mobile SMS notification service
|
2014-06-12 00:40:22 +02:00
|
|
|
|
|
|
|
Theses clients send SMS notifications via [Free Mobile](http://mobile.free.fr) mobile broadband company native SMS-notification API.
|
|
|
|
This service can only send SMS to line's owner: it cannot be used to send SMS to any mobile number, group or massive spam.
|
|
|
|
|
|
|
|
Shell Client
|
|
|
|
------------
|
|
|
|
|
|
|
|
### Possible usages:
|
|
|
|
|
|
|
|
```
|
2017-02-11 15:20:55 +01:00
|
|
|
send-notification.sh [options] "All your base are belong to us"
|
2014-06-12 00:40:22 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
2017-02-11 15:20:55 +01:00
|
|
|
uptime | send-notification.sh [options]
|
2014-06-12 00:40:22 +02:00
|
|
|
```
|
|
|
|
|
2017-02-11 14:58:03 +01:00
|
|
|
See `send-notification.sh -h`.
|
|
|
|
|
2014-06-12 00:40:22 +02:00
|
|
|
### Configuration :
|
|
|
|
|
2017-02-11 15:20:55 +01:00
|
|
|
Script can be configured using the following variables:
|
|
|
|
|
2017-02-11 15:18:18 +01:00
|
|
|
* `USER_LOGIN`: The login to use the API.
|
|
|
|
* `API_KEY`: The secret key associated to `USER_LOGIN`.
|
|
|
|
* `MESSAGE_HEADER` (Optional): Will be prepended to all the messages.
|
|
|
|
* `MESSAGE_FOOTER` (Optional): Will be appended to all the messages.
|
|
|
|
* `NEWLINE_CHAR` (Optional): Char to use to create a new line (it depends on
|
|
|
|
receiving terminal).
|
2014-06-12 00:40:22 +02:00
|
|
|
|
2017-02-11 15:20:55 +01:00
|
|
|
Theses can be directly changed in the `send-notification.sh` file or set in a
|
|
|
|
separate configuration file named `.freemobile-smsapi` next to the script or in
|
|
|
|
the user's home directory. A given filepath can also be specify using the `-c`
|
|
|
|
script at runtime (`send-notification.sh -c foobar`).
|
|
|
|
|
|
|
|
Configuration load process is as follows:
|
|
|
|
|
2017-02-11 15:27:23 +01:00
|
|
|
1. Uses what's in `send-notification.sh` file.
|
|
|
|
2. If `-c` option is set, test given file existence and uses what's inside.
|
|
|
|
Will not load any other configuration file (stops load process here).
|
|
|
|
3. Checks if a `.freemobile-smsapi` file exists next to the script and uses
|
|
|
|
what's inside. Will not load any other configuration file (stops load process
|
|
|
|
here).
|
|
|
|
4. Checks if a `.freemobile-smsapi` file exists in user's home directory
|
|
|
|
(`${HOME}`) and uses what's inside. Will not load any other configuration
|
|
|
|
file (stops load process here).
|
2017-02-11 15:20:55 +01:00
|
|
|
|
2014-06-12 00:40:22 +02:00
|
|
|
|
|
|
|
PHP Client
|
|
|
|
----------
|
|
|
|
|
|
|
|
*Soon*
|