Module for sending SMS messages via the HelloSMS API
Version: 2.0.0
- hellosms
- ~SMSDispatcher
- new SMSDispatcher(username, password, sender)
- .SendMessage(message) ⇒
Promise.<SMSDispatchResult>
- ~SMSMessage
- ~responseObject :
SMSDispatchResult
- ~SMSDispatchResult :
Object
- ~SMSMessageResult :
Object
- ~SMSDispatcher
Kind: inner class of hellosms
Properties
Name | Type | Description |
---|---|---|
LoggingSubject | string |
The sender of the message as logged in the API |
AutomaticallyShortenLinks | boolean |
Automatically shorten links in the message |
TestMode | boolean |
Enable test mode for the API |
RequestCallback | boolean |
Request a callback from the API |
RejectUntrustedCert | boolean |
Reject untrusted certificates |
Endpoint | string |
The API endpoint to use |
Username | string |
The username for the API |
Password | string |
The password for the API |
Sender | string |
The sender of the message |
- ~SMSDispatcher
- new SMSDispatcher(username, password, sender)
- .SendMessage(message) ⇒
Promise.<SMSDispatchResult>
Class for sending SMS messages via the HelloSMS API
Param | Type | Description |
---|---|---|
username | string |
The username for the API |
password | string |
The password for the API |
sender | string |
The sender of the message |
Send a textmessage using the API
Kind: instance method of SMSDispatcher
Returns: Promise.<SMSDispatchResult>
- - Promise object with the response from the API
Access: public
Param | Type |
---|---|
message | SMSMessage |
Kind: inner class of hellosms
Properties
Name | Type | Description |
---|---|---|
Recipient | string |
Recipient phone number |
Text | string |
Text message to send |
SendTime | Date | undefined |
Optional time to send the message |
Class to represent a single SMS message
Param | Type |
---|---|
recipient | string |
text | string |
[sendTime] | Date | undefined |
Kind: inner property of hellosms
Results of dispatching a message, contains a status, results for each recipient, message details, sender, callback status, link shortening status and delay
Kind: inner typedef of hellosms
Properties
Name | Type | Description |
---|---|---|
status | string |
The status of the API request |
results | Array.<SMSMessageResult> |
Array of results for each recipient |
message | Object |
Object with message details |
message.originalText | string |
The original text message |
message.processedText | string |
The processed text message |
message.encoding | string |
The encoding used for the message |
message.totalChars | number |
The total number of characters in the message |
message.totalMessages | number |
The total number of messages in the message |
sender | string |
The sender of the message |
callbackEnabled | boolean |
If a callback was requested |
automaticallyShortenLinks | boolean |
If links were automatically shortened |
delay | number |
The delay in seconds before the message is sent |
A single result of a message dispatch
Kind: inner typedef of hellosms
Properties
Name | Type | Description |
---|---|---|
apiId | string |
The API ID for the message |
recipient | string |
The recipient of the message |
queued | boolean |
If the message was queued for sending |